UltraScan III
us_mwlr_viewer.h
Go to the documentation of this file.
1 #ifndef US_MWLR_VIEWER_H
3 #define US_MWLR_VIEWER_H
4 
5 #include <QtGui>
6 
7 #include "us_extern.h"
8 #include "us_widgets.h"
9 #include "us_help.h"
10 #include "us_plot.h"
11 #include "us_mwl_data.h"
12 #include "us_plot3d_xyz.h"
13 #include "us_mwl_pltctrl.h"
14 #include "us_dataIO.h"
15 
17 {
18  Q_OBJECT
19 
20  public:
21 
24 
25  private:
26  QPointer< US_MwlPlotControl > p3d_ctld;
27  QPointer< US_Plot3Dxyz > p3d_pltw;
28 
29  QVector< double > curr_adata;
30 
31  QVector< QVector< double > > curr_cdata;
32  QVector< QVector< double > > prev_cdata;
33 
34  QVector< QVector3D > xyzdat;
35  QVector< QVector< QVector3D > > xyzdats;
36  QVector< double > yvals3d;
37 
38  QVector< US_DataIO::RawData > allData;
39 
40  QVector< double > pltxvals;
41  QVector< double > radii;
42  QVector< int > lambdas;
43  QVector< int > curr_recxs;
44  QVector< int > prev_recxs;
45 
46  QList< int > excludes;
47 
49 
50  QStringList mwl_fnames;
51  QStringList cellchans;
52 
55 
56  QLabel* lb_pltrec;
57 
58  QLineEdit* le_runID;
59  QLineEdit* le_dir;
60  QLineEdit* le_status;
61 
62  QComboBox* cb_cellchn;
63  QComboBox* cb_rstart;
64  QComboBox* cb_rend;
65  QComboBox* cb_lstart;
66  QComboBox* cb_lend;
67  QComboBox* cb_pltrec;
68 
69  QwtCounter* ct_recavg;
70  QwtCounter* ct_from;
71  QwtCounter* ct_to;
72 
73  QCheckBox* ck_xwavlen;
74  QCheckBox* ck_hcolorc;
75 
76  QPushButton* pb_loadMwl;
77  QPushButton* pb_loadAUC;
78  QPushButton* pb_reset;
79  QPushButton* pb_details;
80  QPushButton* pb_prev;
81  QPushButton* pb_next;
82  QPushButton* pb_exclude;
83  QPushButton* pb_include;
84  QPushButton* pb_plot2d;
85  QPushButton* pb_movie2d;
86  QPushButton* pb_plot3d;
87  QPushButton* pb_movie3d;
88  QPushButton* pb_svplot;
89  QPushButton* pb_svmovie;
90 
91  QwtPlot* data_plot;
92  QwtPlotGrid* grid;
93 
94  QString currentDir;
95  QString runID;
96 
97  int nscan;
98  int ncell;
99  int nchan;
100  int ncellch;
101  int ntriple;
102  int nlambda;
103  int npoint;
104  int ntpoint;
105  int navgrec;
107  int ccx;
109  int lmb_end;
110  int recx;
111  int lmbxs;
112  int lmbxe;
113  int radxs;
114  int radxe;
115  int klambda;
116  int kradii;
117  int kscan;
118  int krecs;
119  int kpoint;
120  int ktpoint;
121  int trpxs;
122  int k3dscan;
123  int k3dlamb;
124  int k3drads;
125  int k3dsize;
126 
127  bool is_wrecs;
128  bool have_rngs;
129 
130  double last_xmin;
131  double last_xmax;
132  double last_ymin;
133  double last_ymax;
134  double rad_start;
135  double rad_end;
136 
137  private slots:
138  void reset ( void );
139  void load_mwl_raw ( void );
140  void load_auc_mwl ( void );
141  void plot_current ( void );
142  void plot_titles ( void );
143  void plot_all ( void );
144  void build_cmp_data ( void );
145  void build_avg_data ( void );
146  void build_rec_data ( const int, QVector< double >& );
147  void enableControls ( void );
148  void runDetails ( void );
149  void changeCellCh ( void );
150  void changeRadius ( void );
151  void changeLambda ( void );
152  void changeAverage ( void );
153  void changeRecord ( void );
154  void changeRectype ( bool );
155  void show_2d_movie ( void );
156  void plot_3d ( void );
157  void show_3d_movie ( void );
158  void save_plot ( void );
159  void save_movie ( void );
160  void save_2d_movie ( void );
161  void save_3d_movie ( void );
162  void resetAll ( void );
163  void prevPlot ( void );
164  void nextPlot ( void );
165  void compute_ranges ( void );
166  void connect_ranges ( bool );
167  void exclude_from ( double );
168  void exclude_to ( double );
169  void exclude_scans ( void );
170  void include_scans ( void );
171  int dvec_index ( QVector< double >&, const double );
172  int build_xyz_data ( QVector< QVector3D >&, int = -1 );
173  void p3dctrl_closed ( void );
174  int live_scan ( int* = 0, int* = 0, int* = 0 );
175  void help ( void )
176  { showHelp.show_help( "mwlr_viewer.html" ); };
177 };
178 #endif
179