From d21dc88260ae184740d24c533fa270fd3c13eb6d Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 22:38:53 -0500 Subject: [PATCH 1/6] us_edit manual, more stats... --- programs/us_edit/us_edit.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index f16e8d331..74d823f58 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -1213,21 +1213,30 @@ pb_plateau->setVisible(false); main->setStretchFactor( plot, 3 ); top ->addLayout( main ); + qDebug() << "US_Edit manual setup 1"; + reset(); + qDebug() << "US_Edit manual setup 2"; + //Load already selected data this->allData = allData; this->triples = triples; this->workingDir = workingDir; - load_manual_auto(); + qDebug() << "US_Edit manual setup 3"; + load_manual_auto(); + qDebug() << "US_Edit manual setup 4"; + //pre-select channel passed from main window: cb_triple->setCurrentIndex( currenChtInd ); + qDebug() << "US_Edit manual setup 5"; new_triple( currenChtInd ); - + qDebug() << "US_Edit manual setup 6"; cb_lplot ->setCurrentIndex( plotind ); - + qDebug() << "US_Edit manual setup 7"; show_mwl_controls( false ); + qDebug() << "US_Edit manual setup 8"; } From 06a93a648bb15255309a3c2d65f6c1b070de7468 Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 22:57:38 -0500 Subject: [PATCH 2/6] us_edit manual, more stats [1]... --- programs/us_edit/us_edit.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index 74d823f58..142a95e8e 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -1687,6 +1687,8 @@ void US_Edit::sel_investigator( void ) // Reset parameters to their defaults void US_Edit::reset( void ) { + + qDebug() << "reset 1"; changes_made = false; floatingData = false; @@ -1733,16 +1735,21 @@ void US_Edit::reset( void ) cb_triple->disconnect(); + qDebug() << "reset 2"; + data_plot->detachItems( QwtPlotItem::Rtti_PlotCurve ); data_plot->detachItems( QwtPlotItem::Rtti_PlotMarker ); v_line = NULL; pick ->disconnect(); + qDebug() << "reset 3"; data_plot->setAxisScale( QwtPlot::xBottom, 5.7, 7.3 ); data_plot->setAxisScale( QwtPlot::yLeft , 0.0, 1.5 ); grid = us_grid( data_plot ); + qDebug() << "reset 4"; data_plot->replot(); - + qDebug() << "reset 5"; + // Disable pushbuttons pb_details ->setEnabled( false ); @@ -1775,6 +1782,7 @@ void US_Edit::reset( void ) ck_writemwl ->setEnabled( false ); + qDebug() << "reset 6"; // Remove icons pb_meniscus ->setIcon( QIcon() ); pb_airGap ->setIcon( QIcon() ); @@ -1830,12 +1838,16 @@ void US_Edit::reset( void ) { lb_airGap->setHidden( true ); } + qDebug() << "reset 7"; connect_mwl_ctrls( true ); - + qDebug() << "reset 8"; + set_pbColors( NULL ); lb_triple->setText( tr( "Cell / Channel / Wavelength" ) ); + qDebug() << "reset 9"; show_mwl_controls( false ); + qDebug() << "reset 10"; } // Reset parameters for a new triple From 6f8ddce1b92386ca1711aeab6c856aee78b37da5 Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 23:03:06 -0500 Subject: [PATCH 3/6] us_edit manual, more stats [2]... --- programs/us_edit/us_edit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index 142a95e8e..05e5e985e 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -1795,6 +1795,8 @@ void US_Edit::reset( void ) pb_float ->setIcon( QIcon() ); + qDebug() << "reset 61"; + editLabel .clear(); data.scanData .clear(); includes .clear(); @@ -1803,6 +1805,8 @@ void US_Edit::reset( void ) triples .clear(); cb_triple ->clear(); cb_rpms ->disconnect(); + + qDebug() << "reset 62"; cb_rpms ->clear(); editGUIDs .clear(); editIDs .clear(); @@ -1826,14 +1830,17 @@ void US_Edit::reset( void ) rb_radius ->setChecked( true ); rb_waveln ->setChecked( false ); pb_custom ->setEnabled( false ); + qDebug() << "reset 63"; if (pb_airGap != nullptr) { pb_airGap->setHidden( true ); } + qDebug() << "reset 64"; if (le_airGap != nullptr) { le_airGap->setHidden( true ); } + qDebug() << "reset 65"; if (lb_airGap != nullptr) { lb_airGap->setHidden( true ); From 9d31d38b92815c8465e2fc7185494857f81732b4 Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 23:17:23 -0500 Subject: [PATCH 4/6] us_edit manual, more stats [3]... --- programs/us_edit/us_edit.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index 05e5e985e..8ab65d0ab 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -936,10 +936,19 @@ lambdas << "250" << "350" << "450" << "550" << "580" << "583" << "650"; // Air Gap (hidden by default) pb_airGap = us_pushbutton( tr( "Specify Air Gap" ), false ); + lb_airGap = us_label( tr( "Air Gap:" ), -1 ); le_airGap = us_lineedit( "", 1, true ); - pb_airGap->setHidden( true ); + pb_airGap->setVisible( false ); + lb_airGap->setHidden( true ); le_airGap->setHidden( true ); + + // // Air Gap (hidden by default) + // pb_airGap = us_pushbutton( tr( "Specify Air Gap" ), false ); + // le_airGap = us_lineedit( "", 1, true ); + // pb_airGap->setHidden( true ); + // le_airGap->setHidden( true ); + // Data range pb_dataRange = us_pushbutton( tr( "Specify Data Range" ), false ); le_dataRange = us_lineedit( "", 1, true ); From d2a068b1f19b2d4feedcb532b054764b37e78878 Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 23:26:38 -0500 Subject: [PATCH 5/6] us_edit manual, more stats [4]... --- programs/us_edit/us_edit.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index 8ab65d0ab..f6377e5fe 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -3848,8 +3848,11 @@ double US_Edit::find_meniscus_auto() //ALEXEY: maybe to be on safer side, take indexRight = meniscus_init + ( aprofile_right - meniscus_init )/2.0 //int indexRight = meniscus_init + ( data.xindex( range_right ) - meniscus_init )/2.0; - int indexRight = data.xindex( range_right ); - // qDebug() << "indexLeft = " << indexLeft << "; indexRight = " << indexRight; + //int indexRight = data.xindex( range_right ); + int indexRight = data.xindex( meniscus_init + ( range_right - meniscus_init )/2.0 ); + + qDebug() << "data.xindex( range_right ) = " << data.xindex( range_right ); + qDebug() << "indexLeft = " << indexLeft << "; indexRight = " << indexRight; for ( int j = indexLeft; j <= indexRight; j++ ) { From 1ba2edb4e7f15f2a6d0d3cadeacc57c8a777bb5d Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Thu, 8 Aug 2024 23:36:45 -0500 Subject: [PATCH 6/6] us_edit manual, more stats [5] & fixes... --- programs/us_edit/us_edit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/us_edit/us_edit.cpp b/programs/us_edit/us_edit.cpp index f6377e5fe..65c8dc873 100644 --- a/programs/us_edit/us_edit.cpp +++ b/programs/us_edit/us_edit.cpp @@ -3848,7 +3848,8 @@ double US_Edit::find_meniscus_auto() //ALEXEY: maybe to be on safer side, take indexRight = meniscus_init + ( aprofile_right - meniscus_init )/2.0 //int indexRight = meniscus_init + ( data.xindex( range_right ) - meniscus_init )/2.0; - //int indexRight = data.xindex( range_right ); + //int indexRight = data.xindex( range_right ); + //ALEXEY: maybe to be on safer side, take indexRight = meniscus_init + ( aprofile_right - meniscus_init )/2.0!!! int indexRight = data.xindex( meniscus_init + ( range_right - meniscus_init )/2.0 ); qDebug() << "data.xindex( range_right ) = " << data.xindex( range_right );