UltraScan III
us_analysis_base2.h
Go to the documentation of this file.
1 #ifndef US_ANALYSIS_BASE_H
3 #define US_ANALYSIS_BASE_H
4 
5 #include <QtGui>
6 
7 #include "us_extern.h"
8 #include "us_widgets.h"
9 #include "us_dataIO.h"
10 #include "us_plot.h"
11 #include "us_math2.h"
12 #include "us_help.h"
13 #include "us_db2.h"
14 #include "us_analyte.h"
15 #include "us_buffer.h"
16 #include "us_noise.h"
17 
18 #include "qwt_counter.h"
19 
23 
25 {
26  Q_OBJECT
27 
28  public:
30 
31  protected:
33  QVector< US_DataIO::EditedData > dataList;
34 
36  QVector< US_DataIO::RawData > rawList;
37 
39  QStringList triples;
40 
42  QList< int > excludedScans;
43 
45  QList< QVector< double > > savedValues;
46 
49 
50  bool dataLoaded;
51  bool def_local;
52  bool buffLoaded;
53 
54  QString directory;
55  QString editID;
56  QString runID;
57  QString dfilter;
58  QString investig;
59  QString etype_filt;
60 
62 
64 
67 
68  QVector< int > noiflags;
69  QVector< QList< int > > allExcls;
70  QVector< US_Noise > rinoises;
71  QVector< US_Noise > tinoises;
72 
75 
76  double time_correction;
77  double density;
78  double viscosity;
79  double vbar;
80  bool manual;
81 
82  // Layouts
83  QGridLayout* mainLayout;
84  QBoxLayout* leftLayout;
85  QBoxLayout* rightLayout;
86  QBoxLayout* buttonLayout;
87 
88  QGridLayout* analysisLayout;
89  QGridLayout* runInfoLayout;
90  QGridLayout* parameterLayout;
91  QGridLayout* controlsLayout;
92 
95 
96  // Widgets
97  QwtPlot* data_plot1;
98  QwtPlot* data_plot2;
99 
100  QPushButton* pb_load;
101  QPushButton* pb_details;
102  QPushButton* pb_solution;
103  QPushButton* pb_view;
104  QPushButton* pb_save;
105  QPushButton* pb_reset;
106  QPushButton* pb_help;
107  QPushButton* pb_close;
108  QPushButton* pb_exclude;
109  QPushButton* pb_reset_exclude;
110 
111  QLineEdit* le_id;
112  QLineEdit* le_temp;
113  QTextEdit* te_desc;
114  QListWidget* lw_triples;
115 
116  QLineEdit* le_solution;
117  QLineEdit* le_density;
118  QLineEdit* le_viscosity;
119  QLineEdit* le_vbar;
120  QLineEdit* le_skipped;
121 
122  QwtCounter* ct_smoothing;
124  QwtCounter* ct_boundaryPercent;
126  QwtCounter* ct_boundaryPos;
127  QwtCounter* ct_from;
128  QwtCounter* ct_to;
129 
130  QCheckBox* ck_edlast;
131 
133 
134  virtual void update ( int );
135  virtual void data_plot( void );
136 
138  bool mkdir ( const QString&, const QString& );
139 
140  protected slots:
142  virtual void reset ( void );
143 
145  virtual void new_triple ( int );
146 
148  virtual void load ( void );
149 
151  QString indent ( int ) const;
152 
154  QString html_header ( const QString&, const QString&,
155  US_DataIO::EditedData* ) const;
156 
158  QString run_details ( void ) const;
159 
161  QString hydrodynamics( void ) const;
162 
164  QString analysis ( const QString& ) const;
165 
167  QString scan_info ( void ) const;
168 
170  QString table_row ( const QString&, const QString& ) const;
171 
173  QString table_row ( const QString&, const QString&,
174  const QString& ) const;
175 
177  QString table_row ( const QString&, const QString&,
178  const QString&, const QString&,
179  const QString& ) const;
180 
182  QString table_row ( const QString&, const QString&,
183  const QString&, const QString&,
184  const QString&, const QString&,
185  const QString& ) const;
186 
190  double calc_baseline( void ) const;
191 
193  void reportFilesToDB( QStringList& );
194 
196  bool write_dset_report( QString& );
197 
199  virtual void exclude( void );
200 
202  virtual void reset_excludes( void );
203 
205  void smoothing( double );
206 
208  void update_filelist( QStringList&, const QString );
209 
210  private:
211  double* x_weights;
212  double* y_weights;
213 
214  double smooth_point( int, int, int, int, int = 0 );
215 
216  private slots:
217  void details ( void );
218  void boundary_pct ( double );
219  void boundary_pos ( double );
220  void exclude_from ( double );
221  void exclude_to ( double );
222  void update_disk_db( bool );
223  void set_progress ( const QString );
224  void load_noise ( int );
225  void get_solution ( void );
226  void updateSolution( US_Solution );
227  bool query_noise_retain( void );
228  void back_out_noise( int );
229 
230  signals:
232  // void dataLoaded( void );
233  //
234  void dataAreLoaded( void );
235 };
236 #endif