us-commits
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
August 2019
- 1 participants
- 29 discussions
Author: alexey
Date: 2019-08-30 03:20:14 +0000 (Fri, 30 Aug 2019)
New Revision: 2828
Modified:
trunk/programs/us_convert/us_convert_gui.cpp
trunk/programs/us_convert/us_convert_gui.h
Log:
us_convert: a bug fixed for MWL data while setting lambda_start/end and lambda_plot...
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-08-27 13:05:47 UTC (rev 2827)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-08-30 03:20:14 UTC (rev 2828)
@@ -4014,6 +4014,8 @@
if ( slambda != wvs[ 0 ] || elambda != wvs[ nlambda - 1 ] )
{ // A change in lambda range requires a general reset
setTripleInfo();
+
+ qDebug() << "Calling setTripleInfo()";
}
}
@@ -4079,7 +4081,7 @@
cb_lambplot->setCurrentIndex( nlambda / 2 );
- show_mwl_control( true );
+ show_mwl_control( true );
mwl_connect( true );
}
@@ -4113,19 +4115,41 @@
mwl_connect( false );
cb_lambplot->clear();
+ // //ALEXEY: also clear cb_lambstrt && cb_lambstop
+ // cb_lambstrt->clear();
+ // cb_lambstop->clear();
+
for ( int wvx = 0; wvx < nlambda; wvx++ )
{ // Rebuild the plot lambda list
+
int ilamb = exp_lambdas[ wvx ];
cb_lambplot->addItem( QString::number( ilamb ) );
+ // //ALEXEY: Also regenerate cb_lambstrt && cb_lambstop - for selected channel:
+ // cb_lambstrt->addItem( QString::number( ilamb ) );
+ // cb_lambstop->addItem( QString::number( ilamb ) );
+
+
if ( ilamb == plambda ) pltx = wvx;
+
+ qDebug() << "Lambda MWL " << wvx << ": " << exp_lambdas[ wvx ] << "; INDEX: " << pltx;
}
// Re-do selections for lambda start,stop,plot
+
+ //ALEXEY: set lambstart/stop based on selected channel, not all wavelengths
+ // cb_lambstrt->setCurrentIndex( 0 );
+ // cb_lambstop->setCurrentIndex( nlambda - 1 );
cb_lambstrt->setCurrentIndex( all_lambdas.indexOf( slambda ) );
cb_lambstop->setCurrentIndex( all_lambdas.indexOf( elambda ) );
+
+
+
+
cb_lambplot->setCurrentIndex( pltx );
mwl_connect( true );
+
+ qDebug() << "Inside setTripleInfo(); cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex();
}
else
@@ -6416,9 +6440,36 @@
void US_ConvertGui::lambdaStartChanged( int value )
{
DbgLv(1) << "lambdaStartChanged" << value;
+
+ //ALEXEY: compare slambda to the cb_lambplot->index(0).value: if <, setCurrentIndex() to index corresponding to this upper value
+ tripListx = lw_triple->currentRow();
+ int slambda_lambplot = slambdas_per_channel[tripListx];
+
slambda = cb_lambstrt->itemText( value ).toInt();
elambda = cb_lambstop->currentText() .toInt();
- tripListx = lw_triple->currentRow();
+
+ qDebug() << "LAMBDA_STR_CHANGE: slambda_lambplot, slambda: " << slambda_lambplot << ", " << slambda;
+
+ if ( slambda < slambda_lambplot )
+ //if ( slambda < 280 )
+ {
+ int index_lambstrt = cb_lambstrt->findText( QString::number(slambda_lambplot) );
+
+ qDebug() << "LAMBDA_STR_CHANGE: index_lambstrt " << index_lambstrt;
+ slambda = slambda_lambplot;
+
+ cb_lambstrt->disconnect();
+ cb_lambstrt->setCurrentIndex( index_lambstrt );
+ connect( cb_lambstrt, SIGNAL( currentIndexChanged( int ) ),
+ this, SLOT ( lambdaStartChanged ( int ) ) );
+
+ }
+
+ //slambda = cb_lambstrt->itemText( value ).toInt();
+ //elambda = cb_lambstop->currentText() .toInt();
+ //tripListx = lw_triple->currentRow();
+ /***************************************************************************************************/
+
int currChan = out_chaninfo[ tripListx ].channelID;
DbgLv(1) << "lambdaStartChanged" << value << "sl el tLx cCh"
<< slambda << elambda << tripListx << currChan;
@@ -6444,9 +6495,37 @@
void US_ConvertGui::lambdaEndChanged( int value )
{
DbgLv(1) << "lambdaEndChanged" << value;
+
+ //ALEXEY: compare slambda to the cb_lambplot->index(0).value: if <, setCurrentIndex() to index corresponding to this upper value
+ tripListx = lw_triple->currentRow();
+ int elambda_lambplot = elambdas_per_channel[tripListx];
+
+ elambda = cb_lambstop->itemText( value ).toInt();
slambda = cb_lambstrt->currentText() .toInt();
- elambda = cb_lambstop->itemText( value ).toInt();
- tripListx = lw_triple->currentRow();
+
+ qDebug() << "LAMBDA_STOP_CHANGE: elambda_lambplot, elambda: " << elambda_lambplot << ", " << elambda;
+
+ if ( elambda > elambda_lambplot )
+ {
+ int index_lambstop = cb_lambstop->findText( QString::number(elambda_lambplot) );
+
+ qDebug() << "LAMBDA_STOP_CHANGE: index_lambstrt " << index_lambstop;
+ elambda = elambda_lambplot;
+
+ cb_lambstop->disconnect();
+ cb_lambstop->setCurrentIndex( index_lambstop );
+ connect( cb_lambstop, SIGNAL( currentIndexChanged( int ) ),
+ this, SLOT ( lambdaEndChanged ( int ) ) );
+
+ }
+
+ //slambda = cb_lambstrt->itemText( value ).toInt();
+ //elambda = cb_lambstop->currentText() .toInt();
+ //tripListx = lw_triple->currentRow();
+ /***************************************************************************************************/
+
+
+
int currChan = out_chaninfo[ tripListx ].channelID;
DbgLv(1) << "lEnChg: val" << value << "sl el tLx cCh"
<< slambda << elambda << tripListx << currChan;
@@ -6490,6 +6569,11 @@
int wvxmax = cb_lambplot->count() - 1;
int wvx = qMin( wvxmax, cb_lambplot->currentIndex() + 1 );
+
+ qDebug() << "LAMBDA_NEXT: wvxmax = cb_lambplot->count() - 1: " << wvxmax
+ << ", cb_lambplot->currentIndex() + 1: " << cb_lambplot->currentIndex() + 1
+ << ", wvx = qMin( wvxmax, cb_lambplot->currentIndex() + 1 ): " << wvx;
+
cb_lambplot->setCurrentIndex( wvx );
}
@@ -6526,13 +6610,31 @@
int tripx2 = out_chandatx[ tripnext ];
tripDatax = tripx1 + cb_lambplot->currentIndex();
+ qDebug() << "TRIPLE_Index(): "
+ << "tripnext = " << tripnext
+ << ", tripx1 = " << tripx1
+ << ", tripx2 = " << tripx2
+ << ", tripDatax = tripx1 + cb_lambplot->currentIndex(): " << tripx1 << " + " << cb_lambplot->currentIndex();
+
+
+ //ALEXEY: the following part is buggy: commented out for now - seems to help with plotting/selecting triples for non-first channel for MWL case
+ //Ask Gary (if this section in place, it causes incorrect placement of cb_lambplot indexes, so no plots generated...)
+ /*
if ( tripDatax >= tripx2 )
{ // Less wavelengths in this channel than in the previous one
tripDatax = ( tripx1 + tripx2 ) / 2;
mwl_connect( false );
cb_lambplot->setCurrentIndex( ( tripDatax - tripx1 ) );
+
+
+ qDebug() << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex();
+
mwl_connect( true );
}
+ */
+
+ qDebug() << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex();
+
}
else
@@ -6754,10 +6856,37 @@
{
QString clamb = QString::number( exp_lambdas[ ii ] );
cb_lambplot->addItem( clamb );
+
+ qDebug() << "MWL_SETUP: exp_lambda " << ii << ", " << clamb;
}
cb_lambplot->setCurrentIndex( nlambda / 2 );
+ //ALEXEY: need initial (non-modified by changing start/end lambdas) lambda boundaries for each channel
+ int nchans_int = out_channels.count();
+ slambdas_per_channel.clear();
+ elambdas_per_channel.clear();
+
+ if ( slambdas_per_channel.size() != nchans_int )
+ slambdas_per_channel.resize( nchans_int);
+
+ if ( elambdas_per_channel.size() != nchans_int )
+ elambdas_per_channel.resize( nchans_int);
+
+
+ for ( int ccx = 0; ccx < nchans_int; ccx++ )
+ {
+ int nlambda_per_channel = mwl_data.lambdas( exp_lambdas, ccx );
+ if ( nlambda_per_channel < 1 )
+ {
+ break;
+ }
+ slambdas_per_channel[ccx] = exp_lambdas[ 0 ];
+ elambdas_per_channel[ccx] = exp_lambdas[ nlambda_per_channel - 1 ];
+ }
+ /****************************************************************************************************/
+
+
show_mwl_control( true );
mwl_connect( true );
Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h 2019-08-27 13:05:47 UTC (rev 2827)
+++ trunk/programs/us_convert/us_convert_gui.h 2019-08-30 03:20:14 UTC (rev 2828)
@@ -246,6 +246,9 @@
int dbg_level; // Debug level
int impType; // Import type flag: 0,1,2 == Beck,MWL,AUC
+ QVector<int> slambdas_per_channel;
+ QVector<int> elambdas_per_channel;
+
QString currentDir; // Current data file directory
QString saveDescription; // Saved channel description
1
0
Author: alexey
Date: 2019-08-27 13:05:47 +0000 (Tue, 27 Aug 2019)
New Revision: 2827
Modified:
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
Log:
autoflow: LIVE_UPDATE to Manage Opt. Runs, small further updates...
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 06:03:30 UTC (rev 2826)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 13:05:47 UTC (rev 2827)
@@ -1655,8 +1655,8 @@
// OR
//Alternativly: put it in separate thread:
//QThread* sys_thread = new QThread(this);
- sys_thread = new QThread(this);
- timer_check_sysdata = new QTimer(0); // parent to 0 !
+ //sys_thread = new QThread(this);
+ //timer_check_sysdata = new QTimer(0); // parent to 0 !
timer_check_sysdata->setInterval(2000);
timer_check_sysdata->moveToThread(sys_thread);
//connect( timer_check_sysdata, SIGNAL(timeout()), this, SLOT( check_for_sysdata( ) ), Qt::QueuedConnection ) ; //Qt::DirectConnection );
@@ -1971,9 +1971,6 @@
if ( exp_status == 5 || exp_status == 0 )
{
- if ( exp_status == 0)
- experimentAborted = true;
-
//timer_check_sysdata->stop();
//ALEXEY: This timer cannot be stopped from another thread, but can be dealt with signal/slot upon Qthread termination..
// disconnection maybe enough...
@@ -1993,13 +1990,22 @@
rpm_box->setSpeed( 0 );
le_remaining->setText( "00:00:00" );
qApp->processEvents();
+
+ if ( finishing_live_update )
+ {
+ in_reload_check_sysdata = false;
+ return;
+ }
+
+ if ( exp_status == 0)
+ experimentAborted = true;
if ( !timer_all_data_avail->isActive() ) // Check if reload_data Timer is stopped
{
if ( !timer_data_reload->isActive() )
{
qDebug() << "TRY PROCEED INTO == 5/0 from check_for_sys_data()....";
-
+
export_auc_auto();
// QString mtitle_complete = tr( "Complete!" );
@@ -2008,9 +2014,9 @@
updateautoflow_record_atLiveUpdate();
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
-
+
reset_auto();
-
+
in_reload_check_sysdata = false;
emit experiment_complete_auto( details_at_live_update );
@@ -2137,6 +2143,8 @@
timer_all_data_avail = new QTimer;
timer_data_reload = new QTimer;
timer_end_processes = new QTimer;
+ timer_check_sysdata = new QTimer(0); // parent to 0 !
+ sys_thread = new QThread(this);
timer_data_init = new QTimer;
@@ -2289,11 +2297,11 @@
reset_auto();
qApp->processEvents();
- in_reload_end_processes = false;
+ in_reload_end_processes = false;
+ finishing_live_update = false;
emit liveupdate_processes_stopped();
-
- //in_reload_end_processes = false;
+
}
else
{
@@ -2593,6 +2601,14 @@
//ALEXEY: Add Exp. Abortion Exception HERE...
if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
{
+ if ( finishing_live_update )
+ {
+ timer_all_data_avail->stop();
+ disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ in_reload_all_data = false;
+ return;
+ }
+
qDebug() << "ABORTION IN EARLY STAGE...";
experimentAborted = true;
@@ -3963,6 +3979,14 @@
if ( statusExp == 5 || statusExp == 0 )
{
+ if ( finishing_live_update )
+ {
+ timer_data_reload->stop();
+ disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ in_reload_auto = false;
+ return;
+ }
+
if ( statusExp == 0 )
experimentAborted = true;
1
0
Author: alexey
Date: 2019-08-27 06:03:30 +0000 (Tue, 27 Aug 2019)
New Revision: 2826
Modified:
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
Log:
... forgot to remove artificial loop for data aqcuisition
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 06:01:38 UTC (rev 2825)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 06:03:30 UTC (rev 2826)
@@ -1969,7 +1969,7 @@
int exp_status = CheckExpComplete_auto( RunID_to_retrieve );
- if ( exp_status == 55 || exp_status == 10 )
+ if ( exp_status == 5 || exp_status == 0 )
{
if ( exp_status == 0)
experimentAborted = true;
@@ -2591,7 +2591,7 @@
qDebug() << "TripleNumber, ntriple " << TripleNumber.toInt() << ", " << ntriple;
//ALEXEY: Add Exp. Abortion Exception HERE...
- if ( CheckExpComplete_auto( RunID_to_retrieve ) == 10 ) //ALEXEY should be == 3 as per documentation
+ if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
{
qDebug() << "ABORTION IN EARLY STAGE...";
@@ -3961,7 +3961,7 @@
/*** Check Experiement Status: if completed, kill the timer, export the data into AUC format, return, signal to switch panels in US_comproject ***/
int statusExp = CheckExpComplete_auto( RunID_to_retrieve );
- if ( statusExp == 55 || statusExp == 10 )
+ if ( statusExp == 5 || statusExp == 0 )
{
if ( statusExp == 0 )
experimentAborted = true;
1
0
Aug. 27, 2019
Author: alexey
Date: 2019-08-27 06:01:38 +0000 (Tue, 27 Aug 2019)
New Revision: 2825
Modified:
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
Log:
A seemingly stable solution is finally found for arbitrary switching to Manage Optima Runs from actively on-going LIVE UPDATE phase:
* tested transition from all stages of data acqusition (beginning, reloading, updating, together with/without sysdata update)
* all processes are properly finished (sysdata thread/timer, data retrieval/update timers)
* tested from home machine (long DB interaction times) and from demeler3 (short DB interaction times)
* tested on infinitely looped initial data retreival/ data update processes for selected runs; NEEDS testing on real-time experiments
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-27 06:01:38 UTC (rev 2825)
@@ -27,8 +27,6 @@
#endif
-//ALEXEY: reverted, based on v2802
-
//// Constructor: ACADEMIC: 'Data Acquision' / us_comproject_academic programs
US_ComProjectMain::US_ComProjectMain(QString us_mode) : US_Widgets()
{
@@ -344,6 +342,7 @@
connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
connect( this, SIGNAL( reset_live_update() ), epanObserv, SLOT( reset_live_update( ) ) );
+ connect( epanObserv, SIGNAL( processes_stopped() ), this, SLOT( liveupdate_stopped() ));
connect( epanPostProd, SIGNAL( switch_to_editing( QString &, QString &) ), this, SLOT( switch_to_editing( QString &, QString & ) ) );
connect( this, SIGNAL( reset_lims_import() ), epanPostProd, SLOT( reset_lims_import( ) ) );
@@ -386,12 +385,23 @@
/*
1. Avaiting for run to be launched ("Back to Managing Optima Runs") -- SET
2. More complex: Back to Managing runs from active LIVE_UPDATE stage -- stop all timers and other processes...
- */
+ */
+
qDebug() << "Jumping from LIVE UPDATE.";
-
+
//2. Stop all timers/threads, reset GUI - when stopping fully working LIVE UPDATE
if ( !xpn_viewer_closed_soft )
- emit reset_live_update();
+ {
+ show_liveupdate_finishing_msg();
+
+ epanObserv->sdiag->reset_liveupdate_panel_public();
+ qApp->processEvents();
+
+ xpn_viewer_closed_soft = false;
+ //epanInit ->initAutoflowPanel();
+
+ return;
+ }
}
if ( curr_panx == 3 )
@@ -411,6 +421,43 @@
//curr_panx = panx; // Set new current panel
}
+
+// Slot to define new exp. (from initial dialog)
+void US_ComProjectMain::show_liveupdate_finishing_msg( void )
+{
+
+ msg_liveupdate_finishing = new QMessageBox(this);
+ msg_liveupdate_finishing->setIcon(QMessageBox::Information);
+
+ msg_liveupdate_finishing->setWindowFlags ( Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint);
+ msg_liveupdate_finishing->setStandardButtons(0);
+ msg_liveupdate_finishing->setWindowTitle(tr("Updating..."));
+ msg_liveupdate_finishing->setText(tr( "Finishing LIVE UPDATE processes... Please wait...") );
+ msg_liveupdate_finishing->setStyleSheet("background-color: #36454f; color : #D3D9DF;");
+
+
+ int tab_width = this->tabWidget->tabBar()->width();
+ int upper_height = this->gen_banner->height() + //this->welcome->height()
+ + this->logWidget->height() + this->test_footer->height();
+
+ int pos_x = this->width()/2 - tab_width;
+ int pos_y = this->height()/2 - upper_height;
+ msg_liveupdate_finishing->move(pos_x, pos_y);
+
+ msg_liveupdate_finishing->show();
+
+ qApp->processEvents();
+
+}
+
+void US_ComProjectMain::liveupdate_stopped( void )
+{
+ //Close message on finishing LIVE_UPDATE processes...
+ msg_liveupdate_finishing->accept();
+
+ epanInit ->initAutoflowPanel();
+}
+
void US_ComProjectMain::closeEvent( QCloseEvent* event )
{
window_closed = true;
@@ -563,7 +610,7 @@
msg_expsetup->setWindowFlags ( Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint);
msg_expsetup->setStandardButtons(0);
msg_expsetup->setWindowTitle(tr("Updating..."));
- msg_expsetup->setText(tr( "Setting up Experiment panel... Please wait...") );
+ msg_expsetup->setText(tr( "Setting up EXPERIMENT panel... Please wait...") );
msg_expsetup->setStyleSheet("background-color: #36454f; color : #D3D9DF;");
@@ -1681,6 +1728,8 @@
//ALEXEY: close program, emitted from sdiag
connect( sdiag, SIGNAL( close_program() ), this, SLOT( to_close_program() ) );
+
+ connect( sdiag, SIGNAL( liveupdate_processes_stopped() ), this, SLOT( processes_stopped_passed() ) );
offset = 0;
sdiag->move(offset, 2*offset);
@@ -1722,6 +1771,11 @@
QWidget::resizeEvent(event);
}
+void US_ObservGui::processes_stopped_passed( void )
+{
+ emit processes_stopped();
+}
+
void US_ObservGui::reset_live_update( void )
{
emit reset_live_update_passed();
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-08-27 06:01:38 UTC (rev 2825)
@@ -35,8 +35,6 @@
#include "us_license.h"
#include "us_select_item.h"
-//ALEXEY: reverted, based on v2802
-
class US_ComProjectMain;
class VerticalTabStyle : public QProxyStyle {
@@ -155,6 +153,7 @@
void pass_used_instruments( QStringList & );
void expsetup_msg_closed( void );
+
signals:
void switch_to_live_update( QMap < QString, QString > & protocol_details );
void set_auto_mode( void );
@@ -174,9 +173,11 @@
US_ObservGui( QWidget* );
~US_ObservGui() {};
+ US_XpnDataViewer* sdiag;
+
private:
US_ComProjectMain* mainw; // Parent to all panels
- US_XpnDataViewer* sdiag;
+ //US_XpnDataViewer* sdiag;
int offset;
protected:
@@ -188,12 +189,14 @@
void to_post_processing( QMap < QString, QString > & );
void to_close_program( void );
void reset_live_update( void );
+ void processes_stopped_passed( void );
signals:
void to_xpn_viewer( QMap < QString, QString > & protocol_details );
//void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_post_processing( QMap < QString, QString > & );
void close_everything( void );
void reset_live_update_passed( void );
+ void processes_stopped( void );
};
@@ -330,6 +333,8 @@
bool us_mode_bool;
QMessageBox * msg_expsetup;
+ QMessageBox * msg_liveupdate_finishing;
+
QDialog * diag_expsetup;
//QList< QStringList > autoflowdata;
@@ -393,8 +398,11 @@
void define_new_experiment( QStringList & );
void delete_psql_record( int );
- //void update_autoflow_data( void );
+ void liveupdate_stopped( void );
+
+ void show_liveupdate_finishing_msg( void );
+
signals:
void pass_to_live_update( QMap < QString, QString > & protocol_details );
//void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 06:01:38 UTC (rev 2825)
@@ -45,8 +45,6 @@
#define DbgLv(a) if(dbg_level>=a)qDebug()
#endif
-//ALEXEY: reverted, based on v2802
-
// DialBox
DialBox::DialBox( QWidget *parent ):
QWidget( parent )
@@ -243,10 +241,12 @@
rlt_id = 0;
currentDir = "";
in_reload_auto = false;
+ finishing_live_update = false;
in_reload_all_data = false;
in_reload_data_init = false;
in_reload_check_sysdata = false;
-
+ in_reload_end_processes = false;
+
ElapsedTimeOffset = 0;
//ALEXEY: new way
@@ -1164,6 +1164,12 @@
le_runID ->setText( runID );
//le_dbhost ->setText( xpnhost + ":" + xpnport + " (" + xpndesc + ")" ); //New
+ //Also clear Wavelengths && Lambda ranges:
+ cb_pltrec ->disconnect();
+ cb_pltrec ->clear();
+ le_lrange ->setText("");
+
+
pb_loadXpn ->setEnabled( true );
pb_loadAUC ->setEnabled( true );
pb_details ->setEnabled( false );
@@ -1230,9 +1236,14 @@
le_elapsed ->setText("00:00:00");
le_remaining->setText("00:00:00");
le_running ->setText("00:00:00");
-
+
connect( cb_cellchn, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT ( changeCellCh( ) ) );
+ this, SLOT ( changeCellCh( ) ) );
+
+ connect( cb_pltrec, SIGNAL( currentIndexChanged( int ) ),
+ this, SLOT ( changeRecord( ) ) );
+
+
// connect( plot, SIGNAL( zoomedCorners( QRectF ) ),
// this, SLOT ( currentRectf ( QRectF ) ) );
@@ -1248,6 +1259,8 @@
xpn_data->clear();
le_status->setText( tr( "(no data loaded)" ) );
+ runID = "";
+ data_plot->setTitle( tr( "Intensity Data" ) );
}
// Slot to read all Optima machines <------------------------------- // New
@@ -1536,8 +1549,8 @@
int dbport = xpnport.toInt();
if ( xpn_data->connect_data( dbhost, dbport, xpnname, xpnuser, xpnpasw ) )
{
- if ( dbg_level > 0 )
- xpn_data->dump_tables();
+ // if ( dbg_level > 0 )
+ // xpn_data->dump_tables();
// Implement: query ExperiementRun and based on ExpID build array of RunIDs, find the bigger (the latest) and call it RunID_to_retrieve
RunID_to_retrieve = QString::number(xpn_data->get_runid( ExpID_to_use ));
@@ -1582,6 +1595,17 @@
msg_data_avail->accept();
//msg_data_avail->close();
//ok_msg_data->click();
+
+ //ALEXEY: make sure ExpID is coupled to the RunID which is already in the autoflow DB
+ if ( !runID_passed.isEmpty() || runID_passed != "NULL" )
+ {
+ if ( runID_passed.toInt() != RunID_to_retrieve.toInt() )
+ {
+ RunID_to_retrieve = runID_passed;
+ qDebug() << "Correcting RunID to : " << RunID_to_retrieve;
+ }
+ }
+
//ALEXEY: need to update 'autoflow' table with the unique RunID_to_retrieve && Start Run Time fields !!!
//Conditional: Do it ONLY once !!!
@@ -1618,7 +1642,7 @@
time_data.clear();
// Check if all triple info is available
- timer_all_data_avail = new QTimer;
+ //timer_all_data_avail = new QTimer;
connect(timer_all_data_avail, SIGNAL(timeout()), this, SLOT( retrieve_xpn_raw_auto ( ) ));
timer_all_data_avail->start(5000); // 5 sec
@@ -1942,10 +1966,10 @@
qApp->processEvents();
qDebug() << "SYS_STAT: After replot(), BEFORE CheExpStat!! ";
-
+
int exp_status = CheckExpComplete_auto( RunID_to_retrieve );
- if ( exp_status == 5 || exp_status == 0 )
+ if ( exp_status == 55 || exp_status == 10 )
{
if ( exp_status == 0)
experimentAborted = true;
@@ -1986,6 +2010,9 @@
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
reset_auto();
+
+ in_reload_check_sysdata = false;
+
emit experiment_complete_auto( details_at_live_update );
return;
@@ -2079,6 +2106,9 @@
//Query for Optima DB periodically, see if data available
void US_XpnDataViewer::check_for_data( QMap < QString, QString > & protocol_details)
{
+ //Also reset the panel before reattachement
+ //reset_auto();
+
xpn_data->setEtimOffZero(); //ALEXEY: intialize etimoff to zero for the first time
experimentAborted = false;
@@ -2102,7 +2132,13 @@
details_at_live_update = protocol_details;
selectOptimaByName_auto( OptimaName ); //New
-
+
+ //ALEXEY: just define all QTimers here for later safe stopping
+ timer_all_data_avail = new QTimer;
+ timer_data_reload = new QTimer;
+ timer_end_processes = new QTimer;
+
+
timer_data_init = new QTimer;
connect(timer_data_init, SIGNAL(timeout()), this, SLOT( load_xpn_raw_auto( ) ));
timer_data_init->start(5000); // 5 sec
@@ -2143,7 +2179,16 @@
}
}
+
// Reset LIVE UPDATE panel && stop timers && quit threads
+void US_XpnDataViewer::reset_liveupdate_panel_public ( void )
+{
+ finishing_live_update = true;
+ reset_liveupdate_panel();
+}
+
+
+// Reset LIVE UPDATE panel && stop timers && quit threads
void US_XpnDataViewer::reset_liveupdate_panel ( void )
{
//Quit sys_thread, emit finished() to stop timer_check_sysdata from withing thread
@@ -2158,6 +2203,8 @@
{
timer_check_sysdata->stop();
disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_check_sysdata";
}
//Stop other timers if active
@@ -2165,18 +2212,24 @@
{
timer_all_data_avail->stop();
disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_all_data_avail";
}
if ( timer_data_reload->isActive() )
{
timer_data_reload->stop();
disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_data_reload";
}
if ( timer_data_init->isActive() )
{
timer_data_init->stop();
disconnect(timer_data_init, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_data_init";
}
qApp->processEvents();
@@ -2197,20 +2250,59 @@
if ( !timer_data_reload->isActive() )
qDebug() << "QTimer timer_data_reload STOPPED by clickig Manage Optima runs !!! ";
/*************************************/
-
- reset_auto();
- qDebug() << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+ qDebug() << "BEFORE: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
- in_reload_auto = false;
- in_reload_all_data = false;
- in_reload_data_init = false;
- in_reload_check_sysdata = false;
+ //ALEXEY: should wait for execution of all below variables to be false (end of all timer functions) BEFORE reset_all();
+ // Introduce QTimer which checks for all abpve vartibales to be false (check all related functions to always reset them to false on completion)
+ // Put reset_auto() into the timer && and stop/disconnect timer from within connected SLOT.
+ //timer_end_processes = new QTimer;
+ connect(timer_end_processes, SIGNAL(timeout()), this, SLOT( end_processes ( ) ));
+ timer_end_processes->start(1000); // 5 sec
qApp->processEvents();
}
+//to end all existing update processes
+void US_XpnDataViewer::end_processes( void )
+{
+ qDebug() << "In the END process: in_reload_end_processes = " << in_reload_end_processes;
+
+ if ( in_reload_end_processes ) // If already doing a reload,
+ return; // skip starting a new one
+
+ in_reload_end_processes = true; // Flag in the midst of a reload
+
+ qDebug() << "Checking if processes STOPPED.";
+ qDebug() << "MIDDLE: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+
+ if ( !in_reload_auto && !in_reload_all_data && !in_reload_data_init && !in_reload_check_sysdata )
+ {
+
+ timer_end_processes->stop();
+ disconnect(timer_end_processes, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ //ALEXEY: may not be needed
+ qDebug() << "LIVE UPDATE panel has been reset!";
+ qDebug() << "AFTER: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+
+ reset_auto();
+ qApp->processEvents();
+
+ in_reload_end_processes = false;
+
+ emit liveupdate_processes_stopped();
+
+ //in_reload_end_processes = false;
+ }
+ else
+ {
+ in_reload_end_processes = false;
+ qApp->processEvents();
+ }
+}
+
+
//void US_XpnDataViewer::retrieve_xpn_raw_auto( QString & RunID )
void US_XpnDataViewer::retrieve_xpn_raw_auto( void )
{
@@ -2499,7 +2591,7 @@
qDebug() << "TripleNumber, ntriple " << TripleNumber.toInt() << ", " << ntriple;
//ALEXEY: Add Exp. Abortion Exception HERE...
- if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
+ if ( CheckExpComplete_auto( RunID_to_retrieve ) == 10 ) //ALEXEY should be == 3 as per documentation
{
qDebug() << "ABORTION IN EARLY STAGE...";
@@ -2514,70 +2606,32 @@
updateautoflow_record_atLiveUpdate();
reset_auto();
+
+ in_reload_all_data = false;
+
emit experiment_complete_auto( details_at_live_update );
return;
}
}
+
- // //ALEXEY: Add Exp. Abortion Exception HERE...
- // if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
- // {
- // experimentAborted = true;
-
- // timer_all_data_avail->stop();
- // disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
-
- // if ( !timer_check_sysdata->isActive() ) // Check if sys_data Timer is stopped
- // {
- // // Ask if data retrived so far should be saved:
-
- // QMessageBox msgBox;
- // msgBox.setText(tr("Experiment was aborted!"));
- // msgBox.setInformativeText("The data retrieved so far can be saved or disregarded. If saved, the program will proceed to the next stage (Editing). Otherwise, it will return to the initial stage (Experiment), all data will be lost.");
- // msgBox.setWindowTitle(tr("Experiment Abortion"));
- // QPushButton *Save = msgBox.addButton(tr("Save Data"), QMessageBox::YesRole);
- // QPushButton *Ignore = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
-
- // msgBox.setIcon(QMessageBox::Question);
- // msgBox.exec();
-
- // if (msgBox.clickedButton() == Save)
- // {
- // export_auc_auto();
-
- // QString mtitle_complete = tr( "Complete!" );
- // QString message_done = tr( "Experiment was completed. Optima data saved..." );
- // QMessageBox::information( this, mtitle_complete, message_done );
-
- // updateautoflow_record_atLiveUpdate();
- // emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- // return;
- // }
-
- // else if (msgBox.clickedButton() == Ignore)
- // {
- // reset();
- // delete_autoflow_record();
- // emit return_to_experiment( ProtocolName );
- // return;
- // }
- // }
- // }
-
-
if ( cellchans.count() == CellChNumber.toInt() && ntriple == TripleNumber.toInt() ) // <--- Change to the values from the protocol
{
//stop timer
timer_all_data_avail->stop();
disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+
+ in_reload_all_data = false;
// Auto-update hereafter
- timer_data_reload = new QTimer;
- connect(timer_data_reload, SIGNAL(timeout()), this, SLOT( reloadData_auto( ) ));
- timer_data_reload->start(10000); // 5 sec
+ //timer_data_reload = new QTimer;
- in_reload_all_data = false;
+ if ( !finishing_live_update )
+ {
+ connect(timer_data_reload, SIGNAL(timeout()), this, SLOT( reloadData_auto( ) ));
+ timer_data_reload->start(10000); // 5 sec
+ }
}
in_reload_all_data = false;
@@ -3081,9 +3135,9 @@
// Make sure ranges are set up, then build an averaged data vector
compute_ranges();
-//DbgLv(1) << "PltA: kpoint" << kpoint << "datsize" << curr_adata.size();
-DbgLv(1) << "PltA: kpoint" << kpoint << "trpxs" << trpxs
- << "nscan" << nscan << allData[trpxs].scanCount();
+ // DbgLv(1) << "PltA: kpoint" << kpoint << "datsize" << curr_adata.size();
+ DbgLv(1) << "PltA: kpoint" << kpoint << "trpxs" << trpxs;
+// << "nscan" << nscan << allData[trpxs].scanCount();
// Build the X,Y vectors
QVector< double > rvec( kpoint );
QVector< double > vvec( kpoint );
@@ -3907,7 +3961,7 @@
/*** Check Experiement Status: if completed, kill the timer, export the data into AUC format, return, signal to switch panels in US_comproject ***/
int statusExp = CheckExpComplete_auto( RunID_to_retrieve );
- if ( statusExp == 5 || statusExp == 0 )
+ if ( statusExp == 55 || statusExp == 10 )
{
if ( statusExp == 0 )
experimentAborted = true;
@@ -3929,8 +3983,11 @@
// QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
+
reset_auto();
-
+
+ in_reload_auto = false;
+
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
emit experiment_complete_auto( details_at_live_update );
@@ -3939,54 +3996,11 @@
}
- // /** Experiment Aborted ***/
-
- // if ( statusExp == 0 ) //ALEXEY should be == 3 as per documentation
- // {
- // experimentAborted = true;
-
- // timer_data_reload->stop();
- // disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
-
- // if ( !timer_check_sysdata->isActive() ) // Check if sys_data Timer is stopped
- // {
- // // Ask if data retrived so far should be saved:
-
- // QMessageBox msgBox;
- // msgBox.setText(tr("Experiment was aborted!"));
- // msgBox.setInformativeText("The data retrieved so far can be saved or disregarded. If saved, the program will proceed to the next stage (Editing). Otherwise, it will return to the initial stage (Experiment), all data will be lost.");
- // msgBox.setWindowTitle(tr("Experiment Abortion"));
- // QPushButton *Save = msgBox.addButton(tr("Save Data"), QMessageBox::YesRole);
- // QPushButton *Ignore = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
-
- // msgBox.setIcon(QMessageBox::Question);
- // msgBox.exec();
-
- // if (msgBox.clickedButton() == Save)
- // {
- // export_auc_auto();
-
- // QString mtitle_complete = tr( "Complete!" );
- // QString message_done = tr( "Experiment was completed. Optima data saved..." );
- // QMessageBox::information( this, mtitle_complete, message_done );
-
- // updateautoflow_record_atLiveUpdate();
- // emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- // return;
- // }
-
- // else if (msgBox.clickedButton() == Ignore)
- // {
- // reset();
- // delete_autoflow_record();
- // emit return_to_experiment( ProtocolName );
- // return;
- // }
- // }
- // }
-
-
+
in_reload_auto = false; // Flag no longer in the midst of reload
+
+ qDebug() << "Exit from reloaData with no change!";
+
return; // Return with no change in AUC data
}
double tm1=(double)sttime.msecsTo(QDateTime::currentDateTime())/1000.0;
@@ -4014,7 +4028,10 @@
// Do resets and re-plot the current triple
changeCellCh();
+
in_reload_auto = false; // Flag no longer in the midst of reload
+
+ qDebug() << "Exit from reloaData with SOME change!";
}
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-27 06:01:38 UTC (rev 2825)
@@ -25,8 +25,6 @@
#include "us_xpn_run_auc.h"
-//ALEXEY: reverted, based on v2802
-
class SpeedoMeter: public QwtDial
{
@@ -97,6 +95,8 @@
// New constructor for automated read/upload/update
US_XpnDataViewer(QString auto_mode);
+ void reset_liveupdate_panel_public ( void );
+
private:
bool auto_mode_bool;
@@ -250,11 +250,14 @@
bool haveData;
bool haveTmst;
bool in_reload;
+
bool in_reload_auto;
+ bool finishing_live_update;
bool in_reload_data_init;
bool in_reload_all_data;
bool in_reload_check_sysdata;
+ bool in_reload_end_processes;
double last_xmin;
@@ -269,6 +272,8 @@
QTimer* timer_all_data_avail;
QTimer* timer_check_sysdata;
+ QTimer* timer_end_processes;
+
QElapsedTimer* elapsed_timer;
QTimer* timer_sys_thread;
@@ -310,6 +315,7 @@
//void retrieve_xpn_raw_auto ( QString & );
void retrieve_xpn_raw_auto ( void );
+ void end_processes ( void );
void reloadData_auto ( void );
int CheckExpComplete_auto( QString & );
void update_autoflow_runId_timeStarted( void );
@@ -367,6 +373,7 @@
void return_to_experiment( QString & );
void close_program( void );
+ void liveupdate_processes_stopped( void );
};
#endif
1
0
Aug. 24, 2019
Author: gegorbet
Date: 2019-08-24 13:08:23 +0000 (Sat, 24 Aug 2019)
New Revision: 2824
Modified:
trunk/doc/manual/dens_match.body
trunk/gui/
trunk/programs/us/
trunk/utils/
Log:
minor density_matching doc fixes
Modified: trunk/doc/manual/dens_match.body
===================================================================
--- trunk/doc/manual/dens_match.body 2019-08-21 14:44:39 UTC (rev 2823)
+++ trunk/doc/manual/dens_match.body 2019-08-24 13:08:23 UTC (rev 2824)
@@ -88,11 +88,11 @@
<li>
<b>Plot X:</b> Select the plot to currently be displayed by
- selected its X axis:
+ selecting its X axis:
<ul>
<li> <b>s</b> Sedimentation coefficient. </li>
<li> <b>D</b> Diffusion coefficient. </li>
- <li> <b>vbar</b> Partial specific density. </li>
+ <li> <b>vbar</b> Partial specific volume. </li>
<li> <b>m.mass</b> Molar Mass. </li>
<li> <b>ff0</b> Frictional ratio. </li>
<li> <b>Rh</b> Hydrodynamic radius. </li>
@@ -101,9 +101,9 @@
<li>
<b>Diffusion Coefficient Averaging:</b> Select the means of averaging
- diffusion coefficients at each boundard fraction, across models:
+ diffusion coefficients at each boundary fraction, across models:
<ul>
- <li> <b>none</b> No averaging (use 0-percent model's value). </li>
+ <li> <b>none</b> No averaging (maintain individual model D values). </li>
<li> <b>simple</b> Simple averaging. </li>
<li> <b>weighted</b> Weighted averaging, using concentrations. </li>
</ul>
Index: trunk/gui
===================================================================
--- trunk/gui 2019-08-21 14:44:39 UTC (rev 2823)
+++ trunk/gui 2019-08-24 13:08:23 UTC (rev 2824)
Property changes on: trunk/gui
___________________________________________________________________
Modified: svn:ignore
## -1,9 +1,4 ##
+Makefile
+moc
obj
-moc
-Makefile*
-qrc_images.cpp
-*.Release
-*.Debug
-*.rc
-release
-debug
+.qmake.stash
Index: trunk/programs/us
===================================================================
--- trunk/programs/us 2019-08-21 14:44:39 UTC (rev 2823)
+++ trunk/programs/us 2019-08-24 13:08:23 UTC (rev 2824)
Property changes on: trunk/programs/us
___________________________________________________________________
Modified: svn:ignore
## -1,5 +1,4 ##
+Makefile
+moc
obj
-moc
-Makefile*
-us_revision.h
-*.rc
+.qmake.stash
Index: trunk/utils
===================================================================
--- trunk/utils 2019-08-21 14:44:39 UTC (rev 2823)
+++ trunk/utils 2019-08-24 13:08:23 UTC (rev 2824)
Property changes on: trunk/utils
___________________________________________________________________
Modified: svn:ignore
## -1,6 +1,4 ##
+Makefile
moc
obj
-Makefile*
-*.Debug
-*.Release
-*.rc
+.qmake.stash
1
0
Author: gegorbet
Date: 2019-08-21 14:44:39 +0000 (Wed, 21 Aug 2019)
New Revision: 2823
Added:
trunk/doc/manual/cfa_viewer.body
trunk/doc/manual/images/cfa_view-loadauc.png
trunk/doc/manual/images/cfa_view-loadraw.png
trunk/doc/manual/images/cfa_view-main.png
trunk/doc/manual/images/cfa_view-statsauc.png
trunk/doc/manual/images/cfa_view-statsraw.png
Modified:
trunk/doc/manual/manual.qhp
trunk/doc/manual/template.img.body
Log:
eliminate doc/manual make warnings by adding cfa* files
Added: trunk/doc/manual/cfa_viewer.body
===================================================================
--- trunk/doc/manual/cfa_viewer.body (rev 0)
+++ trunk/doc/manual/cfa_viewer.body 2019-08-21 14:44:39 UTC (rev 2823)
@@ -0,0 +1,55 @@
+[% INCLUDE header.us3/
+ title = 'UltraScan III CFA Viewer'
+%]
+
+ <h2> <i>UltraScan</i> CFA Viewer:</h2>
+
+ <p>
+ AUC data collected with the CFA analytical ultracentrifuge can be viewed
+ and exported to openAUC format for import to UltraScan with this
+ application.
+ </p> <p>
+ ( MANUAL ENTRY UNDER CONSTRUCTION )
+ </p>
+
+ <h3> Main Window:</h3>
+ <p>
+ <img src="images/cfa_view-main.png" alt="CFA Viewer Main Window"/>
+ </p>
+
+ <h3> Dialog Items:</h3>
+
+ <ul>
+ <li>
+ <b>(CFA data directory)</b>: Documentation of the local directory in
+ which CFA data resides.
+ </li>
+
+ <li>
+ <b>Load Raw CFA Data</b>: Open a
+ <a href="cfa_view-loadraw.img.html">Load Raw CFA dialog</a>
+ </li>
+
+ <li>
+ <b>Load US3 AUC Data</b>: Open a
+ <a href="cfa_view-loadauc.img.html">Load AUC-from-CFA dialog</a>
+ </li>
+
+ <li>
+ <b>Data Details</b>: Open a
+ <a href="cfa_view-statsraw.img.html">Raw CFA Statistics text dialog</a>
+ or a
+ <a href="cfa_view-statsauc.img.html">AUC-from-CFA Statistics text dialog</a>,
+ depending on the type of data loaded.
+ </li>
+
+ <li>
+ <b>Help</b> Display this documentation.
+ </li>
+
+ <li>
+ <b>Close</b> Exit the application.
+ </li>
+ </ul>
+
+[% INCLUDE footer.us3 %]
Property changes on: trunk/doc/manual/cfa_viewer.body
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+LastChangedDate Author
\ No newline at end of property
Added: trunk/doc/manual/images/cfa_view-loadauc.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/cfa_view-loadauc.png
===================================================================
--- trunk/doc/manual/images/cfa_view-loadauc.png 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/images/cfa_view-loadauc.png 2019-08-21 14:44:39 UTC (rev 2823)
Property changes on: trunk/doc/manual/images/cfa_view-loadauc.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/cfa_view-loadraw.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/cfa_view-loadraw.png
===================================================================
--- trunk/doc/manual/images/cfa_view-loadraw.png 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/images/cfa_view-loadraw.png 2019-08-21 14:44:39 UTC (rev 2823)
Property changes on: trunk/doc/manual/images/cfa_view-loadraw.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/cfa_view-main.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/cfa_view-main.png
===================================================================
--- trunk/doc/manual/images/cfa_view-main.png 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/images/cfa_view-main.png 2019-08-21 14:44:39 UTC (rev 2823)
Property changes on: trunk/doc/manual/images/cfa_view-main.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/cfa_view-statsauc.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/cfa_view-statsauc.png
===================================================================
--- trunk/doc/manual/images/cfa_view-statsauc.png 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/images/cfa_view-statsauc.png 2019-08-21 14:44:39 UTC (rev 2823)
Property changes on: trunk/doc/manual/images/cfa_view-statsauc.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/cfa_view-statsraw.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/cfa_view-statsraw.png
===================================================================
--- trunk/doc/manual/images/cfa_view-statsraw.png 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/images/cfa_view-statsraw.png 2019-08-21 14:44:39 UTC (rev 2823)
Property changes on: trunk/doc/manual/images/cfa_view-statsraw.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Modified: trunk/doc/manual/manual.qhp
===================================================================
--- trunk/doc/manual/manual.qhp 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/manual.qhp 2019-08-21 14:44:39 UTC (rev 2823)
@@ -412,6 +412,10 @@
<file>2dsa_resplot.img.html</file>
<file>analyte_details.img.html</file>
<file>buffer_info.img.html</file>
+ <file>cfa_view-loadraw.img.html</file>
+ <file>cfa_view-loadauc.img.html</file>
+ <file>cfa_view-statsraw.img.html</file>
+ <file>cfa_view-statsauc.img.html</file>
<file>ddist_combine-selrun.img.html</file>
<file>fit_men-editupd.img.html</file>
<file>fit_men-load.img.html</file>
Modified: trunk/doc/manual/template.img.body
===================================================================
--- trunk/doc/manual/template.img.body 2019-08-20 22:09:03 UTC (rev 2822)
+++ trunk/doc/manual/template.img.body 2019-08-21 14:44:39 UTC (rev 2823)
@@ -27,11 +27,11 @@
<p>This document is part of the <i><b>UltraScan</b></i> Software
Documentation distribution. </p>
- <p>Copyright © 1989—2016 <a href=
- "mailto:demeler@biochem.uthscsa.edu">Borries Demeler</a>, Ph.D.<br/>
- Copyright © 1997—2016 <a href="http://www.uthscsa.edu">The University
- of Texas Health Science Center at San Antonio</a><br/>
- All rights reserved.</p>
+ <p>Copyright © 1989—2019 <a href=
+ "mailto:borries.demeler@umontana.edu">Borries Demeler</a>, Ph.D.<br/>
+ Copyright © 1997—2019
+ <a href="http://www.ultrascan.aucsolutions.com">
+ The University of Texas System</a><br/> All rights reserved.</p>
<p>UltraScan is free software; you can redistribute it and/or modify it
under the terms of the <a href="http://www.gnu.org/licenses/lgpl.html"
1
0
r2822 - in trunk: doc/manual doc/manual/images programs/us_density_match
by svn@svn.aucsolutions.com Aug. 20, 2019
by svn@svn.aucsolutions.com Aug. 20, 2019
Aug. 20, 2019
Author: gegorbet
Date: 2019-08-20 22:09:03 +0000 (Tue, 20 Aug 2019)
New Revision: 2822
Added:
trunk/doc/manual/dens_match.body
trunk/doc/manual/dens_match_mparam.body
trunk/doc/manual/dens_match_rmvmods.body
trunk/doc/manual/images/densmatch_main.png
trunk/doc/manual/images/densmatch_mpars_completed.png
trunk/doc/manual/images/densmatch_mpars_empty.png
trunk/doc/manual/images/densmatch_rmvmodels.png
Modified:
trunk/doc/manual/index.body
trunk/doc/manual/manual.qhp
trunk/programs/us_density_match/us_density_match.cpp
trunk/programs/us_density_match/us_density_match.h
trunk/programs/us_density_match/us_remove_models.h
Log:
density_matching: cleanup unused pars, info after all-model remove, new help files
Added: trunk/doc/manual/dens_match.body
===================================================================
--- trunk/doc/manual/dens_match.body (rev 0)
+++ trunk/doc/manual/dens_match.body 2019-08-20 22:09:03 UTC (rev 2822)
@@ -0,0 +1,145 @@
+[% INCLUDE header.us3/
+ title = 'UltraScan III Density Matching'
+%]
+
+ <h2> <i>UltraScan</i> Density Matching:</h2>
+
+ <p>
+ Density Matching experiments are used to determine the partial specific
+ volume of colloidal particles by repeating the velocity experiment in a
+ range of buffers with a different density, but identical chemical
+ properties. Here it is important that the ionic strength and pH stay
+ constant. This is most easily accomplished by using D2O (heavy water)
+ which has mostly the same chemical properties as light water. The change
+ in buoyancy incurred when changing the density of the solvent causes a
+ change in sedimentation speed, which can be measured. The change is
+ proportional to the density of the analyte. Density matching experiments
+ exploit this difference.
+ </p> <p>
+ It is recommended that users of this technique measure sedimentation
+ velocity experiments in 4-6 different D2O concentrations, including one
+ buffer that does not have any D2O in it (just light water). Finite
+ element models from these experiments are imported into this program
+ to elucidate the partial specific volume distribution for the entire
+ solution mixture.
+ </p>
+
+ <h3> Main Window:</h3>
+ <p>
+ <img src="images/densmatch_main.png" alt="Density Matching Main Window"/>
+ </p>
+
+ <h3> Dialog Items:</h3>
+
+ <ul>
+ <li>
+ <b>Database</b>: Select to choose models from the database.
+ </li>
+
+ <li>
+ <b>Local Disk</b>: Select to choose models from files on the
+ local disk.
+ </li>
+
+ <li>
+ <b>(prefilter text)</b>: Brief information about PreFilter
+ selection(s) made.
+ </li>
+
+ <li>
+ <b>Select PreFilter</b>: Open a
+ <a href="select_runs.html">Models Pre-Filter dialog</a>
+ to select Run IDs on which to pre-filter lists of models
+ for loading.
+ </li>
+
+ <li>
+ <b>Load Distribution(s)</b>: Load model distribution data
+ to use in density matching, as specified through a
+ <a href="load_model_distrib.html">Model Loader dialog</a>
+ </li>
+
+ <li>
+ <b>Remove Distribution(s)</b>: Open a
+ <a href="dens_match_rmvmods.html">Remove Models dialog</a>
+ to pare down the list of selected models.
+ </li>
+
+ <li>
+ <b>Refresh Plot</b>: Force a re-plot of the currently selected
+ plot type.
+ </li>
+
+ <li>
+ <b>Reset</b>: Clear PreFilter and Distribution selection data.
+ </li>
+
+ <li>
+ <b>Set Model Parameters</b>: Open a
+ <a href="dens_match_mparam.html">Model Parameters dialog</a>
+ to associate D20_Percent, Density, Label values with each model.
+ </li>
+
+ <li>
+ <b>Save</b>: Generate CSV spreadsheet files and PNG plot files
+ for all plot types and save them locally to a runID subdirectory
+ of the */ultrascan/reports directory.
+ </li>
+
+ <li>
+ <b>Plot X:</b> Select the plot to currently be displayed by
+ selected its X axis:
+ <ul>
+ <li> <b>s</b> Sedimentation coefficient. </li>
+ <li> <b>D</b> Diffusion coefficient. </li>
+ <li> <b>vbar</b> Partial specific density. </li>
+ <li> <b>m.mass</b> Molar Mass. </li>
+ <li> <b>ff0</b> Frictional ratio. </li>
+ <li> <b>Rh</b> Hydrodynamic radius. </li>
+ </ul>
+ </li>
+
+ <li>
+ <b>Diffusion Coefficient Averaging:</b> Select the means of averaging
+ diffusion coefficients at each boundard fraction, across models:
+ <ul>
+ <li> <b>none</b> No averaging (use 0-percent model's value). </li>
+ <li> <b>simple</b> Simple averaging. </li>
+ <li> <b>weighted</b> Weighted averaging, using concentrations. </li>
+ </ul>
+ </li>
+
+ <li>
+ <b>(Distribution Information text box)</b> Information about Run and
+ Model Distributions currently being used.
+ </li>
+
+ <li>
+ <b>Divisions:</b> Set the number of boundary fraction divisions to use.
+ </li>
+
+ <li>
+ <b>% of Boundary:</b> Set the extent in boundary percent over which
+ plot values are computed and plotted.
+ </li>
+
+ <li>
+ <b>Boundary Position (%):</b> Set the starting boundary percent.
+ </li>
+
+ <li>
+ <b>Data Smoothing:</b> Set the number of smoothing points to use
+ in curves displayed.
+ </li>
+
+
+ <li>
+ <b>Help</b> Display this documentation.
+ </li>
+
+ <li>
+ <b>Close</b> Exit the application.
+ </li>
+ </ul>
+
+[% INCLUDE footer.us3 %]
Property changes on: trunk/doc/manual/dens_match.body
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+LastChangedDate Author
\ No newline at end of property
Added: trunk/doc/manual/dens_match_mparam.body
===================================================================
--- trunk/doc/manual/dens_match_mparam.body (rev 0)
+++ trunk/doc/manual/dens_match_mparam.body 2019-08-20 22:09:03 UTC (rev 2822)
@@ -0,0 +1,76 @@
+[% INCLUDE header.us3/
+ title = 'UltraScan III Density Matching Model Parameters'
+%]
+
+ <h2> <i>UltraScan</i> Model Parameters:</h2>
+
+ <p> An option in <b><i>UltraScan III US_Density_Match</i></b>, this dialog
+ allows specifying parameters associated with each model distribution.</p>
+
+ <p> The dialog presents a row for each model selected in the calling
+ Density Matching main window. In each model row, the user may add or
+ change the value for (1) D2O (heavy water) percent; (2) density; or
+ (3) model label. After setting all percent values, the Compute Densities
+ button causes computation of the densities for non-zero-percent models,
+ based on the zero-percent model density value. Once all model values are
+ set, the Accept button closes the dialog and returns the values associated
+ with each model.
+
+ <h3> Dialog Window:</h3>
+
+ <p> Upon entry, the dialog appears as follows.</p>
+ <p>
+ <img src="images/densmatch_mpars_empty.png" alt="Model Parameters empty"/>
+ </p>
+
+ <p> After completion of parameter setting, the dialog will appear
+ similar to this:</p>
+ <p>
+ <img src="images/densmatch_mpars_completed.png" alt="Model Parameters completed"/>
+ </p>
+
+ <h3> Dialog Items:</h3>
+
+ <ul>
+ <li>
+ <b>(D2O Percent column)</b>: Text boxes allow setting D2O percent values
+ for each model.
+ </li>
+
+ <li>
+ <b>(Density (g/l) column)</b>: Text boxes allow setting density values in grams
+ per liter for each model. Initial values are computed and often need not
+ be manually changed by the user.
+ </li>
+
+ <li>
+ <b>(Label column)</b>: Text boxes allow setting labels for each model that
+ are used in the Legend of each plot.
+ </li>
+
+ <li>
+ <b>(Description column)</b>: Read-only text boxes display the description text
+ associated with each model.
+ </li>
+
+ <li>
+ <b>Help</b>: Display this documentation.
+ </li>
+
+ <li>
+ <b>Cancel</b>: Exit this dialog without returning parameter values
+ to the caller.
+ </li>
+
+ <li>
+ <b>Accept</b>: Exit this dialog and return parameter values
+ to the caller.
+ </li>
+
+ <li>
+ <b>Compute Densities</b>: Compute densities values for all models with
+ non-zero D2O percent values .
+ </li>
+ </ul>
+
+[% INCLUDE footer.us3 %]
Property changes on: trunk/doc/manual/dens_match_mparam.body
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+LastChangedDate Author
\ No newline at end of property
Added: trunk/doc/manual/dens_match_rmvmods.body
===================================================================
--- trunk/doc/manual/dens_match_rmvmods.body (rev 0)
+++ trunk/doc/manual/dens_match_rmvmods.body 2019-08-20 22:09:03 UTC (rev 2822)
@@ -0,0 +1,52 @@
+[% INCLUDE header.us3/
+ title = 'UltraScan III Density Matching Remove Models'
+%]
+
+ <h2> <i>UltraScan</i> Density Matching Remove Models:</h2>
+
+ <p> An option in <b><i>UltraScan III US_Density_Match</i></b>,
+ this dialog allows the removal of previously selected model
+ distributions.</p>
+
+ <p> The dialog presents a list of models to be used in density
+ matching. One or more items in the list may be selected and a
+ Remove button clicked to pare down the list.</p>
+
+ <h3> Main Window:</h3>
+
+ <img src="images/densmatch_rmvmodels.png" alt="Remove Models Dialog"/>
+
+ <h3> Dialog Items:</h3>
+
+ <ul>
+ <li>
+ <b>(List of Model Distributions)</b> Select one or more of the
+ items in the list.
+ </li>
+
+ <li>
+ <b>Remove</b> Click this button to remove selected models.
+ </li>
+
+ <li>
+ <b>Restore</b> Click this button to restore the models list
+ to its original contents.
+ </li>
+
+ <li>
+ <b>Help</b> Click this button to display this help dialog.
+ </li>
+
+ <li>
+ <b>Cancel</b> Click this button to cancel the dialog and
+ leave the list of models in the same state as it was upon
+ entry.
+ </li>
+
+ <li>
+ <b>Accept</b> Exit this dialog and return with a modified
+ list of models.
+ </li>
+ </ul>
+
+[% INCLUDE footer.us3 %]
Property changes on: trunk/doc/manual/dens_match_rmvmods.body
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+LastChangedDate Author
\ No newline at end of property
Added: trunk/doc/manual/images/densmatch_main.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/densmatch_main.png
===================================================================
--- trunk/doc/manual/images/densmatch_main.png 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/images/densmatch_main.png 2019-08-20 22:09:03 UTC (rev 2822)
Property changes on: trunk/doc/manual/images/densmatch_main.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/densmatch_mpars_completed.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/densmatch_mpars_completed.png
===================================================================
--- trunk/doc/manual/images/densmatch_mpars_completed.png 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/images/densmatch_mpars_completed.png 2019-08-20 22:09:03 UTC (rev 2822)
Property changes on: trunk/doc/manual/images/densmatch_mpars_completed.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/densmatch_mpars_empty.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/densmatch_mpars_empty.png
===================================================================
--- trunk/doc/manual/images/densmatch_mpars_empty.png 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/images/densmatch_mpars_empty.png 2019-08-20 22:09:03 UTC (rev 2822)
Property changes on: trunk/doc/manual/images/densmatch_mpars_empty.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/doc/manual/images/densmatch_rmvmodels.png
===================================================================
(Binary files differ)
Index: trunk/doc/manual/images/densmatch_rmvmodels.png
===================================================================
--- trunk/doc/manual/images/densmatch_rmvmodels.png 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/images/densmatch_rmvmodels.png 2019-08-20 22:09:03 UTC (rev 2822)
Property changes on: trunk/doc/manual/images/densmatch_rmvmodels.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Modified: trunk/doc/manual/index.body
===================================================================
--- trunk/doc/manual/index.body 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/index.body 2019-08-20 22:09:03 UTC (rev 2822)
@@ -75,6 +75,7 @@
<li> <a href="combine_models.html">Create Global Model</a> </li>
<li> <a href="mwlr_viewer.html">Multi-Wavelength Raw Viewer</a> </li>
<li> <a href="cfa_viewer.html">CFA Raw Viewer and Converter</a> </li>
+ <li> <a href="dens_match.html">Density Matching</a> </li>
</ul>
</li>
Modified: trunk/doc/manual/manual.qhp
===================================================================
--- trunk/doc/manual/manual.qhp 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/doc/manual/manual.qhp 2019-08-20 22:09:03 UTC (rev 2822)
@@ -39,6 +39,7 @@
<keyword id="c5" name="create-experiment" ref="experiment_general.html"/>
<keyword id="d1" name="data-loader" ref="data_loader.html"/>
<keyword id="d2" name="ddist-combine" ref="ddist_combine.html"/>
+ <keyword id="d3" name="density-match" ref="dens_match.html"/>
<keyword id="e1" name="edit" ref="us_edit.html"/>
<keyword id="e2" name="equiltime" ref="us_equiltime.html"/>
<keyword id="e3" name="experiment" ref="convert-experiment.html"/>
@@ -262,17 +263,17 @@
<file>images/astfem_sim.png</file>
<file>images/simparams.png</file>
- <file>grid_editor.html</file>
- <file>images/grid_editor.png</file>
- <file>images/grid_editor_mw_view.png</file>
- <file>images/grid_editor_multi_grids.png</file>
- <file>images/grid_editor_multi_grids_sed.png</file>
- <file>images/grid_editor_subgrid1-good.png</file>
- <file>images/grid_editor_subgrid1-bad.png</file>
- <file>images/grid_editor_subgrid2-good.png</file>
- <file>images/grid_editor_subgrid2-bad.png</file>
- <file>images/grid_editor_subgrid3-good.png</file>
- <file>images/grid_editor_subgrid3-bad.png</file>
+ <file>grid_editor.html</file>
+ <file>images/grid_editor.png</file>
+ <file>images/grid_editor_mw_view.png</file>
+ <file>images/grid_editor_multi_grids.png</file>
+ <file>images/grid_editor_multi_grids_sed.png</file>
+ <file>images/grid_editor_subgrid1-good.png</file>
+ <file>images/grid_editor_subgrid1-bad.png</file>
+ <file>images/grid_editor_subgrid2-good.png</file>
+ <file>images/grid_editor_subgrid2-bad.png</file>
+ <file>images/grid_editor_subgrid3-good.png</file>
+ <file>images/grid_editor_subgrid3-bad.png</file>
<file>2dsa.html</file>
<file>2dsa_analys.html</file>
@@ -399,6 +400,14 @@
<file>images/cfa_view-loadraw.png</file>
<file>images/cfa_view-loadauc.png</file>
+ <file>dens_match.html</file>
+ <file>dens_match_mparam.html</file>
+ <file>dens_match_rmvmods.html</file>
+ <file>images/densmatch_main.png</file>
+ <file>images/densmatch_mpars_empty.png</file>
+ <file>images/densmatch_mpars_completed.png</file>
+ <file>images/densmatch_rmvmodels.png</file>
+
<file>2dsa_3dplot.img.html</file>
<file>2dsa_resplot.img.html</file>
<file>analyte_details.img.html</file>
Modified: trunk/programs/us_density_match/us_density_match.cpp
===================================================================
--- trunk/programs/us_density_match/us_density_match.cpp 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/programs/us_density_match/us_density_match.cpp 2019-08-20 22:09:03 UTC (rev 2822)
@@ -67,9 +67,6 @@
// Top banner
QLabel* lb_info1 = us_banner( tr( "Model Selection Controls" ) );
-// us_checkbox( tr( "Save Plot(s)" ), ck_savepl, false );
-// us_checkbox( tr( "Local Save Only" ), ck_locsave, true );
-
// Distribution information text box
te_distr_info = us_textedit();
te_distr_info->setText( tr( "Run: runID.triple (method)\n" )
@@ -190,8 +187,6 @@
spec->addLayout( gl_x_mass, s_row, 2, 1, 2 );
spec->addLayout( gl_x_ff0, s_row, 4, 1, 2 );
spec->addLayout( gl_x_rh, s_row++, 6, 1, 2 );
-// spec->addWidget( ck_savepl, s_row, 0, 1, 4 );
-// spec->addWidget( ck_locsave, s_row++, 4, 1, 4 );
spec->addWidget( lb_di_avg, s_row++, 0, 1, 8 );
spec->addLayout( gl_da_n, s_row, 2, 1, 2 );
spec->addLayout( gl_da_s, s_row, 4, 1, 2 );
@@ -213,7 +208,6 @@
ct_smoothing = us_counter( 2, 1, 100, 1 );
ct_division ->setSingleStep( 1 );
-// ct_division->setEnabled( true );
ct_boundaryPct->setSingleStep( 1 );
ct_boundaryPos->setSingleStep( 1 );
ct_smoothing ->setSingleStep( 1 );
@@ -284,8 +278,6 @@
dataPlotClear( data_plot );
data_plot->replot();
- need_save = false;
-
plot_x = ATTR_V;
alldis .clear();
@@ -408,62 +400,6 @@
QVector< QVector< double > > v_sedcs;
QVector< QVector< double > > v_difcs;
#endif
-#if 0
- //QString dtext = te_distr_info->toPlainText().section( "\n", 0, 1 );
- QString dtext = tr( "Run: " ) + tsys->run_name
- + " (" + tsys->method + ")\n " + tsys->analys_name;
-
- bool sv_plot = ck_savepl->isChecked();
-DbgLv(2) << "(1) sv_plot" << sv_plot;
-
-DbgLv(2) << "(3) need_save sv_plot" << need_save << sv_plot;
- //if ( need_save && sv_plot )
- if ( sv_plot )
- { // Automatically save plot image in a PNG file
- const QString s_attrs[] = { "s", "ff0", "MW", "vbar", "D", "f" };
- QPixmap plotmap = ((QWidget*)data_plot)->grab();
-
- QString runid = tsys->run_name.section( ".", 0, -2 );
- QString triple = tsys->run_name.section( ".", -1, -1 );
- QString report = QString( "pseudo3d_" ) + s_attrs[ plot_x ]
- + "_" + s_attrs[ ATTR_F ];
-
- QString ofdir = US_Settings::reportDir() + "/" + runid;
- QDir dirof( ofdir );
- if ( !dirof.exists( ) )
- QDir( US_Settings::reportDir() ).mkdir( runid );
- QString ofname = tsys->method + "." + triple + "." + report + ".png";
- QString ofpath = ofdir + "/" + ofname;
-
- plotmap.save( ofpath );
- dtext = dtext + tr( "\nPLOT %1 SAVED to local" )
- .arg( curr_distr + 1 );
-
- if ( dkdb_cntrls->db() && !ck_locsave->isChecked() )
- { // Save a copy to the database
-QDateTime time0=QDateTime::currentDateTime();
- US_Passwd pw;
- US_DB2 db( pw.getPasswd() );
- QStringList query;
- query << "get_editID" << tsys->editGUID;
- db.query( query );
- db.next();
- int idEdit = db.value( 0 ).toString().toInt();
- US_Report freport;
- freport.runID = runid;
- freport.saveDocumentFromFile( ofdir, ofname, &db, idEdit );
-QDateTime time1=QDateTime::currentDateTime();
-qDebug() << "DB-save: currdist" << curr_distr
- << "svtime:" << time0.msecsTo(time1);
- dtext = dtext + tr( " and DB" );
- }
- }
-
- else
- dtext = dtext + tr( "\n(no plot saved)" );
-
- te_distr_info->setText( dtext );
-#endif
}
// Plot the data
@@ -479,23 +415,6 @@
DbgLv(1) << "DaPl: plot_x" << plot_x;
#if 0
-auto_sxy=true;
- if ( auto_sxy )
- { // Auto scale x and y
- data_plot->setAxisAutoScale( QwtPlot::yLeft );
- data_plot->setAxisAutoScale( QwtPlot::xBottom );
- }
- else
- { // Manual limits on x and y
- double lStep = data_plot->axisStepSize( QwtPlot::yLeft );
- double bStep = data_plot->axisStepSize( QwtPlot::xBottom );
- data_plot->setAxisScale( QwtPlot::xBottom, plt_smin, plt_smax, bStep );
- data_plot->setAxisScale( QwtPlot::yLeft, plt_kmin, plt_kmax, lStep );
- }
-#endif
-
-
-#if 0
QVector< double > v_bfracs;
QVector< double > v_vbars;
QVector< double > v_mmass;
@@ -642,67 +561,6 @@
plot_x = plot_x_select();
}
-void US_Density_Match::update_resolu( double dval )
-{
- resolu = dval;
-}
-
-void US_Density_Match::update_xreso( double dval )
-{
- xreso = dval;
-}
-
-void US_Density_Match::update_yreso( double dval )
-{
- yreso = dval;
-}
-
-void US_Density_Match::update_curr_distr( double dval )
-{
- curr_distr = qRound( dval ) - 1;
-DbgLv(1) << "upd_curr_distr" << curr_distr;
-}
-
-void US_Density_Match::update_plot_smin( double dval )
-{
- plt_smin = dval;
-DbgLv(1) << "plt_smin" << plt_smin;
-}
-
-void US_Density_Match::update_plot_smax( double dval )
-{
- plt_smax = dval;
-DbgLv(1) << "plt_smax" << plt_smax;
-}
-
-void US_Density_Match::update_plot_kmin( double dval )
-{
- plt_kmin = dval;
-}
-
-void US_Density_Match::update_plot_kmax( double dval )
-{
- plt_kmax = dval;
-}
-
-void US_Density_Match::select_autosxy()
-{
- auto_sxy = ck_autosxy->isChecked();
- ct_plt_kmin->setEnabled( !auto_sxy );
- ct_plt_kmax->setEnabled( !auto_sxy );
- ct_plt_smin->setEnabled( !auto_sxy );
- ct_plt_smax->setEnabled( !auto_sxy );
-
- set_limits();
-}
-
-void US_Density_Match::select_autoscz()
-{
- auto_scz = ck_autoscz->isChecked();
-
- set_limits();
-}
-
// Load all the distributions (models)
void US_Density_Match::load_distro()
{
@@ -721,8 +579,6 @@
if ( dialog.exec() != QDialog::Accepted )
return; // no selection made
- need_save = false;
-
te_distr_info->setText(
QString( models[ 0 ].description ).section( ".", 0, -4 ) );
@@ -731,8 +587,6 @@
load_distro( models[ jj ], mdescs[ jj ] );
}
- curr_distr = alldis.size() - 1;
-// need_save = ck_savepl->isChecked() && !cont_loop;
bool have_m = ( models.count() > 0 );
pb_rmvdist->setEnabled( have_m );
pb_mdlpars->setEnabled( have_m );
@@ -915,27 +769,9 @@
alldis.append( tsys );
DbgLv(1) << "LD: retn fr alldis.append";
-#if 0
- if ( auto_sxy )
- {
-DbgLv(1) << "LD: auto_sxy call set_limits";
- set_limits();
- }
- data_plot->setAxisScale( QwtPlot::xBottom, plt_smin, plt_smax );
- data_plot->setAxisScale( QwtPlot::yLeft, plt_kmin, plt_kmax );
-
- pb_pltall ->setEnabled( true );
pb_refresh->setEnabled( true );
pb_reset ->setEnabled( true );
- if ( cont_loop )
- pb_pltall->setText( tr( "Plot All Distros in a Loop" ) );
- else
- pb_pltall->setText( tr( "Plot All Distros" ) );
-#endif
- pb_refresh->setEnabled( true );
- pb_reset ->setEnabled( true );
-
// Update status text box
QString distripl = QString( model.description ).section( ".", -3, -3 );
DbgLv(1) << "LD: model:" << model.description;
@@ -959,99 +795,6 @@
return plotx;
}
-void US_Density_Match::set_limits()
-{
- double smin = 1.0e30;
- double smax = -1.0e30;
- double kmin = 1.0e30;
- double kmax = -1.0e30;
- double sinc;
- double kinc;
- xa_title = anno_title( plot_x );
- ya_title = anno_title( ATTR_F );
-
- data_plot->setAxisTitle( QwtPlot::xBottom, xa_title );
- data_plot->setAxisTitle( QwtPlot::yLeft, ya_title );
-
- if ( alldis.size() < 1 )
- return;
-
- // find min,max for X,Y distributions
- for ( int ii = 0; ii < alldis.size(); ii++ )
- {
- DisSys* tsys = (DisSys*)&alldis.at( ii );
-
- for ( int jj = 0; jj < tsys->nm_distro.size(); jj++ )
- {
- double sval = tsys->nm_distro.at( jj ).s;
- double kval = tsys->nm_distro.at( jj ).k;
- smin = qMin( smin, sval );
- smax = qMax( smax, sval );
- kmin = qMin( kmin, kval );
- kmax = qMax( kmax, kval );
- }
- }
-
- // adjust minima, maxima
- sinc = ( smax - smin ) / 10.0;
- kinc = ( kmax - kmin ) / 10.0;
- sinc = ( sinc <= 0.0 ) ? ( smin * 0.05 ) : sinc;
- kinc = ( kinc <= 0.0 ) ? ( kmin * 0.05 ) : kinc;
-DbgLv(1) << "SL: real smin smax kmin kmax" << smin << smax << kmin << kmax;
- smin -= sinc;
- smax += sinc;
- kmin -= kinc;
- kmax += kinc;
-DbgLv(1) << "SL: adjusted smin smax kmin kmax" << smin << smax << kmin << kmax;
-
- if ( auto_sxy )
- { // Set auto limits on X and Y
- sinc = pow( 10.0, qFloor( log10( smax ) ) - 3.0 );
- kinc = pow( 10.0, qFloor( log10( kmax ) ) - 3.0 );
- if ( qAbs( ( smax - smin ) / smax ) < 0.001 )
- { // Put padding around virtually constant value
- smin -= sinc;
- smax += sinc;
- }
- if ( qAbs( ( kmax - kmin ) / kmax ) < 0.001 )
- { // Put padding around virtually constant value
- kmin -= kinc;
- kmax += kinc;
- }
- // Make sure limits are nearest reasonable values
- smin = qFloor( smin / sinc ) * sinc;
- smax = qFloor( smax / sinc ) * sinc + sinc;
- smin = ( plot_x != ATTR_S ) ? qMax( smin, 0.0 ) : smin;
- smin = ( plot_x == ATTR_K ) ? qMax( smin, 0.5 ) : smin;
- kmin = qFloor( kmin / kinc ) * kinc;
- kmax = qFloor( kmax / kinc ) * kinc + kinc;
-
-DbgLv(1) << "SL: setVal kmin kmax" << kmin << kmax;
-#if 0
- ct_plt_smin->setValue( smin );
- ct_plt_smax->setValue( smax );
- ct_plt_kmin->setValue( kmin );
- ct_plt_kmax->setValue( kmax );
-#endif
-
- plt_smin = smin;
- plt_smax = smax;
- plt_kmin = kmin;
- plt_kmax = kmax;
- }
- else
- {
-#if 0
- plt_smin = ct_plt_smin->value();
- plt_smax = ct_plt_smax->value();
- plt_kmin = ct_plt_kmin->value();
- plt_kmax = ct_plt_kmax->value();
-#endif
- }
-DbgLv(1) << "SL: plt_smin _smax _kmin _kmax" << plt_smin << plt_smax
- << plt_kmin << plt_kmax;
-}
-
// Sort distribution solute list by s,d values and optionally reduce
void US_Density_Match::sort_distro( QList< S_Solute >& listsols,
bool reduce )
@@ -1183,17 +926,22 @@
int jd = alldis.size();
if ( jd < 1 )
- {
- reset();
- return;
+ { // Handle case where ALL distributions removed
+ QString dinfo = te_distr_info->toPlainText()
+ .section( "\n", 0, 0 ) +
+ tr( "\n(no models)\n" );
+ te_distr_info->setText( dinfo );
+ dataPlotClear( data_plot );
+ data_plot->replot();
}
-
- curr_distr = 0;
DbgLv(1) << "rmvdis:Accepted";
}
- // Summarize new set of models in info box
- models_summary();
+ if ( alldis.size() > 0 )
+ {
+ // Summarize new set of models in info box
+ models_summary();
+ }
// Build and plot updated data
build_bf_dists(); // (Re-)build boundary fraction distributions
@@ -1231,51 +979,9 @@
DbgLv(1) << "sel_x: ival" << ival;
plot_x = ival;
-#if 0
- const QString xlabs[] = { "mass", "f/f0", "rh", "vbar", "s" };
- const double xvlos[] = { 2e+4, 1.0, 2e+4, 0.60, 1.0 };
- const double xvhis[] = { 1e+5, 4.0, 1e+5, 0.80, 10.0 };
- const double xmins[] = { 0.0, 1.0, 0.0, 0.01, -10000.0 };
- const double xmaxs[] = { 1e+10, 50.0, 1e+10, 3.00, 10000.0 };
- const double xincs[] = { 1000.0, 0.01, 1000.0, 0.01, 0.01 };
-#endif
-
- const QString xlabs[] = { "s", "f/f0", "mass","vbar", "D", "f", "rh" };
- const double xvlos[] = { 1.0, 1.0, 2e+4, 0.60, 1e-8, 1e-8, 0.1 };
- const double xvhis[] = { 10.0, 4.0, 1e+5, 0.80, 1e-7, 1e-7, 1000.};
- const double xmins[] = { -10000.0, 1.0, 0.0, 0.01, 1e-9, 1e-9, 1e-1 };
- const double xmaxs[] = { 10000.0, 50.0, 1e+10, 3.00, 1e-5, 1e-5, 1e+3 };
- const double xincs[] = { 0.01, 0.01, 1000.0, 0.01, 1e-9, 1e-9, 1e-2 };
-#if 0
- const QString xlabs[] = { "s", "f/f0", "MW", "vbar", "D", "f" };
- const double xvlos[] = { 1.0, 1.0, 2e+4, 0.60, 1e-8, 1e-8 };
- const double xvhis[] = { 10.0, 4.0, 1e+5, 0.80, 1e-7, 1e-7 };
- const double xmins[] = { -10000.0, 1.0, 0.0, 0.01, 1e-9, 1e-9 };
- const double xmaxs[] = { 10000.0, 50.0, 1e+10, 3.00, 1e-5, 1e-5 };
- const double xincs[] = { 0.01, 0.01, 1000.0, 0.01, 1e-9, 1e-9 };
-#endif
-
-#if 0
- lb_plt_smin->setText( tr( "Plot Limit " ) + xlabs[ plot_x ]
- + tr( " Minimum:" ) );
- lb_plt_smax->setText( tr( "Plot Limit " ) + xlabs[ plot_x ]
- + tr( " Maximum:" ) );
- ct_plt_smin->setRange( xmins[ plot_x ], xmaxs[ plot_x ] );
- ct_plt_smax->setRange( xmins[ plot_x ], xmaxs[ plot_x ] );
- ct_plt_smin->setSingleStep( xincs[ plot_x ] );
- ct_plt_smax->setSingleStep( xincs[ plot_x ] );
- ct_plt_smin->setValue( xvlos[ plot_x ] );
- ct_plt_smax->setValue( xvhis[ plot_x ] );
-#endif
-DbgLv(1) << "sel_x: lab vlos vhis xmin xmax xinc" << xlabs[plot_x]
- << xvlos[plot_x] << xvhis[plot_x] << xmins[plot_x] << xmaxs[plot_x]
- << xincs[plot_x];
-
build_bf_dists(); // Build the boundary fraction distributions
build_bf_vects(); // Build the boundary fraction vectors
-// set_limits();
-
plot_data(); // Plot data
}
@@ -1378,7 +1084,6 @@
double wsum = 0.0;
for ( int ii = 0; ii < ndists; ii++ )
{ // Accumulate (weighted) sum and sum of weights
-// double dwt = alldis[ ii ].bf_distro[ jj ].c;
double dwt = ( diff_avg == 1 ) ? 1.0
: alldis[ ii ].bf_distro[ jj ].c;
dsum += ( alldis[ ii ].bf_distro[ jj ].d * dwt );
@@ -1493,8 +1198,6 @@
for ( int jj = 0; jj < npoints; jj++ )
{
// *** Mi = si*R*T/(Di_avg*(1-vbari*rho))
-// double sedco = alldis[ 0 ].bf_distro[ jj ].s * 1.0e-13;
-// double difco = alldis[ 0 ].bf_distro[ jj ].d * 1.0e-7;
double sedco = v_sedcs[ zx ][ jj ] * 1.0e-13;
double difco = v_difcs[ zx ][ jj ] * 1.0e-7;
double vbari = v_vbars[ jj ];
@@ -1714,6 +1417,11 @@
+ mlab + " " + mdesc + "\n";
}
+ if ( alldis.size() < 1 )
+ {
+ dinfo += tr( "(no models)\n" );
+ }
+
te_distr_info->setText( dinfo );
}
Modified: trunk/programs/us_density_match/us_density_match.h
===================================================================
--- trunk/programs/us_density_match/us_density_match.h 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/programs/us_density_match/us_density_match.h 2019-08-20 22:09:03 UTC (rev 2822)
@@ -52,11 +52,6 @@
enum attr_type { ATTR_S, ATTR_K, ATTR_W, ATTR_V, ATTR_D, ATTR_F, ATTR_R };
- QLabel* lb_plt_smin;
- QLabel* lb_plt_smax;
- QLabel* lb_plt_kmin;
- QLabel* lb_plt_kmax;
- QLabel* lb_tolerance;
QLabel* lb_division;
QTextEdit* te_distr_info;
@@ -65,12 +60,6 @@
US_Help showHelp;
- QwtCounter* ct_resolu;
- QwtCounter* ct_plt_kmin;
- QwtCounter* ct_plt_kmax;
- QwtCounter* ct_plt_smin;
- QwtCounter* ct_plt_smax;
- QwtCounter* ct_plt_dlay;
QwtCounter* ct_division;
QwtCounter* ct_smoothing;
QwtCounter* ct_boundaryPct;
@@ -92,15 +81,6 @@
QPushButton* pb_mdlpars;
QPushButton* pb_save;
- QCheckBox* ck_autosxy;
- QCheckBox* ck_autoscz;
- QCheckBox* ck_plot_sk;
- QCheckBox* ck_plot_wk;
- QCheckBox* ck_plot_sv;
- QCheckBox* ck_plot_wv;
- QCheckBox* ck_savepl;
- QCheckBox* ck_locsave;
-
QRadioButton* rb_x_mass;
QRadioButton* rb_x_ff0;
QRadioButton* rb_x_rh;
@@ -124,30 +104,10 @@
QVector< QVector< double > > v_sedcs; // Vector of sedi coeff vectors per distro
QVector< QVector< double > > v_difcs; // Vector of diff coeff vectors per distro
- double resolu;
- double plt_smin;
- double plt_smax;
- double plt_kmin;
- double plt_kmax;
- double plt_zmin;
- double plt_zmax;
- double s_range;
- double k_range;
- double xreso;
- double yreso;
-
- int curr_distr;
int dbg_level;
int plot_x;
int diff_avg;
- bool auto_sxy;
- bool auto_scz;
- bool cont_loop;
- bool need_save;
- bool runsel;
- bool latest;
-
QString xa_title;
QString ya_title;
QString mfilter;
@@ -157,18 +117,8 @@
private slots:
- void update_resolu( double );
- void update_xreso( double );
- void update_yreso( double );
- void update_curr_distr( double );
- void update_plot_smin( double );
- void update_plot_smax( double );
- void update_plot_kmin( double );
- void update_plot_kmax( double );
void plot_data( int );
void plot_data( void );
- void select_autosxy( void );
- void select_autoscz( void );
void update_disk_db( bool );
void update_divis ( double );
void select_prefilt( void );
@@ -176,7 +126,6 @@
void load_distro( US_Model, QString );
void reset( void );
void save( void );
- void set_limits ( void );
void sort_distro ( QList< S_Solute >&, bool );
void remove_distro ( void );
void set_mparms ( void );
Modified: trunk/programs/us_density_match/us_remove_models.h
===================================================================
--- trunk/programs/us_density_match/us_remove_models.h 2019-08-18 15:32:32 UTC (rev 2821)
+++ trunk/programs/us_density_match/us_remove_models.h 2019-08-20 22:09:03 UTC (rev 2822)
@@ -53,7 +53,7 @@
void restore ( void );
void accepted ( void );
void help ( void )
- { showHelp.show_help( "mass_distrib_rmv.html" ); };
+ { showHelp.show_help( "dens_match_rmvmods.html" ); };
};
#endif
1
0
Author: gegorbet
Date: 2019-08-18 15:32:32 +0000 (Sun, 18 Aug 2019)
New Revision: 2821
Modified:
trunk/programs/us_density_match/us_density_match.cpp
Log:
density_match clears info text with reset
Modified: trunk/programs/us_density_match/us_density_match.cpp
===================================================================
--- trunk/programs/us_density_match/us_density_match.cpp 2019-08-16 14:21:20 UTC (rev 2820)
+++ trunk/programs/us_density_match/us_density_match.cpp 2019-08-18 15:32:32 UTC (rev 2821)
@@ -288,13 +288,22 @@
plot_x = ATTR_V;
- alldis.clear();
- pfilts.clear();
+ alldis .clear();
+ pfilts .clear();
+ v_bfracs.clear();
+ v_vbars .clear();
+ v_mmass .clear();
+ v_hrads .clear();
+ v_frats .clear();
+ v_sedcs .clear();
+ v_difcs .clear();
+
pb_refresh->setEnabled( false );
pb_mdlpars->setEnabled( false );
pb_save ->setEnabled( false );
pb_rmvdist->setEnabled( false );
- le_prefilt->setText( tr( "(no prefilter)" ) );
+ le_prefilt ->setText( tr( "(no prefilter)" ) );
+ te_distr_info->setText( tr( "(all data cleared)" ) );
}
// Save plots and CSV files
1
0
Author: gegorbet
Date: 2019-08-16 14:21:20 +0000 (Fri, 16 Aug 2019)
New Revision: 2820
Modified:
trunk/programs/us_density_match/us_density_match.cpp
trunk/programs/us_density_match/us_density_match.h
trunk/programs/us_density_match/us_model_params.cpp
Log:
dens_match mods: report_directory, remove_distribs, HRadius units, Boundary+Smooth_upperlimits, ModelPars_duplicate_percents
Modified: trunk/programs/us_density_match/us_density_match.cpp
===================================================================
--- trunk/programs/us_density_match/us_density_match.cpp 2019-08-15 20:50:48 UTC (rev 2819)
+++ trunk/programs/us_density_match/us_density_match.cpp 2019-08-16 14:21:20 UTC (rev 2820)
@@ -310,6 +310,9 @@
QString fpfix = "dens_match_distrib_";
QString fname;
QString fpath;
+ QDir diro( reppath );
+ if ( !diro.exists( ) ) // Make sure report directory exists
+ QDir( US_Settings::reportDir() ).mkdir( runid );
// Write sedimentation coeff, bfrac CSV files
for ( int ii = 0; ii < ndists; ii++ )
@@ -839,9 +842,6 @@
DbgLv(1) << "LD: solval: bdens soluID bdensity"
<< bdens << soluID << tsys.bdensity;
-
-// te_distr_info->setText( tr( "Run: " ) + tsys.run_name
-// + " (" + tsys.method + ")\n " + tsys.analys_name );
int nsolmc = model.components.size();
// Read in and set distribution s,k,c,... values
@@ -1183,6 +1183,12 @@
DbgLv(1) << "rmvdis:Accepted";
}
+ // Summarize new set of models in info box
+ models_summary();
+
+ // Build and plot updated data
+ build_bf_dists(); // (Re-)build boundary fraction distributions
+ build_bf_vects(); // (Re-)build boundary fraction vectors
DbgLv(1) << "rmvdis:plot_data";
plot_data();
DbgLv(1) << "rmvdis:DONE";
@@ -1199,28 +1205,14 @@
if ( mpdiag.exec() == QDialog::Accepted )
{ // Redo text box summarizing models; calculate vectors
DbgLv(1) << "mdlpar: Accepted";
- QString mdesc = mdescs[ 0 ].section( mdescs[ 0 ].left( 1 ), 1, 1 );
- mdesc = QString( mdesc ).left( 50 );
- QString dinfo = alldis[ 0 ].run_name.section( ".", 0, -2 ) + "\n\n"
- + tr( " D2O Percent Density Label MDescr.\n" );
+ // Summarize new set of models in info box
+ models_summary();
- for ( int jj = 0; jj < alldis.size(); jj++ )
- { // Compose and display a distribution line for distro info box
- double d2opct = alldis[ jj ].d2opct;
- double bdens = alldis[ jj ].bdensity;
- QString mlab = alldis[ jj ].label;
- mdesc = mdescs[ jj ].section( mdescs[ jj ].left( 1 ), 1, 1 );
- mdesc = alldis[ jj ].run_name;
- int kk = mdesc.indexOf( "-run" );
- mdesc = ( kk > 0 )
- ? "..." + QString( mdesc ).mid( ( kk + 1 ), 20 )
- + "..."
- : mdesc;
- dinfo += QString().sprintf( "%.1f %f ", d2opct, bdens )
- + mlab + " " + mdesc + "\n";
- }
-
- te_distr_info->setText( dinfo );
+ // Rebuild vectors and replot data
+DbgLv(1) << "mdlpar: plot_data";
+ build_bf_dists();
+ build_bf_vects();
+ plot_data();
}
}
@@ -1239,12 +1231,12 @@
const double xincs[] = { 1000.0, 0.01, 1000.0, 0.01, 0.01 };
#endif
- const QString xlabs[] = { "s", "f/f0", "mass","vbar", "D", "f", "r" };
- const double xvlos[] = { 1.0, 1.0, 2e+4, 0.60, 1e-8, 1e-8, 1e-8 };
- const double xvhis[] = { 10.0, 4.0, 1e+5, 0.80, 1e-7, 1e-7, 1e-7 };
- const double xmins[] = { -10000.0, 1.0, 0.0, 0.01, 1e-9, 1e-9, 1e-9 };
- const double xmaxs[] = { 10000.0, 50.0, 1e+10, 3.00, 1e-5, 1e-5, 1e-4 };
- const double xincs[] = { 0.01, 0.01, 1000.0, 0.01, 1e-9, 1e-9, 1e-9 };
+ const QString xlabs[] = { "s", "f/f0", "mass","vbar", "D", "f", "rh" };
+ const double xvlos[] = { 1.0, 1.0, 2e+4, 0.60, 1e-8, 1e-8, 0.1 };
+ const double xvhis[] = { 10.0, 4.0, 1e+5, 0.80, 1e-7, 1e-7, 1000.};
+ const double xmins[] = { -10000.0, 1.0, 0.0, 0.01, 1e-9, 1e-9, 1e-1 };
+ const double xmaxs[] = { 10000.0, 50.0, 1e+10, 3.00, 1e-5, 1e-5, 1e+3 };
+ const double xincs[] = { 0.01, 0.01, 1000.0, 0.01, 1e-9, 1e-9, 1e-2 };
#if 0
const QString xlabs[] = { "s", "f/f0", "MW", "vbar", "D", "f" };
const double xvlos[] = { 1.0, 1.0, 2e+4, 0.60, 1e-8, 1e-8 };
@@ -1361,6 +1353,8 @@
void US_Density_Match::build_bf_dists()
{
int ndists = alldis.size();
+ if ( ndists < 1 )
+ return;
for ( int jj = 0; jj < ndists; jj++ )
{ // Build bfrac distro for each model
build_bf_distro( jj );
@@ -1512,7 +1506,7 @@
double difco = v_difcs[ zx ][ jj ] * 1.0e-7;
double frico = R_GC * K20 / ( difco * AVOGADRO );
double hyrad = frico / ( 6.0 * M_PI * VISC_20W );
- v_hrads << hyrad;
+ v_hrads << ( hyrad * 1.e+9 );
}
DbgLv(1) << "BldVc: hr 0 1 k n" << v_hrads[0] << v_hrads[1]
<< v_hrads[npoints-2] << v_hrads[npoints-1];
@@ -1606,7 +1600,7 @@
else if ( pltndx == ATTR_D )
a_title = tr( "Diffusion Coefficient (1e-7)" );
else if ( pltndx == ATTR_R )
- a_title = tr( "Hydrodynamic Radius" );
+ a_title = tr( "Hydrodynamic Radius (nm)" );
else if ( pltndx == ATTR_F )
a_title = tr( "Boundary Fraction" );
@@ -1643,6 +1637,19 @@
build_bf_dists(); // (Re-)build boundary fraction distributions
build_bf_vects(); // (Re-)build boundary fraction vectors
plot_data(); // Plot data
+
+ // Also limit percent so upper limit is 100.0
+ double mx_bpct = 100.0 - ct_boundaryPos->value();
+ ct_boundaryPct->setMaximum( mx_bpct );
+DbgLv(1) << "UpdDiv: mx_bpct" << mx_bpct;
+
+ // Limit smoothing so upper limit half of divisions and odd
+ double mx_smoo = ct_division->value() * 0.5;
+ int nsmoo = (int)mx_smoo;
+ nsmoo += ( ( nsmoo & 1 ) == 0 ) ? 1 : 0;
+ mx_smoo = nsmoo;
+DbgLv(1) << "UpdDiv: mx_smoo" << mx_smoo;
+ ct_smoothing ->setMaximum( mx_smoo );
}
// Write a CSV file from given vectors
@@ -1674,3 +1681,30 @@
return;
}
+// Write summary of models to info box
+void US_Density_Match::models_summary( void )
+{
+ QString dinfo = alldis[ 0 ].run_name.section( ".", 0, -2 ) + "\n\n"
+ + tr( " D2O_Percent Density Label MDescr.\n" );
+DbgLv(1) << "mosmry: hdr" << dinfo;
+
+ for ( int jj = 0; jj < alldis.size(); jj++ )
+ { // Compose and display a distribution line for distro info box
+ double d2opct = alldis[ jj ].d2opct;
+ double bdens = alldis[ jj ].bdensity;
+ QString mlab = alldis[ jj ].label;
+DbgLv(1) << "mosmry: jj" << jj << "d2opct bdens mlab" << d2opct << bdens << mlab;
+ QString mdesc = alldis[ jj ].run_name;
+ int kk = mdesc.indexOf( "-run" );
+ mdesc = ( kk > 0 )
+ ? "..." + QString( mdesc ).mid( ( kk + 1 ), 20 )
+ + "..."
+ : mdesc;
+DbgLv(1) << "mosmry: mdesc" << mdesc;
+ dinfo += QString().sprintf( "%.1f %f ", d2opct, bdens )
+ + mlab + " " + mdesc + "\n";
+ }
+
+ te_distr_info->setText( dinfo );
+}
+
Modified: trunk/programs/us_density_match/us_density_match.h
===================================================================
--- trunk/programs/us_density_match/us_density_match.h 2019-08-15 20:50:48 UTC (rev 2819)
+++ trunk/programs/us_density_match/us_density_match.h 2019-08-16 14:21:20 UTC (rev 2820)
@@ -188,6 +188,7 @@
int plot_x_select ( void );
QString anno_title ( int );
QString ptype_text ( int );
+ void models_summary ( void );
void write_csv( const QString, const QString, QVector< double >&,
const QString, QVector< double >& );
Modified: trunk/programs/us_density_match/us_model_params.cpp
===================================================================
--- trunk/programs/us_density_match/us_model_params.cpp 2019-08-15 20:50:48 UTC (rev 2819)
+++ trunk/programs/us_density_match/us_model_params.cpp 2019-08-16 14:21:20 UTC (rev 2820)
@@ -326,29 +326,25 @@
QLineEdit* lned = (QLineEdit*) ochild;
QString pname = cname.section( ":", 0, 0 );
QString etext = lned->text();
+ bool nonempty = !etext.isEmpty();
DbgLv(1) << " vlf: jj" << jj << "etext" << etext << "pname" << pname;
if ( pname == "D2OP" )
{ // Count D2O percent values given
- if ( !etext.isEmpty() )
+ if ( nonempty )
{
+ nad2pc++; // Bump count all D2Opc non-empty
double pctval = etext.toDouble();
- if ( etext == "0" || etext == "0.0" )
- { // Zero percent: bump counts
- nzd2pc++;
- nad2pc++;
+ if ( pctval == 0.0 )
+ {
+ nzd2pc++; // Bump count zero percent D2O
DbgLv(1) << " vlf: pctval" << pctval << "nzd2pc nad2pc" << nzd2pc << nad2pc;
}
- else if ( pctval > 0.0 )
- { // Non-zero numeric: bump percent count
- nad2pc++;
-DbgLv(1) << " vlf: pctval" << pctval << "nad2pc" << nad2pc;
- }
}
}
else if ( pname == "DENS" )
{ // Count densities given
- if ( !etext.isEmpty() )
+ if ( nonempty )
{
double density = etext.toDouble();
if ( density > 0.0 )
@@ -362,23 +358,23 @@
}
else if ( pname == "MLAB" )
{ // Count labels given
- if ( !etext.isEmpty() )
+ if ( nonempty )
nalabs++;
DbgLv(1) << " vlf: nalabs" << nalabs;
}
}
DbgLv(1) << " vlf: nzd2pc nad2pc nadens nalabs" << nzd2pc << nad2pc << nadens << nalabs
- << "allden size" << allden.size();
+ << "allden size" << allden.size() << "nd_orig" << nd_orig;
// All model parameters are given if
// at least one zero-percent is given;
// percent,density,label counts equal row count;
- // and number of unique densities equals row count.
+ // and number of unique densities greater than one.
bool filled = ( ( nzd2pc > 0 ) &&
( nad2pc == nd_orig ) &&
( nadens == nd_orig ) &&
( nalabs == nd_orig ) &&
- ( allden.size() == nadens ) );
+ ( allden.size() > 1 ) );
DbgLv(1) << " vlf: FILLED" << filled;
pb_accept ->setEnabled( filled ); // If all filled, enable Accept button
@@ -403,20 +399,13 @@
QLineEdit* lned = (QLineEdit*) ochild;
QString etext = lned->text();
- if ( pname == "D2OP" )
+ if ( pname == "D2OP" && !etext.isEmpty() )
{
- if ( !etext.isEmpty() )
+ nad2pc++; // Bump total non-empty D2Opc count
+ double pctval = etext.toDouble();
+ if ( pctval == 0.0 )
{
- double pctval = etext.toDouble();
- if ( etext == "0" || etext == "0.0" )
- { // Count 0 percent and total percent
- nzd2pc++;
- nad2pc++;
- }
- else if ( pctval > 0.0 )
- { // Count total non-empty percent values given
- nad2pc++;
- }
+ nzd2pc++; // Bump count of 0 percent D2O
}
}
}
1
0
Author: gegorbet
Date: 2019-08-15 20:50:48 +0000 (Thu, 15 Aug 2019)
New Revision: 2819
Modified:
trunk/programs/us/us.cpp
Log:
minor fix to ultrascan menu text
Modified: trunk/programs/us/us.cpp
===================================================================
--- trunk/programs/us/us.cpp 2019-08-15 20:42:48 UTC (rev 2818)
+++ trunk/programs/us/us.cpp 2019-08-15 20:50:48 UTC (rev 2819)
@@ -211,7 +211,7 @@
addMenu( P_VIEWCFA , tr( "View Raw C&FA Data" ), utilities );
addMenu( P_VIEWXPN , tr( "View Raw &Optima Data" ), utilities );
addMenu( P_VIEWTMST, tr( "View &TimeState" ), utilities );
- addMenu( P_DENSMTCH, tr( "%Density Matching" ), utilities );
+ addMenu( P_DENSMTCH, tr( "&Density Matching" ), utilities );
addMenu( P_VIEWMWL , tr( "&View Multiwavelength Data" ), multiwave );
addMenu( P_VIEWMSS , tr( "View MWL &S-Spectra" ), multiwave );
1
0