Author: alexey Date: 2019-06-29 01:00:53 +0000 (Sat, 29 Jun 2019) New Revision: 2787 Modified: trunk/programs/us_convert/us_convert_gui.cpp trunk/utils/us_xpn_data.cpp Log: Exp. type Calibration - enable saving without definin greference scan; A (possible) fix for live_update of multi-speed experiments - needs testing... Modified: trunk/programs/us_convert/us_convert_gui.cpp =================================================================== --- trunk/programs/us_convert/us_convert_gui.cpp 2019-06-20 08:18:17 UTC (rev 2786) +++ trunk/programs/us_convert/us_convert_gui.cpp 2019-06-29 01:00:53 UTC (rev 2787) @@ -2325,6 +2325,7 @@ } + // This can go on the todo list, but should not prevent user from saving if ( ( runType == "RI" ) && ( ! referenceDefined ) ) { @@ -2336,7 +2337,9 @@ { pb_reference->setEnabled( true ); //ALEXEY <--- Save btn is disabled when Reference scan is NOT defined (for Absorbance) - completed = false; + + if ( ! ExpData.expType.contains( "calibrat", Qt::CaseInsensitive ) ) + completed = false; } } Modified: trunk/utils/us_xpn_data.cpp =================================================================== --- trunk/utils/us_xpn_data.cpp 2019-06-20 08:18:17 UTC (rev 2786) +++ trunk/utils/us_xpn_data.cpp 2019-06-29 01:00:53 UTC (rev 2787) @@ -1385,7 +1385,7 @@ int ccx = 0; int wvx = 0; int scnnbr = 0; - nscnn = scnnbrs.count(); + nscnn = scnnbrs.count(); // ALEXEY: is nscnn, the #scans, is the same for all stages ? NO! int stgnbr = 0; nstgn = stgnbrs.count(); ntscan = 0; @@ -1572,7 +1572,7 @@ int ccx = 0; int wvx = 0; int scnnbr = 0; - nscnn = scnnbrs.count(); + nscnn = scnnbrs.count(); //ALEXEY: is nscnn (# scan) is the same for all stages ? NO! int stgnbr = 0; nstgn = stgnbrs.count(); DbgLv(1) << "rBldRawD ntriple nstgn nscnn" << ntriple << nstgn << nscnn @@ -1599,7 +1599,7 @@ for ( int sgx = 0; sgx < nstgn; sgx++ ) { // Set stage values stgnbr = stgnbrs[ sgx ]; - for ( int scx = 0; scx < nscnn; scx++ ) + for ( int scx = 0; scx < nscnn; scx++ ) //ALEXEY: is nscnn (# scan) is the same for all stages ? NO! { // Set scan values time10=QDateTime::currentDateTime(); scnnbr = scnnbrs[ scx ]; @@ -1646,9 +1646,14 @@ time10=QDateTime::currentDateTime(); int kpoint = get_readings( scan.rvalues, trx, sgx, scx ); + qDebug() << "INSIDE xpn_data: AFTER get_readings() 0"; + if ( kpoint < 0 ) continue; // Skip output if no stage,scan match + + qDebug() << "INSIDE xpn_data: AFTER get_readings() 1"; + if(scx<3 || (scx+4)>nscnn) DbgLv(1) << "rBldRawD scx" << scx << "rvalues size" << scan.rvalues.size() << "rvalues[mid]" << scan.rvalues[scan.rvalues.size()/2]; @@ -1656,7 +1661,16 @@ //if ( ( scx + 1 ) == oscknt ) if ( ndscan == oscknt ) { // If last of old scans, update in case readings were added - int ksc = sgx * nscnn + scx; + + + //int ksc = sgx * nscnn + scx; //ALEXEY: crashes after this line: is this correct for ksc at multi-speed ? + //ALEXEY: is nscnn (# scan) is the same for all stages ? NO! + + int ksc = oscknt - 1; + + qDebug() << "INSIDE xpn_data: AFTER get_readings() 2a: ksc = sgx * nscnn + scx: " << sgx << " * " << nscnn << " + " << scx; + qDebug() << "INSIDE xpn_data: AFTER get_readings() 2: ksc: " << ksc << ", rdata->scanData.size(): " << rdata->scanData.size(); + rdata->scanData[ ksc ] = scan; DbgLv(1) << "rBldRawD ksc" << ksc << "++Scan Replace"; } @@ -1667,7 +1681,12 @@ DbgLv(1) << "rBldRawD ndscan oscknt" << ndscan << oscknt << "++Scan Add nscknt" << nscknt; } time20=QDateTime::currentDateTime(); + + qDebug() << "INSIDE xpn_Data 1"; + timi4+=time10.msecsTo(time20); + + qDebug() << "INSIDE xpn_Data 2"; } // END: scan loop } // END: stage loop QDateTime time07b=QDateTime::currentDateTime();
participants (1)
-
svn@svn.aucsolutions.com