diff --git a/programs/us_ddist_combine/us_ddist_combine.cpp b/programs/us_ddist_combine/us_ddist_combine.cpp index e28b6d361..3f001bfae 100644 --- a/programs/us_ddist_combine/us_ddist_combine.cpp +++ b/programs/us_ddist_combine/us_ddist_combine.cpp @@ -1137,6 +1137,7 @@ void US_DDistr_Combine::plot_distr_auto( DistrDesc ddesc, QString distrID, QMap< QString ranges_p; qDebug() << "c_ranges, begin -- " << c_parms[ "Ranges" ]; + qDebug() << "c_parms.keys() -- " << c_parms.keys(); QMap::iterator jj; for ( jj = c_parms.begin(); jj != c_parms.end(); ++jj ) @@ -1149,6 +1150,16 @@ void US_DDistr_Combine::plot_distr_auto( DistrDesc ddesc, QString distrID, QMap< xmax_p = jj.value().toDouble(); else if ( jj.key().contains( "Ranges" ) ) ranges_p = jj.value(); + else if ( jj.key().contains( "s_ranges" ) ) + { + xmin_p = jj.value().split(",")[0].toDouble(); + xmax_p = jj.value().split(",")[1].toDouble(); + } + else if ( jj.key().contains( "k_ranges" ) ) + { + xmin_p = jj.value().split(",")[0].toDouble(); + xmax_p = jj.value().split(",")[1].toDouble(); + } } qDebug() << "In plot_distr_auto(): sigma_p, xmin_p, xmax_p, ranges_p -- " diff --git a/programs/us_reporter_gmp/us_reporter_gmp.cpp b/programs/us_reporter_gmp/us_reporter_gmp.cpp index 22e293d0a..41d0dffb5 100644 --- a/programs/us_reporter_gmp/us_reporter_gmp.cpp +++ b/programs/us_reporter_gmp/us_reporter_gmp.cpp @@ -5383,9 +5383,10 @@ bool US_ReporterGMP::modelGuidExistsForStage_ind( QString triple_n, QString mode //Individual Combined Plots void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, QString stage_model ) { + QString triplesname_passed = triplesname_p; QString filename_passed = get_filename( triplesname_p ); QString triplesname = triplesname_p.replace(".",""); - + sdiag_combplot = new US_DDistr_Combine( "REPORT" ); QStringList runIDs_single; @@ -5420,13 +5421,20 @@ void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, for ( int ii = 0; ii < modelDescModified.size(); ii++ ) { - QString triplesname_mod = triplesname; + QString triplesname_mod = triplesname; + QString triplesname_chann; //Should be "1A:UV/vis." OR "1A:Interf." + if ( triplesname.contains("Interference") ) - triplesname_mod = triplesname_mod.replace( "Interference" , "660"); + { + triplesname_mod = triplesname_mod.replace( "Interference" , "660"); + triplesname_chann = triplesname_passed.split(".")[0] + triplesname_passed.split(".")[1] + ":Interf."; + } + else + triplesname_chann = triplesname_passed.split(".")[0] + triplesname_passed.split(".")[1] + ":UV/vis."; qDebug() << "INDCOMBO_1: " << modelDescModified[ ii ]; - qDebug() << "INDCOMBO_2: " << triplesname << stage_model; - + qDebug() << "INDCOMBO_2: " << triplesname << stage_model << triplesname_chann; + //fiter by type|model if ( modelDescModified[ ii ].contains( triplesname_mod ) && modelDescModified[ ii ].contains( stage_model ) && @@ -5434,6 +5442,9 @@ void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, { qDebug() << "INDCOMBO_3: YES "; + //compose map of [{"s_ranges","k_ranges"}, etc] from cAP2 & cAPp (for given channel & model!!!) + QMap< QString, QStringList > sim_ranges = find_sim_ranges( triplesname_chann, stage_model ); + QString t_m = "s," + stage_model; QMap < QString, QString > c_params = comboPlotsMap[ t_m ]; //ALEXEY: here it plots s20 combPlot (xtype == 0) -- Need to do first thing!!! @@ -5484,12 +5495,19 @@ void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, c_parms = comboPlotsMap[ t_m ]; //put ranges into c_parms: c_parms[ "Ranges" ] = ranges.join(","); + + qDebug() << "s-type: sim_ranges.keys(), sim_ranges[\"s_ranges\"] -- " + << sim_ranges.keys() + << sim_ranges["s_ranges"]; + if ( sim_ranges. contains("s_ranges") ) + c_parms[ "s_ranges" ] = sim_ranges["s_ranges"].join(","); + //qDebug() << "over models: c_params -- " << c_params; //ALEXEY: here it plots s20 combPlot (xtype == 0) plotted_ids_colors_map_s_type = sdiag_combplot-> changedPlotX_auto( 0, c_parms ); - + write_plot( imgComb02File, sdiag_combplot->rp_data_plot1() ); //<-- rp_data_plot1() gives combined plot imgComb02File.replace( svgext, pngext ); CombPlotsFileNames << imgComb02File; @@ -5544,6 +5562,9 @@ void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, c_parms = comboPlotsMap[ t_m ]; //put ranges into c_parms: c_parms[ "Ranges" ] = ranges.join(","); + + if ( sim_ranges. contains("k_ranges") ) + c_parms[ "k_ranges" ] = sim_ranges["k_ranges"].join(","); plotted_ids_colors_map_s_type = sdiag_combplot-> changedPlotX_auto( 3, c_parms ); @@ -5566,6 +5587,50 @@ void US_ReporterGMP::process_combined_plots_individual ( QString triplesname_p, qApp->processEvents(); } +//pull s_ranges, k_ranges from AProfile +QMap< QString, QStringList > US_ReporterGMP::find_sim_ranges( QString chann_desc, QString model ) +{ + QMap < QString, QStringList > sim_ranges; + + qDebug() << "[in find_sim_ranges()1] -- " << chann_desc << model; + + if ( model. contains("2DSA") ) + { + //2DSA + for (int i=0; i find_sim_ranges( QString, QString ); QMap read_autoflowGMPReportEsign_record(QString); //!< Read autoflow GMP report electronic signature record void get_assigned_oper_revs(QJsonDocument, QStringList&); //!< Get assigned operator revisions