NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/gliderCTD_DataViz.m

Revision 498 (checked in by cbc, 11 years ago)

Initial Calloway revisions to Seim revisions.

Line 
1 %
2 %   gliderCTD_DataViz.m
3 %
4 %   Purpose:  glider CTD data plots user interface
5 %
6 %   Requires:
7 %       gliderCTD_GeneratePlots.m
8 %       gliderCTD_2DPlots.m
9 %       gliderCTD_3DPlots.m
10 %       BATHYMETRY folder - contains bathymetry data
11 %       MATLAB folder - contains util, matutil, seawater, plots, strfun, opnml
12 %       CLIDER_CTD_DATA_LEVEL1 folder - contains Level 1 .mat files
13 %
14 %
15 %   Author:  William Stark
16 %            Marine Sciences Department
17 %            UNC-Chapel Hill
18 %
19 %   Created: 18 June 2012
20 %
21 %   Todo: Have tracks for individual legs instead of just all tracks.
22 %         Get some better bathymetry.
23 %         Move specification of leg endpoints to included .m file.
24 %         Individualize axes bounds per glider but NOT per leg.
25 %         Include legend for all legs TS plot.
26 %
27 %//////////////////////////////////////////////////////////////////////////
28
29
30 function varargout = gliderCTD_DataViz(varargin)
31 %       Description:  User interface for specifying and displaying
32 %                     Slocum glider CTD data visualization plots.
33
34 % (Leave a blank line following the help.)
35
36
37 % global variables...
38 global mGliderIndex;
39 global mDeploymentNumber;
40 global mLegNumber;
41 global mPlotFlag_TS;
42 global mPlotFlag_TS_AllLegs;
43 % global mPlotFlag_TS_Chlorophyll;
44 global mPlotFlag_Temperature;
45 global mPlotFlag_Salinity;
46 global mPlotFlag_Density;
47 % global mPlotFlag_Chlorophyll;
48 global mPlotFlag_TemperatureProfile;
49 global mPlotFlag_SalinityProfile;
50 global mPlotFlag_DensityProfile;
51 % global mPlotFlag_ChlorophyllProfile;
52 global mPlotFlag_Temperature3D;
53 global mPlotFlag_Salinity3D;
54 global mPlotFlag_Density3D;
55 % global mPlotFlag_Chlorophyll3D;
56 global mPlotFlag_AllGliderTracks;
57
58 global mStrPelagiaD1Complete_DateRange;
59 global mStrPelagiaD1L1_DateRange;
60 global mStrPelagiaD1L2_DateRange;
61 global mStrPelagiaD1L3_DateRange;
62 global mStrPelagiaD2Complete_DateRange;
63 global mStrPelagiaD2L1_DateRange;
64 global mStrPelagiaD2L2_DateRange;
65 global mStrPelagiaD2L3_DateRange;
66 global mStrPelagiaD2L4_DateRange;
67 global mStrPelagiaD2L5_DateRange;
68 global mStrPelagiaD3Complete_DateRange;
69 global mStrPelagiaD3L1_DateRange;
70 global mStrPelagiaD3L2_DateRange;
71 global mStrPelagiaD3L3_DateRange;
72 global mStrPelagiaD3L4_DateRange;
73 global mStrPelagiaD3L5_DateRange;
74 global mStrPelagiaD3L6_DateRange;
75
76 global mStrRamsesD1Complete_DateRange;
77 global mStrRamsesD1L1_DateRange;
78 global mStrRamsesD1L2_DateRange;
79 global mStrRamsesD1L3_DateRange;
80 global mStrRamsesD1L4_DateRange;
81 global mStrRamsesD1L5_DateRange;
82 global mStrRamsesD2Complete_DateRange;
83 global mStrRamsesD2L1_DateRange;
84 global mStrRamsesD2L2_DateRange;
85 global mStrRamsesD2L3_DateRange;
86 global mStrRamsesD2L4_DateRange;
87 global mStrRamsesD3Complete_DateRange;
88 global mStrRamsesD3L1_DateRange;
89 global mStrRamsesD3L2_DateRange;
90 global mStrRamsesD3L3_DateRange;
91 global mStrRamsesD3L4_DateRange;
92
93 global mStrComplete_DateRange;
94 global mStrLeg1_DateRange;
95 global mStrLeg2_DateRange;
96 global mStrLeg3_DateRange;
97 global mStrLeg4_DateRange;
98 global mStrLeg5_DateRange;
99 global mStrLeg6_DateRange;
100
101 % initial values...
102 mGliderIndex = 1;
103 mDeploymentNumber = 1;
104 mLegNumber = 0;
105 mPlotFlag_TS = 0;
106 mPlotFlag_TS_AllLegs = 0;
107 % mPlotFlag_TS_Chlorophyll = 0;
108 mPlotFlag_Temperature = 0;
109 mPlotFlag_Salinity = 0;
110 mPlotFlag_Density = 0;
111 % mPlotFlag_Chlorophyll = 0;
112 mPlotFlag_TemperatureProfile = 0;
113 mPlotFlag_SalinityProfile = 0;
114 mPlotFlag_DensityProfile = 0;
115 % mPlotFlag_ChlorophyllProfile = 0;
116 mPlotFlag_Temperature3D = 0;
117 mPlotFlag_Salinity3D = 0;
118 mPlotFlag_Density3D = 0;
119 % mPlotFlag_Chlorophyll3D = 0;
120 mPlotFlag_AllGliderTracks = 0;
121
122 mStrPelagiaD1Complete_DateRange = '26-Jan-2012 01:57:14  to  14-Feb-2012 17:10:38';
123 mStrPelagiaD1L1_DateRange =       '26-Jan-2012 01:57:14  to  31-Jan-2012 12:00:00';
124 mStrPelagiaD1L2_DateRange =       '31-Jan-2012 12:00:01  to  08-Feb-2012 12:00:00';
125 mStrPelagiaD1L3_DateRange =       '08-Feb-2012 12:00:01  to  14-Feb-2012 17:10:38';
126
127 mStrPelagiaD2Complete_DateRange = '16-Feb-2012 13:47:27  to  08-Mar-2012 12:36:28';
128 mStrPelagiaD2L1_DateRange =       '16-Feb-2012 13:47:27  to  18-Feb-2012 10:30:00';
129 mStrPelagiaD2L2_DateRange =       '18-Feb-2012 10:30:01  to  20-Feb-2012 06:00:00';
130 mStrPelagiaD2L3_DateRange =       '20-Feb-2012 06:00:01  to  23-Feb-2012 05:30:00';
131 mStrPelagiaD2L4_DateRange =       '23-Feb-2012 05:30:01  to  29-Feb-2012 02:30:00';
132 mStrPelagiaD2L5_DateRange =       '29-Feb-2012 02:30:01  to  08-Mar-2012 12:36:28';
133
134 mStrPelagiaD3Complete_DateRange = '16-Mar-2012 12:58:45  to  04-Apr-2012 10:36:01';
135 mStrPelagiaD3L1_DateRange =       '16-Mar-2012 12:58:45  to  18-Mar-2012 21:40:00';
136 mStrPelagiaD3L2_DateRange =       '18-Mar-2012 21:40:01  to  22-Mar-2012 17:30:00';
137 mStrPelagiaD3L3_DateRange =       '22-Mar-2012 17:30:01  to  25-Mar-2012 14:00:00';
138 mStrPelagiaD3L4_DateRange =       '25-Mar-2012 14:00:01  to  28-Mar-2012 22:00:00';
139 mStrPelagiaD3L5_DateRange =       '28-Mar-2012 22:00:01  to  31-Mar-2012 19:00:00';
140 mStrPelagiaD3L6_DateRange =       '31-Mar-2012 19:00:01  to  04-Apr-2012 10:36:01';
141
142 mStrRamsesD1Complete_DateRange =  '26-Jan-2012 01:06:22  to  14-Feb-2012 12:35:11';
143 mStrRamsesD1L1_DateRange =        '26-Jan-2012 01:06:22  to  28-Jan-2012 20:00:00';
144 mStrRamsesD1L2_DateRange =        '28-Jan-2012 20:00:01  to  30-Jan-2012 03:00:00';
145 mStrRamsesD1L3_DateRange =        '30-Jan-2012 03:00:01  to  31-Jan-2012 14:00:00';
146 mStrRamsesD1L4_DateRange =        '31-Jan-2012 14:00:01  to  07-Feb-2012 10:30:00';
147 mStrRamsesD1L5_DateRange =        '07-Feb-2012 10:30:01  to  14-Feb-2012 12:35:11';
148
149 mStrRamsesD2Complete_DateRange =  '16-Feb-2012 01:29:39  to  12-Mar-2012 16:24:18';
150 mStrRamsesD2L1_DateRange =        '16-Feb-2012 01:29:39  to  28-Feb-2012 12:00:00';
151 mStrRamsesD2L2_DateRange =        '28-Feb-2012 12:00:01  to  04-Mar-2012 12:00:00';
152 mStrRamsesD2L3_DateRange =        '04-Mar-2012 12:00:01  to  07-Mar-2012 11:30:00';
153 mStrRamsesD2L4_DateRange =        '07-Mar-2012 11:30:01  to  12-Mar-2012 16:24:18';
154
155 mStrRamsesD3Complete_DateRange =  '16-Mar-2012 15:41:35  to  03-Apr-2012 19:24:45';
156 mStrRamsesD3L1_DateRange =        '16-Mar-2012 15:41:35  to  22-Mar-2012 12:00:00';
157 mStrRamsesD3L2_DateRange =        '22-Mar-2012 12:00:01  to  27-Mar-2012 03:00:00';
158 mStrRamsesD3L3_DateRange =        '27-Mar-2012 03:00:01  to  29-Mar-2012 02:00:00';
159 mStrRamsesD3L4_DateRange =        '29-Mar-2012 02:00:01  to  03-Apr-2012 19:24:45';
160
161 % initial date range label strings...
162 mStrComplete_DateRange = mStrPelagiaD1Complete_DateRange;
163 mStrLeg1_DateRange = mStrPelagiaD1L1_DateRange;
164 mStrLeg2_DateRange = mStrPelagiaD1L2_DateRange;
165 mStrLeg3_DateRange = mStrPelagiaD1L3_DateRange;
166 mStrLeg4_DateRange = '';
167 mStrLeg5_DateRange = '';
168 mStrLeg6_DateRange = '';
169
170
171
172 % BEGIN GUI Initialization /////////////////////////////////////////////////////////////////////
173
174 figureWidth = 790;
175 %figureHeight = 690;
176 figureHeight = 670;
177
178 titleTextPosFromLeft = 85;
179 titleTextPosFromBottom = 620;
180 titleTextWidth = 600;
181 titleTextHeight = 35;
182
183 gliderBGPosFromLeft = 20;
184 gliderBGPosFromBottom = 470;
185 gliderBGWidth = 200;
186 gliderBGHeight = 120;
187
188 deploymentBGPosFromLeft = 20;
189 deploymentBGPosFromBottom = 290;
190 deploymentBGWidth = 200;
191 deploymentBGHeight = 160;
192
193 legBGPosFromLeft = 250;
194 legBGPosFromBottom = 290;
195 legBGWidth = 500;
196 legBGHeight = 300;
197
198 plotsBGPosFromLeft = 20;
199 plotsBGPosFromBottom = 110;
200 plotsBGWidth = 730;
201 %plotsBGHeight = 190;
202 plotsBGHeight = 160;
203
204
205 % create figure...
206 guih = figure('MenuBar', 'none', 'Position', [10, 10, figureWidth, figureHeight]);
207
208 % add title text...
209 uicontrol(guih, 'Style', 'text', 'String', ' Slocum Glider CTD Data Visualization', 'FontSize', 16,...
210           'FontWeight', 'bold', 'BackgroundColor', [0.8 0.8 0.8], 'Units', 'pixels',...
211           'Position', [titleTextPosFromLeft titleTextPosFromBottom titleTextWidth titleTextHeight]);
212
213 % add button group to select glider...
214 bghGlider = uibuttongroup('Parent', guih, 'Title', 'Glider', 'FontSize', 14, 'FontWeight', 'bold',...
215                           'Units', 'pixels', 'Position', [gliderBGPosFromLeft gliderBGPosFromBottom gliderBGWidth gliderBGHeight],...
216                           'SelectionChangeFcn', @hGliderSelectionChanged);
217 rbhGlider_Pelagia = uicontrol(bghGlider, 'Style', 'radiobutton', 'String', 'Pelagia', 'FontSize', 14,...
218                               'Units', 'pixels', 'Position', [30 60 120 30]);
219 rbhGlider_Ramses = uicontrol(bghGlider, 'Style', 'radiobutton', 'String', 'Ramses', 'FontSize', 14,...
220                              'Units', 'pixels', 'Position', [30 20 120 30]);
221
222 % add button group to select deployment number...
223 bghDeployment = uibuttongroup('Parent', guih, 'Title', 'Deployment', 'FontSize', 14, 'FontWeight', 'bold',...
224                               'Units', 'pixels', 'Position', [deploymentBGPosFromLeft deploymentBGPosFromBottom deploymentBGWidth deploymentBGHeight],...
225                               'SelectionChangeFcn', @hDeploymentNumberSelectionChanged);                             
226 rbhDeployment_1 = uicontrol(bghDeployment, 'Style', 'radiobutton', 'String', '1', 'FontSize', 14,...
227                             'Units', 'pixels', 'Position', [30 100 140 30]);
228 rbhDeployment_2 = uicontrol(bghDeployment, 'Style', 'radiobutton', 'String', '2', 'FontSize', 14,...
229                            'Units', 'pixels', 'Position', [30 60 140 30]);
230 rbhDeployment_3 = uicontrol(bghDeployment, 'Style', 'radiobutton', 'String', '3', 'FontSize', 14,...
231                            'Units', 'pixels', 'Position', [30 20 140 30]);
232                          
233 % add button group to select leg number...
234 bghLeg = uibuttongroup('Parent', guih, 'Title', 'Leg', 'FontSize', 14, 'FontWeight', 'bold',...
235                        'Units', 'pixels', 'Position', [legBGPosFromLeft legBGPosFromBottom legBGWidth legBGHeight],...
236                        'SelectionChangeFcn', @hLegNumberSelectionChanged);
237                    
238 rbhLeg_0 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', 'All', 'FontSize', 14,...
239                      'Units', 'pixels', 'Position', [30 235 50 30]);
240 sthLeg_0 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrComplete_DateRange, 'FontSize', 10,...
241                      'Units', 'pixels', 'Position', [90 240 380 20]);
242
243 rbhLeg_1 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '1', 'FontSize', 14,...
244                      'Units', 'pixels', 'Position', [30 200 50 30]);
245 sthLeg_1 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg1_DateRange, 'FontSize', 10,...
246                      'Units', 'pixels', 'Position', [90 205 380 20]);
247                  
248 rbhLeg_2 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '2', 'FontSize', 14,...
249                     'Units', 'pixels', 'Position', [30 165 50 30]);
250 sthLeg_2 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg2_DateRange, 'FontSize', 10,...
251                      'Units', 'pixels', 'Position', [90 170 380 20]);
252                
253 rbhLeg_3 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '3', 'FontSize', 14,...
254                      'Units', 'pixels', 'Position', [30 130 50 30]);
255 sthLeg_3 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg3_DateRange, 'FontSize', 10,...
256                      'Units', 'pixels', 'Position', [90 135 380 20]);
257                  
258 rbhLeg_4 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '4', 'FontSize', 14,...
259                      'Units', 'pixels', 'Position', [30 95 50 30]);
260 sthLeg_4 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg4_DateRange, 'FontSize', 10,...
261                      'Units', 'pixels', 'Position', [90 100 380 20]);
262
263 rbhLeg_5 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '5', 'FontSize', 14,...
264                      'Units', 'pixels', 'Position', [30 60 50 30]);
265 sthLeg_5 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg5_DateRange, 'FontSize', 10,...
266                      'Units', 'pixels', 'Position', [90 65 380 20]);
267                  
268 rbhLeg_6 = uicontrol(bghLeg, 'Style', 'radiobutton', 'String', '6', 'FontSize', 14,...
269                      'Units', 'pixels', 'Position', [30 25 50 30]);
270 sthLeg_6 = uicontrol(bghLeg, 'Style', 'text', 'String', mStrLeg6_DateRange, 'FontSize', 10,...
271                      'Units', 'pixels', 'Position', [90 30 380 20]);
272
273                  
274 % initial visibility settings for leg radio buttons...
275 set(rbhLeg_0, 'Visible', 'on');
276 set(rbhLeg_1, 'Visible', 'on');
277 set(rbhLeg_2, 'Visible', 'on');
278 set(rbhLeg_3, 'Visible', 'on');
279 set(rbhLeg_4, 'Visible', 'off');
280 set(rbhLeg_5, 'Visible', 'off');
281 set(rbhLeg_6, 'Visible', 'off');
282
283
284
285 % add button group to select which data plots to display...
286 bghPlotType = uibuttongroup('Parent', guih, 'Title', 'Data Plots', 'FontSize', 14, 'FontWeight', 'bold',...
287                             'Units', 'pixels', 'Position', [plotsBGPosFromLeft plotsBGPosFromBottom plotsBGWidth plotsBGHeight]);
288 cbhPlot_1 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'All Glider Tracks', 'FontSize', 10,...
289                       'Units', 'pixels', 'Position', [30 90 160 30], 'Callback', @checkbox1_Callback);
290 cbhPlot_2 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'TS', 'FontSize', 10,...
291                       'Units', 'pixels', 'Position', [30 55 160 30], 'Callback', @checkbox2_Callback);
292 cbhPlot_3 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'TS (all legs)', 'FontSize', 10,...
293                       'Units', 'pixels', 'Position', [30 20 160 30], 'Callback', @checkbox3_Callback);
294 % cbhPlot_4 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'TS (with Chlorophyll)', 'FontSize', 10,...
295 %                       'Units', 'pixels', 'Position', [30 105 160 30], 'Callback', @checkbox4_Callback);
296 cbhPlot_5 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Temperature', 'FontSize', 10,...
297                       'Units', 'pixels', 'Position', [220 90 160 30], 'Callback', @checkbox5_Callback);                 
298 cbhPlot_6 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Salinity', 'FontSize', 10,...
299                       'Units', 'pixels', 'Position', [220 55 160 30], 'Callback', @checkbox6_Callback);
300 cbhPlot_7 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Density', 'FontSize', 10,...
301                       'Units', 'pixels', 'Position', [220 20 160 30], 'Callback', @checkbox7_Callback);
302 % cbhPlot_8 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Chlorophyll', 'FontSize', 10,...
303 %                       'Units', 'pixels', 'Position', [220 105 160 30], 'Callback', @checkbox8_Callback);
304 cbhPlot_9 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Temperature Profile', 'FontSize', 10,...
305                       'Units', 'pixels', 'Position', [370 90 160 30], 'Callback', @checkbox9_Callback);
306 cbhPlot_10 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Salinity Profile', 'FontSize', 10,...
307                       'Units', 'pixels', 'Position', [370 55 160 30], 'Callback', @checkbox10_Callback);
308 cbhPlot_11 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Density Profile', 'FontSize', 10,...
309                       'Units', 'pixels', 'Position', [370 20 160 30], 'Callback', @checkbox11_Callback);
310 % cbhPlot_12 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', 'Chlorophyll Profile', 'FontSize', 10,...
311 %                        'Units', 'pixels', 'Position', [370 105 160 30], 'Callback', @checkbox12_Callback);
312 cbhPlot_13 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', '3D Temperature', 'FontSize', 10,...
313                        'Units', 'pixels', 'Position', [560 90 160 30], 'Callback', @checkbox13_Callback);
314 cbhPlot_14 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', '3D Salinity', 'FontSize', 10,...
315                        'Units', 'pixels', 'Position', [560 55 160 30], 'Callback', @checkbox14_Callback);
316 cbhPlot_15 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', '3D Density', 'FontSize', 10,...
317                        'Units', 'pixels', 'Position', [560 20 160 30], 'Callback', @checkbox15_Callback);
318 % cbhPlot_16 = uicontrol(bghPlotType, 'Style', 'checkbox', 'String', '3D Chlorophyll', 'FontSize', 10,...
319 %                        'Units', 'pixels', 'Position', [560 105 160 30], 'Callback', @checkbox16_Callback);
320
321                  
322                  
323 % add push button to display plots                 
324 pbhGeneratePlots = uicontrol(guih, 'Style', 'pushbutton',...
325                              'String', 'Generate Plots', 'FontSize', 14, 'FontWeight', 'bold',...
326                              'Units', 'pixels', 'Position', [280 30 200 60],...
327                              'Callback', @generatePlots_Callback);
328
329
330 % END GUI Initialization /////////////////////////////////////////////////////////////////////
331
332
333
334
335 % BEGIN GUI Callbacks ////////////////////////////////////////////////////////////////////////
336
337     %/// CALLBACK - RADIO BUTTONS FOR GLIDER NAME //////////////////////////////////////
338     %----------------------------------------------------------------------
339     function hGliderSelectionChanged(hObject, eventdata)
340     % callback called when the selected glider is changed
341         selected = get(bghGlider, 'SelectedObject');
342         radioButtonLabel = get(selected, 'String');
343        
344         if (strcmp(radioButtonLabel, 'Pelagia'))
345             mGliderIndex = 1;
346         else
347             mGliderIndex = 2;
348         end
349        
350         updateLegRadioButtons(mGliderIndex, mDeploymentNumber);
351     end
352
353     %/// CALLBACK - RADIO BUTTONS FOR DEPLOYMENT NUMBER //////////////////////////////////////
354     %----------------------------------------------------------------------
355     function hDeploymentNumberSelectionChanged(hObject, eventdata)
356     % callback called when the selected deployment number is changed
357         selected = get(bghDeployment, 'SelectedObject');
358         radioButtonLabel = get(selected, 'String');
359        
360         if (strcmp(radioButtonLabel, '1'))
361             mDeploymentNumber = 1;
362         elseif (strcmp(radioButtonLabel, '2'))
363             mDeploymentNumber = 2;
364         else
365             mDeploymentNumber = 3;
366         end
367        
368         updateLegRadioButtons(mGliderIndex, mDeploymentNumber);
369     end
370
371
372     %/// CALLBACK - RADIO BUTTONS FOR LEG NUMBER //////////////////////////////////////
373     %----------------------------------------------------------------------
374     function hLegNumberSelectionChanged(hObject, eventdata)
375     % callback called when the selected leg number is changed
376         selected = get(bghLeg, 'SelectedObject');
377         radioButtonLabel = get(selected, 'String');
378        
379         if (strcmp(radioButtonLabel, 'All'))
380             mLegNumber = 0;
381         elseif (strcmp(radioButtonLabel, '1'))
382             mLegNumber = 1;
383         elseif (strcmp(radioButtonLabel, '2'))
384             mLegNumber = 2;
385         elseif (strcmp(radioButtonLabel, '3'))
386             mLegNumber = 3;
387         elseif (strcmp(radioButtonLabel, '4'))
388             mLegNumber = 4;
389         elseif (strcmp(radioButtonLabel, '5'))
390             mLegNumber = 5;
391         else
392             mLegNumber = 6;
393         end
394     end
395
396
397     %/// CALLBACKS - CHECKBOXES FOR PLOT TYPES //////////////////////////////////////
398     %----------------------------------------------------------------------
399     function checkbox1_Callback(hObject, eventdata, handles)
400         % callback called when the All Glider Tracks plot checkbox is checked
401         if (get(hObject,'Value') == get(hObject,'Max'))
402             mPlotFlag_AllGliderTracks = 1;
403         else
404             mPlotFlag_AllGliderTracks = 0;
405         end
406     end
407
408     %----------------------------------------------------------------------
409     function checkbox2_Callback(hObject, eventdata, handles)
410         % callback called when the TS plot checkbox is checked
411         if (get(hObject,'Value') == get(hObject,'Max'))
412             mPlotFlag_TS = 1;
413         else
414             mPlotFlag_TS = 0;
415         end
416     end
417
418     %----------------------------------------------------------------------
419     function checkbox3_Callback(hObject, eventdata, handles)
420         % callback called when the TS-All Legs plot checkbox is checked
421         if (get(hObject,'Value') == get(hObject,'Max'))
422             mPlotFlag_TS_AllLegs = 1;
423         else
424             mPlotFlag_TS_AllLegs = 0;
425         end
426     end
427
428     %----------------------------------------------------------------------
429     % function checkbox4_Callback(hObject, eventdata, handles)
430     %     % callback called when the TS-Chlorophyll plot checkbox is checked
431     %     if (get(hObject,'Value') == get(hObject,'Max'))
432     %         mPlotFlag_TS_Chlorophyll = 1;
433     %     else
434     %         mPlotFlag_TS_Chlorophyll = 0;
435     %     end
436     % end
437
438     %----------------------------------------------------------------------
439     function checkbox5_Callback(hObject, eventdata, handles)
440         % callback called when the temperature plot checkbox is checked
441         if (get(hObject,'Value') == get(hObject,'Max'))
442             mPlotFlag_Temperature = 1;
443         else
444             mPlotFlag_Temperature = 0;
445         end
446     end
447
448     %----------------------------------------------------------------------
449     function checkbox6_Callback(hObject, eventdata, handles)
450         % callback called when the salinity plot checkbox is checked
451         if (get(hObject,'Value') == get(hObject,'Max'))
452             mPlotFlag_Salinity = 1;
453         else
454             mPlotFlag_Salinity = 0;
455         end
456     end
457
458     %----------------------------------------------------------------------
459     function checkbox7_Callback(hObject, eventdata, handles)
460         % callback called when the density plot checkbox is checked
461         if (get(hObject,'Value') == get(hObject,'Max'))
462             mPlotFlag_Density = 1;
463         else
464             mPlotFlag_Density = 0;
465         end
466     end
467
468     %----------------------------------------------------------------------
469     % function checkbox8_Callback(hObject, eventdata, handles)
470     %     % callback called when the chlorophyll plot checkbox is checked
471     %     if (get(hObject,'Value') == get(hObject,'Max'))
472     %         mPlotFlag_Chlorophyll = 1;
473     %     else
474     %         mPlotFlag_Chlorophyll = 0;
475     %     end
476     % end
477
478     %----------------------------------------------------------------------
479     function checkbox9_Callback(hObject, eventdata, handles)
480         % callback called when the temperature profile plot checkbox is checked
481         if (get(hObject,'Value') == get(hObject,'Max'))
482             mPlotFlag_TemperatureProfile = 1;
483         else
484             mPlotFlag_TemperatureProfile = 0;
485         end
486     end
487
488     %----------------------------------------------------------------------
489     function checkbox10_Callback(hObject, eventdata, handles)
490         % callback called when the salinity profile plot checkbox is checked
491         if (get(hObject,'Value') == get(hObject,'Max'))
492             mPlotFlag_SalinityProfile = 1;
493         else
494             mPlotFlag_SalinityProfile = 0;
495         end
496     end
497
498     %----------------------------------------------------------------------
499     function checkbox11_Callback(hObject, eventdata, handles)
500         % callback called when the density profile plot checkbox is checked
501         if (get(hObject,'Value') == get(hObject,'Max'))
502             mPlotFlag_DensityProfile = 1;
503         else
504             mPlotFlag_DensityProfile = 0;
505         end
506     end
507
508     %----------------------------------------------------------------------
509     % function checkbox12_Callback(hObject, eventdata, handles)
510     %     % callback called when the chlorophyll profile plot checkbox is checked
511     %     if (get(hObject,'Value') == get(hObject,'Max'))
512     %         mPlotFlag_ChlorophyllProfile = 1;
513     %     else
514     %         mPlotFlag_ChlorophyllProfile = 0;
515     %     end
516     % end
517
518     %----------------------------------------------------------------------
519     function checkbox13_Callback(hObject, eventdata, handles)
520         % callback called when the 3D temperature plot checkbox is checked
521         if (get(hObject,'Value') == get(hObject,'Max'))
522             mPlotFlag_Temperature3D = 1;
523         else
524             mPlotFlag_Temperature3D = 0;
525         end
526     end
527
528     %----------------------------------------------------------------------
529     function checkbox14_Callback(hObject, eventdata, handles)
530         % callback called when the 3D salinity plot checkbox is checked
531         if (get(hObject,'Value') == get(hObject,'Max'))
532             mPlotFlag_Salinity3D = 1;
533         else
534             mPlotFlag_Salinity3D = 0;
535         end
536     end
537
538     %----------------------------------------------------------------------
539     function checkbox15_Callback(hObject, eventdata, handles)
540         % callback called when the 3D density plot checkbox is checked
541         if (get(hObject,'Value') == get(hObject,'Max'))
542             mPlotFlag_Density3D = 1;
543         else
544             mPlotFlag_Density3D = 0;
545         end
546     end
547
548     %----------------------------------------------------------------------
549     % function checkbox16_Callback(hObject, eventdata, handles)
550     %     % callback called when the 3D chlorophyll plot checkbox is checked
551     %     if (get(hObject,'Value') == get(hObject,'Max'))
552     %         mPlotFlag_Chlorophyll3D = 1;
553     %     else
554     %         mPlotFlag_Chlorophyll3D = 0;
555     %     end
556     % end
557
558
559
560
561     %----------------------------------------------------------------------
562     function updateLegRadioButtons(mGliderIndex, mDeploymentNumber)
563        
564         switch mGliderIndex
565             case 1  % Pelagia
566                 switch mDeploymentNumber
567                     case 1  % Deployment 1
568                         set(rbhLeg_0, 'Visible', 'on');
569                         set(sthLeg_0, 'String', mStrPelagiaD1Complete_DateRange, 'Visible', 'on');                       
570                         set(rbhLeg_1, 'Visible', 'on');
571                         set(sthLeg_1, 'String', mStrPelagiaD1L1_DateRange, 'Visible', 'on');                       
572                         set(rbhLeg_2, 'Visible', 'on');
573                         set(sthLeg_2, 'String', mStrPelagiaD1L2_DateRange, 'Visible', 'on');                       
574                         set(rbhLeg_3, 'Visible', 'on');
575                         set(sthLeg_3, 'String', mStrPelagiaD1L3_DateRange, 'Visible', 'on');                       
576                         set(rbhLeg_4, 'Visible', 'off');
577                         set(sthLeg_4, 'Visible', 'off');
578                         set(rbhLeg_5, 'Visible', 'off');
579                         set(sthLeg_5, 'Visible', 'off');
580                         set(rbhLeg_6, 'Visible', 'off');
581                         set(sthLeg_6, 'Visible', 'off');
582                     case 2  % Deployment 2
583                         set(rbhLeg_0, 'Visible', 'on');
584                         set(sthLeg_0, 'String', mStrPelagiaD2Complete_DateRange, 'Visible', 'on');                       
585                         set(rbhLeg_1, 'Visible', 'on');
586                         set(sthLeg_1, 'String', mStrPelagiaD2L1_DateRange, 'Visible', 'on');
587                         set(rbhLeg_2, 'Visible', 'on');
588                         set(sthLeg_2, 'String', mStrPelagiaD2L2_DateRange, 'Visible', 'on');
589                         set(rbhLeg_3, 'Visible', 'on');
590                         set(sthLeg_3, 'String', mStrPelagiaD2L3_DateRange, 'Visible', 'on');
591                         set(rbhLeg_4, 'Visible', 'on');
592                         set(sthLeg_4, 'String', mStrPelagiaD2L4_DateRange, 'Visible', 'on');
593                         set(rbhLeg_5, 'Visible', 'on');
594                         set(sthLeg_5, 'String', mStrPelagiaD2L5_DateRange, 'Visible', 'on');
595                         set(rbhLeg_6, 'Visible', 'off');
596                         set(sthLeg_6, 'Visible', 'off');
597                     case 3  % Deployment 3
598                         set(rbhLeg_0, 'Visible', 'on');
599                         set(sthLeg_0, 'String', mStrPelagiaD3Complete_DateRange, 'Visible', 'on');                       
600                         set(rbhLeg_1, 'Visible', 'on');
601                         set(sthLeg_1, 'String', mStrPelagiaD3L1_DateRange, 'Visible', 'on');
602                         set(rbhLeg_2, 'Visible', 'on');
603                         set(sthLeg_2, 'String', mStrPelagiaD3L2_DateRange, 'Visible', 'on');
604                         set(rbhLeg_3, 'Visible', 'on');
605                         set(sthLeg_3, 'String', mStrPelagiaD3L3_DateRange, 'Visible', 'on');
606                         set(rbhLeg_4, 'Visible', 'on');
607                         set(sthLeg_4, 'String', mStrPelagiaD3L4_DateRange, 'Visible', 'on');
608                         set(rbhLeg_5, 'Visible', 'on');
609                         set(sthLeg_5, 'String', mStrPelagiaD3L5_DateRange, 'Visible', 'on');
610                         set(rbhLeg_6, 'Visible', 'on');
611                         set(sthLeg_6, 'String', mStrPelagiaD3L6_DateRange, 'Visible', 'on');
612                 end
613             case 2  % Ramses
614                 switch mDeploymentNumber
615                     case 1  % Deployment 1
616                         set(rbhLeg_0, 'Visible', 'on');
617                         set(sthLeg_0, 'String', mStrRamsesD1Complete_DateRange, 'Visible', 'on');                       
618                         set(rbhLeg_1, 'Visible', 'on');
619                         set(sthLeg_1, 'String', mStrRamsesD1L1_DateRange, 'Visible', 'on');
620                         set(rbhLeg_2, 'Visible', 'on');
621                         set(sthLeg_2, 'String', mStrRamsesD1L2_DateRange, 'Visible', 'on');
622                         set(rbhLeg_3, 'Visible', 'on');
623                         set(sthLeg_3, 'String', mStrRamsesD1L3_DateRange, 'Visible', 'on');
624                         set(rbhLeg_4, 'Visible', 'on');
625                         set(sthLeg_4, 'String', mStrRamsesD1L4_DateRange, 'Visible', 'on');
626                         set(rbhLeg_5, 'Visible', 'on');
627                         set(sthLeg_5, 'String', mStrRamsesD1L5_DateRange, 'Visible', 'on');
628                         set(rbhLeg_6, 'Visible', 'off');
629                         set(sthLeg_6, 'Visible', 'off');
630                     case 2  % Deployment 2
631                         set(rbhLeg_0, 'Visible', 'on');
632                         set(sthLeg_0, 'String', mStrRamsesD2Complete_DateRange, 'Visible', 'on');               
633                         set(rbhLeg_1, 'Visible', 'on');
634                         set(sthLeg_1, 'String', mStrRamsesD2L1_DateRange, 'Visible', 'on');
635                         set(rbhLeg_2, 'Visible', 'on');
636                         set(sthLeg_2, 'String', mStrRamsesD2L2_DateRange, 'Visible', 'on');
637                         set(rbhLeg_3, 'Visible', 'on');
638                         set(sthLeg_3, 'String', mStrRamsesD2L3_DateRange, 'Visible', 'on');
639                         set(rbhLeg_4, 'Visible', 'on');
640                         set(sthLeg_4, 'String', mStrRamsesD2L4_DateRange, 'Visible', 'on');
641                         set(rbhLeg_5, 'Visible', 'off');
642                         set(sthLeg_5, 'Visible', 'off');
643                         set(rbhLeg_6, 'Visible', 'off');
644                         set(sthLeg_6, 'Visible', 'off');
645                     case 3  % Deployment 3
646                         set(rbhLeg_0, 'Visible', 'on');
647                         set(sthLeg_0, 'String', mStrRamsesD3Complete_DateRange, 'Visible', 'on');               
648                         set(rbhLeg_1, 'Visible', 'on');
649                         set(sthLeg_1, 'String', mStrRamsesD3L1_DateRange, 'Visible', 'on');
650                         set(rbhLeg_2, 'Visible', 'on');
651                         set(sthLeg_2, 'String', mStrRamsesD3L2_DateRange, 'Visible', 'on');
652                         set(rbhLeg_3, 'Visible', 'on');
653                         set(sthLeg_3, 'String', mStrRamsesD3L3_DateRange, 'Visible', 'on');
654                         set(rbhLeg_4, 'Visible', 'on');
655                         set(sthLeg_4, 'String', mStrRamsesD3L4_DateRange, 'Visible', 'on');
656                         set(rbhLeg_5, 'Visible', 'off');
657                         set(sthLeg_5, 'Visible', 'off');
658                         set(rbhLeg_6, 'Visible', 'off');
659                         set(sthLeg_6, 'Visible', 'off');
660                 end
661         end
662     end
663
664
665     %----------------------------------------------------------------------
666     function generatePlots_Callback(hObject, eventdata, handles)
667         % callback called when the Generate Plots button is clicked
668        
669         gliderCTD_GeneratePlots(mGliderIndex, mDeploymentNumber, mLegNumber,...
670                                 mPlotFlag_TS, mPlotFlag_TS_AllLegs,...
671                                 mPlotFlag_Temperature, mPlotFlag_Salinity, mPlotFlag_Density,...
672                                 mPlotFlag_TemperatureProfile,...
673                                 mPlotFlag_SalinityProfile, mPlotFlag_DensityProfile,...
674                                 mPlotFlag_Temperature3D,...
675                                 mPlotFlag_Salinity3D, mPlotFlag_Density3D,...
676                                 mPlotFlag_AllGliderTracks);
677                            
678     end
679
680 % END GUI Callbacks //////////////////////////////////////////////////////////////////////////
681
682
683 end
Note: See TracBrowser for help on using the browser.