UltraScan III
us_adv_analysis_pc.h
Go to the documentation of this file.
1 #ifndef US_ADV_ANALYSIS_H
3 #define US_ADV_ANALYSIS_H
4 
5 #include <QtGui>
6 
7 #include "us_extern.h"
8 #include "us_widgets_dialog.h"
9 #include "us_pcsa_process.h"
10 #include "us_plot.h"
11 #include "us_help.h"
12 
13 #ifndef DbgLv
14 #define DbgLv(a) if(dbg_level>=a)qDebug()
15 #endif
16 
18 
20 {
21  Q_OBJECT
22 
23  public:
29  US_AdvAnalysisPc( QVector< US_ModelRecord >*, const int,
30  US_SolveSim::DataSet*, QWidget* p = 0 );
31 
35  int advanced_results( QVector< US_ModelRecord >* );
36 
37  private:
38  QVector< US_ModelRecord >* p_mrecs;
39  QVector< US_ModelRecord > mrecs0;
40  QVector< US_ModelRecord > mrecs;
41  QVector< US_ModelRecord > mrecs_mc;
42 
45 
47 
51 
52  QVector< double > sigmas;
53 
55 
56  QVector< US_SolveSim::DataSet > wkdsets;
57 
58  static const int msk_bfnew = 1;
59  static const int msk_mrnew = 2;
60  static const int msk_mcarl = 4;
61 
62  int nthr;
63  int mciters;
64  int kciters;
65  int ksiters;
66  int nmrecs;
67  int ctype;
68  int nisols;
69  int ncsols;
70  int dbg_level;
71 
74  bool bfm_new;
75  bool mrs_new;
76  bool mc_done;
77  bool mc_running;
78 
79  QString store_dir;
80 
81  QHBoxLayout* mainLayout;
82  QGridLayout* finmodelLayout;
83  QGridLayout* mreclistLayout;
84 
85  QWidget* parentw;
86 
87  QLabel* lb_sigmpar1;
88  QLabel* lb_sigmpar2;
89  QLabel* lb_y_strpt;
90  QLabel* lb_y_endpt;
91 
92  QLineEdit* le_x_lower;
93  QLineEdit* le_x_upper;
94  QLineEdit* le_y_lower;
95  QLineEdit* le_y_upper;
96  QLineEdit* le_sigmpar1;
97  QLineEdit* le_sigmpar2;
98  QLineEdit* le_y_strpt;
99  QLineEdit* le_y_endpt;
100  QLineEdit* le_mciters;
101  QLineEdit* le_crpoints;
102 
103  QPushButton* pb_loadmrs;
104  QPushButton* pb_storemrs;
105  QPushButton* pb_loadbfm;
106  QPushButton* pb_storebfm;
107  QPushButton* pb_resetbfm;
108  QPushButton* pb_resetmrs;
109  QPushButton* pb_buildbfm;
110  QPushButton* pb_mciters;
111  QPushButton* pb_help;
112  QPushButton* pb_cancel;
113  QPushButton* pb_accept;
114 
115  QComboBox* cb_curvtype;
116 
117  QTextEdit* te_bfmstat;
118  QTextEdit* te_mrecstat;
119 
120  protected:
122  QProgressBar* b_progress;
123 
124  private slots:
125  void curvtypeChanged ( int );
126 #if 0
127  void slowerChanged ( double );
128  void supperChanged ( double );
129  void sipar1Changed ( double );
130  void sipar2Changed ( double );
131  void klowerChanged ( double );
132  void kupperChanged ( double );
133  void pointsChanged ( double );
134 #endif
135  void mciterChanged ( double );
136  void load_mrecs ( void );
137  void store_mrecs ( void );
138  void load_bfm ( void );
139  void store_bfm ( void );
140  void reset_bfm ( void );
141  void reset_mrecs ( void );
142  void build_bfm ( void );
143  void start_montecarlo( void );
145  void apply_gaussians ( void );
146  void process_job ( WorkerThreadPc* );
147  void montecarlo_done ( void );
148  void under_construct ( QString );
149  void curve_isolutes ( US_ModelRecord& );
150  void bfm_model ( void );
151  void stat_mrecs ( const QString, bool = false, int = 0 );
152  void stat_bfm ( const QString, bool = false, int = 0 );
153  void show_stat ( QTextEdit*, const QString, bool = false, int = 0 );
154  void set_fittings ( QVector< US_ModelRecord >& );
155  bool mrecs_required ( const QString );
156  bool bfm_incompat ( const QString );
157 
158  void select ( void );
159  void cancel ( void );
160  void test_db_mrecs ( void );
161 
162  void help ( void )
163  { showHelp.show_help( "pcsa_advanced.html" ); };
164 };
165 #endif
166 
167