0001 function varargout = VMT(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 gui_Singleton = 1;
0034 gui_State = struct('gui_Name', mfilename, ...
0035 'gui_Singleton', gui_Singleton, ...
0036 'gui_OpeningFcn', @VMT_OpeningFcn, ...
0037 'gui_OutputFcn', @VMT_OutputFcn, ...
0038 'gui_LayoutFcn', [] , ...
0039 'gui_Callback', []);
0040 if nargin && ischar(varargin{1})
0041 gui_State.gui_Callback = str2func(varargin{1});
0042 end
0043
0044
0045 try
0046 if nargout
0047 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0048 else
0049 gui_mainfcn(gui_State, varargin{:});
0050 end
0051
0052 catch err
0053 if isdeployed
0054 errLogFileName = fullfile(pwd,...
0055 ['errorLog' datestr(now,'yyyymmddHHMMSS') '.txt']);
0056 msgbox({['An unexpected error occurred. Error code: ' err.identifier];...
0057 ['Error details are being written to the following file: '];...
0058 errLogFileName},...
0059 'VMT Status: Unexpected Error',...
0060 'error');
0061 fid = fopen(errLogFileName,'W');
0062 fwrite(fid,err.getReport('extended','hyperlinks','off'));
0063 fclose(fid);
0064 rethrow(err)
0065 else
0066 msgbox(['An unexpected error occurred. Error code: ' err.identifier],...
0067 'VMT Status: Unexpected Error',...
0068 'error');
0069 rethrow(err);
0070 end
0071 end
0072
0073
0074
0075
0076
0077 function VMT_OpeningFcn(hObject, eventdata, handles, varargin)
0078
0079
0080
0081
0082
0083
0084
0085 handles.output = hObject;
0086
0087
0088
0089 handles = buildToolbar(handles);
0090
0091
0092
0093 if ~isdeployed
0094 filesep = '\';
0095 utilspath = [pwd filesep 'utils'];
0096 docspath = [pwd filesep 'doc'];
0097 toolspath = [pwd filesep 'tools'];
0098 addpath(utilspath,docspath,toolspath)
0099 end
0100
0101
0102
0103 guidata(hObject, handles);
0104
0105
0106
0107 load_prefs(handles.figure1)
0108
0109
0110
0111 guiparams = createGUIparams;
0112 guiparams.vmt_version = 'v4.06';
0113
0114
0115
0116 pos = get(handles.figure1,'position');
0117 axes(handles.VMTBackground);
0118
0119 X = imread('VMT_Background.png');
0120 imdisp(X,'size',[pos(4) pos(3)])
0121
0122
0123
0124
0125
0126
0127 uistack(handles.VMTBackground,'bottom')
0128
0129
0130
0131 setappdata(handles.figure1,'guiparams',guiparams)
0132
0133
0134 store_prefs(handles.figure1,'runcounter')
0135
0136
0137
0138 thres = 20;
0139 runcounter = getpref('VMT','runcounter');
0140 time_to_check = (mod(runcounter,thres)==0);
0141 if time_to_check
0142 menuCheckForUpdates_Callback(hObject, eventdata, handles)
0143 end
0144
0145
0146
0147 initGUI(handles)
0148 set_enable(handles,'init')
0149
0150
0151 pos = get(handles.figure1,'Position');
0152
0153
0154 movegui(handles.figure1,'center')
0155 set(handles.figure1,'Resize','on')
0156
0157
0158
0159 setappdata(0 , 'hVMTgui' , gcf);
0160
0161
0162
0163
0164
0165
0166
0167 function varargout = VMT_OutputFcn(hObject, eventdata, handles)
0168
0169
0170
0171
0172
0173
0174 varargout{1} = handles.output;
0175
0176
0177
0178 function figure1_ResizeFcn(hObject, eventdata, handles)
0179
0180
0181
0182 pos = get(handles.figure1,'position');
0183 axes(handles.VMTBackground);
0184
0185 X = imread('VMT_Background.png');
0186 imdisp(X,'size',[pos(4) pos(3)])
0187
0188
0189
0190
0191
0192
0193 uistack(handles.VMTBackground,'bottom')
0194
0195
0196 function figure1_CloseRequestFcn(hObject, eventdata, handles)
0197
0198
0199
0200
0201
0202 who_called = get(hObject,'tag');
0203 close_button = questdlg(...
0204 'You are about to exit VMT. Any unsaved work will be lost. Are you sure?',...
0205 'Exit VMT?','No');
0206 switch close_button
0207 case 'Yes'
0208 closereq
0209 close all hidden
0210 otherwise
0211 return
0212 end
0213
0214
0215
0216
0217
0218
0219
0220 function menuFile_Callback(hObject, eventdata, handles)
0221
0222
0223
0224 function menuOpen_Callback(hObject, eventdata, handles)
0225
0226
0227
0228 function menuOpenASCII_Callback(hObject, eventdata, handles)
0229 loadDataCallback(hObject, eventdata, handles)
0230
0231
0232
0233 function menuOpenMAT_Callback(hObject, eventdata, handles)
0234
0235
0236
0237 guiparams = getappdata(handles.figure1,'guiparams');
0238 guiprefs = getappdata(handles.figure1,'guiprefs');
0239
0240
0241
0242
0243
0244 if iscell(guiprefs.mat_file)
0245 uifile = fullfile(guiprefs.mat_path,guiprefs.mat_file{1});
0246 else
0247 uifile = fullfile(guiprefs.mat_path,guiprefs.mat_file);
0248 end
0249 [filename,pathname] = ...
0250 uigetfile({'*.mat','MAT-files (*.mat)'}, ...
0251 'Select MAT File', ...
0252 uifile, 'MultiSelect','on');
0253
0254 if ischar(filename)
0255
0256
0257 vars = load(fullfile(pathname,filename));
0258
0259
0260
0261 varnames = fieldnames(vars);
0262 if isequal(sort(varnames),{'A' 'Map' 'V' 'z'}')
0263 guiparams.mat_path = pathname;
0264 guiparams.mat_file = filename;
0265 guiparams.z = vars.z;
0266 guiparams.A = vars.A;
0267 guiparams.V = vars.V;
0268
0269
0270
0271 guiprefs = getappdata(handles.figure1,'guiprefs');
0272 guiprefs.mat_path = pathname;
0273 guiprefs.mat_file = filename;
0274 setappdata(handles.figure1,'guiprefs',guiprefs)
0275 store_prefs(handles.figure1,'mat')
0276
0277
0278
0279 setappdata(handles.figure1,'guiparams',guiparams)
0280
0281
0282
0283 set(handles.HorizontalGridNodeSpacing,'String',vars.A(1).hgns)
0284 set_enable(handles,'fileloaded')
0285 else
0286 errordlg('The selected file is not a valid ADCP data MAT file.', ...
0287 'Invalid File...')
0288 end
0289
0290
0291
0292
0293
0294 if vars.A(1).Sup.wm ~= 3
0295 set(handles.VerticalGridNodeSpacing,'String',double(vars.A(1).Sup.binSize_cm(1))/100)
0296 else
0297 set(handles.VerticalGridNodeSpacing,'String',0.4)
0298 end
0299
0300 elseif iscell(filename)
0301
0302
0303 guiparams.mat_path = pathname;
0304 guiparams.mat_file = filename;
0305
0306
0307
0308 log_text = {...
0309 'Loading previously processed MAT files.';...
0310 'Directory:'};
0311 log_text = vertcat(log_text, pathname, {'Files:'}, filename');
0312 statusLogging(handles.LogWindow,log_text)
0313
0314
0315
0316 setappdata(handles.figure1,'guiparams',guiparams)
0317
0318
0319
0320 guiprefs = getappdata(handles.figure1,'guiprefs');
0321 guiprefs.mat_path = pathname;
0322 guiprefs.mat_file = filename;
0323 setappdata(handles.figure1,'guiprefs',guiprefs)
0324 store_prefs(handles.figure1,'mat')
0325
0326
0327
0328 set_enable(handles,'multiplematfiles')
0329 end
0330
0331
0332
0333
0334 function menuSave_Callback(hObject, eventdata, handles)
0335
0336
0337
0338 function menuSaveMAT_Callback(hObject, eventdata, handles)
0339 saveDataCallback(hObject, eventdata, handles)
0340
0341
0342
0343 function menuSaveTecplot_Callback(hObject, eventdata, handles)
0344 SaveTecplotFile_Callback(handles,eventdata,handles)
0345
0346
0347
0348 function menuSaveKMZFile_Callback(hObject, eventdata, handles)
0349 SaveGoogleEarthFile_Callback(handles,eventdata,handles)
0350
0351
0352
0353 function menuExport_Callback(hObject, eventdata, handles)
0354
0355
0356
0357 function menuFigureExportsettings_Callback(hObject, eventdata, handles)
0358
0359
0360
0361 function menuPrintFormat_Callback(hObject, eventdata, handles)
0362
0363
0364
0365 guiparams = getappdata(handles.figure1,'guiparams');
0366
0367
0368
0369 guiparams.print = true;
0370 guiparams.presentation = false;
0371
0372
0373
0374 setappdata(handles.figure1,'guiparams',guiparams)
0375
0376
0377
0378 set(handles.menuPrintFormat, 'Checked','on')
0379 set(handles.menuPresentationFormat,'Checked','off')
0380
0381
0382
0383
0384
0385 function menuPresentationFormat_Callback(hObject, eventdata, handles)
0386
0387
0388
0389 guiparams = getappdata(handles.figure1,'guiparams');
0390
0391
0392
0393 guiparams.print = false;
0394 guiparams.presentation = true;
0395
0396
0397
0398 setappdata(handles.figure1,'guiparams',guiparams)
0399
0400
0401
0402 set(handles.menuPrintFormat, 'Checked','off')
0403 set(handles.menuPresentationFormat,'Checked','on')
0404
0405
0406
0407
0408 function menuGraphicsRenderer_Callback(hObject, eventdata, handles)
0409
0410
0411
0412 function menuOpenGL_Callback(hObject, eventdata, handles)
0413
0414
0415 guiparams = getappdata(handles.figure1,'guiparams');
0416 guiprefs = getappdata(handles.figure1,'guiprefs');
0417
0418
0419
0420 guiparams.renderer = 'OpenGL';
0421 guiprefs.renderer = 'OpenGL';
0422
0423
0424
0425 setappdata(handles.figure1,'guiparams',guiparams)
0426 setappdata(handles.figure1,'guiprefs',guiprefs)
0427 store_prefs(handles.figure1,'renderer')
0428
0429
0430
0431 set(handles.menuOpenGL, 'Checked','on')
0432 set(handles.menuPainters, 'Checked','off')
0433 set(handles.menuZbuffer, 'Checked','off')
0434
0435
0436
0437
0438 hf = findobj('type','figure');
0439 valid_names = {'Plan View Map'; 'Mean Cross Section Contour'};
0440
0441
0442
0443 if ~isempty(hf) && any(ishandle(hf))
0444 for i = 1:length(valid_names)
0445
0446 hff = findobj('name','Plan View Map');
0447 if ~isempty(hff) && ishandle(hff)
0448 figure(hff)
0449 set(hff,'Renderer',guiparams.renderer)
0450 end
0451 hff = findobj('name','Mean Cross Section Contour');
0452 if ~isempty(hff) && ishandle(hff)
0453 figure(hff)
0454 set(hff,'Renderer',guiparams.renderer)
0455 end
0456 end
0457 end
0458
0459
0460
0461
0462 function menuPainters_Callback(hObject, eventdata, handles)
0463
0464
0465 guiparams = getappdata(handles.figure1,'guiparams');
0466 guiprefs = getappdata(handles.figure1,'guiprefs');
0467
0468
0469
0470 guiparams.renderer = 'painters';
0471 guiprefs.renderer = 'painters';
0472
0473
0474
0475 setappdata(handles.figure1,'guiparams',guiparams)
0476 setappdata(handles.figure1,'guiprefs',guiprefs)
0477 store_prefs(handles.figure1,'renderer')
0478
0479
0480
0481 set(handles.menuOpenGL, 'Checked','off')
0482 set(handles.menuPainters, 'Checked','on')
0483 set(handles.menuZbuffer, 'Checked','off')
0484
0485
0486
0487
0488 hf = findobj('type','figure');
0489 valid_names = {'Plan View Map'; 'Mean Cross Section Contour'};
0490
0491
0492
0493 if ~isempty(hf) && any(ishandle(hf))
0494 for i = 1:length(valid_names)
0495
0496 hff = findobj('name','Plan View Map');
0497 if ~isempty(hff) && ishandle(hff)
0498 figure(hff)
0499 set(hff,'Renderer',guiparams.renderer)
0500 end
0501 hff = findobj('name','Mean Cross Section Contour');
0502 if ~isempty(hff) && ishandle(hff)
0503 figure(hff)
0504 set(hff,'Renderer',guiparams.renderer)
0505 end
0506 end
0507 end
0508
0509
0510
0511 function menuZbuffer_Callback(hObject, eventdata, handles)
0512
0513
0514 guiparams = getappdata(handles.figure1,'guiparams');
0515 guiprefs = getappdata(handles.figure1,'guiprefs');
0516
0517
0518
0519 guiparams.renderer = 'zbuffer';
0520 guiprefs.renderer = 'zbuffer';
0521
0522
0523
0524 setappdata(handles.figure1,'guiparams',guiparams)
0525 setappdata(handles.figure1,'guiprefs',guiprefs)
0526 store_prefs(handles.figure1,'renderer')
0527
0528
0529
0530 set(handles.menuOpenGL, 'Checked','off')
0531 set(handles.menuPainters, 'Checked','off')
0532 set(handles.menuZbuffer, 'Checked','on')
0533
0534
0535
0536
0537 hf = findobj('type','figure');
0538 valid_names = {'Plan View Map'; 'Mean Cross Section Contour'};
0539
0540
0541
0542 if ~isempty(hf) && any(ishandle(hf))
0543 for i = 1:length(valid_names)
0544
0545 hff = findobj('name','Plan View Map');
0546 if ~isempty(hff) && ishandle(hff)
0547 figure(hff)
0548 set(hff,'Renderer',guiparams.renderer)
0549 end
0550 hff = findobj('name','Mean Cross Section Contour');
0551 if ~isempty(hff) && ishandle(hff)
0552 figure(hff)
0553 set(hff,'Renderer',guiparams.renderer)
0554 end
0555 end
0556 end
0557
0558
0559
0560 function menuExportFigures_Callback(hObject, eventdata, handles)
0561
0562
0563 guiparams = getappdata(handles.figure1,'guiparams');
0564 guiprefs = getappdata(handles.figure1,'guiprefs');
0565
0566
0567 fig_handles = findobj('type','figure');
0568 fig_names = get(fig_handles,'name');
0569
0570
0571 [~, idx] = ismember({get(handles.figure1,'Name'),'VMT_GraphicsControl'}, fig_names);
0572 if ~isempty(idx)
0573 fig_names(idx) = [];
0574 end
0575
0576 if guiparams.presentation
0577 figure_style = 'presentation';
0578 else
0579 figure_style = 'print';
0580 end
0581
0582 [selected_figures] = openFiguresDialog(fig_names,handles.figure1);
0583
0584 if isempty(selected_figures)
0585 return
0586 else
0587 for i = 1:length(selected_figures)
0588 VMT_SaveFigs(guiprefs.mat_path,selected_figures(i),figure_style)
0589 end
0590 end
0591
0592
0593
0594
0595
0596 function menuBathymetryExportSettings_Callback(hObject, eventdata, handles)
0597
0598
0599 guiparams = getappdata(handles.figure1,'guiparams');
0600 beam_angle = guiparams.beam_angle;
0601 magnetic_variation = guiparams.magnetic_variation;
0602 wse = guiparams.wse;
0603 output_auxiliary_data = guiparams.output_auxiliary_data;
0604
0605
0606
0607 [beam_angle,...
0608 magnetic_variation,...
0609 wse,...
0610 output_auxiliary_data] = ...
0611 exportSettingsDialog(beam_angle,magnetic_variation,wse,output_auxiliary_data,handles.figure1);
0612
0613
0614
0615 guiparams.beam_angle = beam_angle;
0616 guiparams.magnetic_variation = magnetic_variation;
0617 guiparams.wse = wse;
0618 guiparams.output_auxiliary_data = output_auxiliary_data;
0619 setappdata(handles.figure1,'guiparams',guiparams)
0620
0621
0622
0623
0624 function menuExportMultibeamBathymetry_Callback(hObject, eventdata, handles)
0625 ExportMultibeamBathymetry_Callback(hObject, eventdata, handles);
0626
0627
0628
0629
0630 function menuSaveANVFile_Callback(hObject, eventdata, handles)
0631
0632
0633
0634 guiparams = getappdata(handles.figure1,'guiparams');
0635 guiprefs = getappdata(handles.figure1,'guiprefs');
0636 PVdata = guiparams.iric_anv_planview_data;
0637 iric_path = guiprefs.iric_path;
0638 iric_file = guiprefs.iric_file;
0639
0640
0641 if isempty(PVdata)
0642
0643 log_text = {'No planview plot data to export. User must Plot Plan View first.'};
0644 warndlg(log_text{:},'Nothing to export')
0645 else
0646
0647
0648 log_text = {'Exporting iRic formated ANV vector file...'};
0649 [iric_file,iric_path] = uiputfile('*.anv','Save *.anv file',...
0650 fullfile(iric_path,iric_file));
0651
0652 if ischar(iric_path)
0653 outfile = fullfile(iric_path,iric_file);
0654 log_text = vertcat(log_text,{outfile});
0655 ofid = fopen(outfile, 'wt');
0656 outcount = fprintf(ofid,...
0657 '%8.2f %8.2f %5.2f %3.3f %3.3f\n',PVdata.outmat);
0658 fclose(ofid);
0659 else
0660
0661 iric_path = guiprefs.iric_path;
0662 iric_file = guiprefs.iric_file;
0663 end
0664 end
0665
0666
0667
0668 statusLogging(handles.LogWindow, log_text)
0669
0670
0671
0672 guiprefs.iric_file = iric_file;
0673 guiprefs.iric_path = iric_path;
0674 setappdata(handles.figure1,'guiprefs',guiprefs)
0675 store_prefs(handles.figure1,'iric')
0676
0677
0678
0679
0680 function menuSaveExcel_Callback(hObject, eventdata, handles)
0681
0682
0683 guiparams = getappdata(handles.figure1,'guiparams');
0684 guiprefs = getappdata(handles.figure1,'guiprefs');
0685 excel_path = guiprefs.excel_path;
0686 excel_file = guiprefs.excel_file;
0687
0688
0689
0690 log_text = {'Exporting Excel File (reprocessing dataset; this will create new plots)'};
0691 statusLogging(handles.LogWindow, log_text)
0692
0693
0694
0695 if iscell(guiparams.mat_file)
0696
0697 planviewPlotCallback(hObject, eventdata, handles)
0698
0699 guiparams = getappdata(handles.figure1,'guiparams');
0700 z = guiparams.z;
0701 A = guiparams.A;
0702 V = guiparams.V;
0703 Map = guiparams.Map;
0704 wse = guiparams.wse;
0705 PVdata = guiparams.iric_anv_planview_data;
0706 log_text = {'Writing data to Excel file...';...
0707 'Multiple transected loaded. Will export Planview Data Only!'};
0708 [excel_file,excel_path] = uiputfile('*.xlsx','Save *.xlsx file',...
0709 fullfile(excel_path,excel_file));
0710
0711 if ischar(excel_path)
0712 outfile = fullfile(excel_path,excel_file);
0713
0714
0715 else
0716
0717 excel_path = guiprefs.excel_path;
0718 excel_file = guiprefs.excel_file;
0719 outfile = fullfile(excel_path,excel_file);
0720
0721 end
0722
0723
0724 if exist(outfile, 'file') == 2
0725 log_text = vertcat(log_text,{'Warning: The file';...
0726 [' ' outfile];...
0727 'already exists. Overwriting file...'});
0728 delete(outfile)
0729 end
0730
0731
0732 hwait = waitbar(0,'Exporting Excel File...');
0733 vmin = num2str(guiparams.depth_range_min);
0734 vmax = num2str(guiparams.depth_range_max);
0735 pvheaders = {...
0736 'UTM_East' 'UTM_North' 'Dist_m' 'Bed_Elev_m'...
0737 ['EastDAV_cm/s, dpth rng ' vmin ' to ' vmax ' m']...
0738 ['NorthDAV_cm/s, dpth rng ' vmin ' to ' vmax ' m']...
0739 'Vel_mag_cm/s' 'Vel_dir_deg'};
0740
0741
0742
0743 pvdata = []; Dist = [];
0744 X = []; Y = []; E = [];
0745 Ve = []; Vn =[]; Vm = []; Vd = [];
0746
0747
0748 for i = 1:length(guiparams.mat_file)
0749
0750 load(fullfile(guiparams.mat_path, guiparams.mat_file{i}))
0751
0752
0753 X = [X V.mcsX(1,:)];
0754 Y = [Y V.mcsY(1,:)];
0755 Dist = [Dist sort(V.mcsDist(1,:),'descend')];
0756 E = [E V.mcsBedElev];
0757
0758
0759 indx = find(V.mcsDepth(:,1) < str2num(vmin) | V.mcsDepth(:,1) > str2num(vmax));
0760 V.mcsX(indx,:) = nan;
0761 V.mcsY(indx,:) = nan;
0762 V.mcsEast(indx,:) = nan;
0763 V.mcsNorth(indx,:) = nan;
0764 Ve = [Ve VMT_LayerAveMean(V.mcsDepth,V.mcsEast)];
0765 Vn = [Vn VMT_LayerAveMean(V.mcsDepth,V.mcsNorth)];
0766 Vm = [Vm sqrt(VMT_LayerAveMean(V.mcsDepth,V.mcsEast).^2 + VMT_LayerAveMean(V.mcsDepth,V.mcsNorth).^2)];
0767 Vd = [Vd ari2geodeg(atan2(VMT_LayerAveMean(V.mcsDepth,V.mcsNorth),VMT_LayerAveMean(V.mcsDepth,V.mcsEast))*180/pi)];
0768
0769 waitbar(i/(length(guiparams.mat_file)+1),hwait)
0770 end
0771
0772
0773 pvdata = [...
0774 X; Y; Dist; E;...
0775 Ve; Vn; Vm; Vd...
0776 ];
0777 pvdata(isnan(pvdata)) = -9999;
0778
0779
0780 pvout = num2cell(pvdata');
0781 pvout = vertcat(pvheaders,pvout);
0782 xlswrite(outfile,pvout,'Planview');
0783
0784
0785 waitbar(1,hwait)
0786 delete(hwait)
0787
0788
0789
0790 statusLogging(handles.LogWindow, log_text)
0791 else
0792
0793
0794 planviewPlotCallback(hObject, eventdata, handles)
0795 crosssectionPlotCallback(hObject, eventdata, handles)
0796
0797 guiparams = getappdata(handles.figure1,'guiparams');
0798 z = guiparams.z;
0799 A = guiparams.A;
0800 V = guiparams.V;
0801 Map = guiparams.Map;
0802 wse = guiparams.wse;
0803 PVdata = guiparams.iric_anv_planview_data;
0804
0805
0806 log_text = {'Writing data to Excel file...'};
0807 [excel_file,excel_path] = uiputfile('*.xlsx','Save *.xlsx file',...
0808 fullfile(excel_path,excel_file));
0809
0810 if ischar(excel_path)
0811 outfile = fullfile(excel_path,excel_file);
0812
0813
0814
0815 if exist(outfile, 'file') == 2
0816 log_text = vertcat(log_text,{'Warning: The file';...
0817 [' ' outfile];...
0818 'already exists. Overwriting file...'});
0819 delete(outfile)
0820 end
0821
0822
0823
0824 statusLogging(handles.LogWindow, log_text)
0825
0826
0827 hwait = waitbar(0,'Exporting Excel File...');
0828 xlswrite(outfile,{'Files:'},'VMTSummary','H4'); waitbar(1/5,hwait)
0829 sout = guiparams.data_files';
0830 xlswrite(outfile,sout,'VMTSummary','I4'); waitbar(2/5,hwait)
0831 sout = {...
0832 'VMT: Summary of Mean Cross Section' '' '' '' '' '';...
0833 'VMT ' guiparams.vmt_version '' '' '' '';...
0834 'Date Processed: ' datestr(now) '' '' '' '';...
0835 '' '' '' '' '' '';...
0836 'Mean Cross Section (MCS) Properties' '' '' '' '' '';...
0837 'Horz. Grid Node Spacing (m):' '' '' '' '' guiparams.horizontal_grid_node_spacing;...
0838 'Vert. Grid Node Spacing (m):' '' '' '' '' single(guiparams.A(1).Sup.binSize_cm)/100;...
0839 'Endpoints:' '' '' '' 'UTM_East' 'UTM_North';...
0840 'Left Bank' '' '' '' V.xLeftBank V.yLeftBank;...
0841 'Right Bank' '' '' '' V.xRightBank V.yRightBank;...
0842 'Total Length in meters' '' '' '' '' V.dl;...
0843 '' '' '' '' '' '';...
0844 'Mean Flow Direction (deg)' '' '' '' '' V.mfd;...
0845 'in geographic coordinates' '' '' '' '' '';...
0846 '' '' '' '' '' '';...
0847 'Slope' '' '' '' '' V.m;...
0848 'Intercept' '' '' '' '' V.b;...
0849 'Theta (deg)' '' '' '' '' V.theta};
0850 xlswrite(outfile,sout,'VMTSummary','A1'); waitbar(3/5,hwait)
0851
0852
0853 vmin = num2str(guiparams.depth_range_min);
0854 vmax = num2str(guiparams.depth_range_max);
0855 pvheaders = {...
0856 'UTM_East_WGS84' 'UTM_North_WGS84' 'Dist_m' 'Bed_Elev_m'...
0857 ['EastDAV_cms_dpthrng_' vmin '_to_' vmax 'm']...
0858 ['NorthDAV_cms_dpthrng_' vmin '_to_' vmax 'm']...
0859 'Vel_mag_cms' 'Vel_dir_deg'};
0860
0861
0862 pvdata = [];
0863
0864
0865
0866 Dist = sort(V.mcsDist,2,'descend');
0867
0868
0869 pvdata = [V.mcsX(1,:); V.mcsY(1,:); Dist(1,:); V.mcsBedElev];
0870
0871
0872 indx = find(V.mcsDepth(:,1) < str2num(vmin) | V.mcsDepth(:,1) > str2num(vmax));
0873 V.mcsX(indx,:) = nan;
0874 V.mcsY(indx,:) = nan;
0875 V.mcsEast(indx,:) = nan;
0876 V.mcsNorth(indx,:) = nan;
0877 pvdata = [...
0878 pvdata;...
0879 VMT_LayerAveMean(V.mcsDepth,V.mcsEast);...
0880 VMT_LayerAveMean(V.mcsDepth,V.mcsNorth);...
0881 sqrt(VMT_LayerAveMean(V.mcsDepth,V.mcsEast).^2 + VMT_LayerAveMean(V.mcsDepth,V.mcsNorth).^2);...
0882 ari2geodeg(atan2(VMT_LayerAveMean(V.mcsDepth,V.mcsNorth), VMT_LayerAveMean(V.mcsDepth,V.mcsEast))*180/pi)];
0883 pvdata(isnan(pvdata)) = -9999;
0884 pvout = num2cell(pvdata');
0885 pvout = vertcat(pvheaders,pvout);
0886 xlswrite(outfile,pvout,'Planview');
0887 waitbar(4/5,hwait)
0888
0889
0890 mcsheaders = {...
0891 'UTM_East' ...
0892 'UTM_North'...
0893 'Distance from Left Bank, in meters'...
0894 'Elevation, in meters'...
0895 ...
0896 'East Velocity, in cm/s'...
0897 'North Velocity, in cm/s'...
0898 'Vertical Velocity, in cm/s'...
0899 'Velocity Magnitude, in cm/s'...
0900 'Velocity Direction, in degrees (geographic coordinates)'...
0901 'Streamwise Velocity, in cm/s'...
0902 'Transverse Velocity, in cm/s'...
0903 'Primary Velocity (zsd), in cm/s'...
0904 'Secondary Velocity (zsd), in cm/s'...
0905 'Primary Velocity (roz), in cm/s'...
0906 'Secondary Velocity (roz), in cm/s'};
0907
0908 mcsdata = [...
0909 V.mcsX(:)...
0910 V.mcsY(:)...
0911 V.mcsDist(:)...
0912 (wse - V.mcsDepth(:))...
0913 ...
0914 V.mcsEast(:)...
0915 V.mcsNorth(:)...
0916 V.mcsVert(:)...
0917 V.mcsMag(:)...
0918 V.mcsDir(:)...
0919 V.u(:)...
0920 V.v(:)...
0921 V.vp(:)...
0922 V.vs(:)...
0923 V.Roz.up(:)...
0924 V.Roz.us(:)];
0925 mcsdata(isnan(mcsdata)) = -9999;
0926
0927 mcsout = vertcat(mcsheaders,num2cell(mcsdata));
0928 xlswrite(outfile,mcsout,'MeanCrossSection');
0929 waitbar(1,hwait)
0930 delete(hwait)
0931
0932 else
0933
0934 excel_path = guiprefs.excel_path;
0935 excel_file = guiprefs.excel_file;
0936 outfile = fullfile(excel_path,excel_file);
0937 log_text = {'User aborted Excel export...'};
0938 end
0939
0940
0941
0942 end
0943
0944
0945
0946 statusLogging(handles.LogWindow, log_text)
0947
0948
0949
0950 guiprefs.excel_file = excel_file;
0951 guiprefs.excel_path = excel_path;
0952 setappdata(handles.figure1,'guiprefs',guiprefs)
0953 store_prefs(handles.figure1,'excel')
0954
0955
0956
0957
0958 function menuParameters_Callback(hObject, eventdata, handles)
0959
0960
0961
0962 function menuProcessingParameters_Callback(hObject, eventdata, handles)
0963
0964
0965
0966 function menuUnitDischargeCorrection_Callback(hObject, eventdata, handles)
0967
0968
0969
0970
0971 guiparams = getappdata(handles.figure1,'guiparams');
0972
0973
0974
0975 status = get(handles.menuUnitDischargeCorrection,'Checked');
0976 switch status
0977 case 'on'
0978 set(handles.menuUnitDischargeCorrection, 'Checked','off')
0979 guiparams.unit_discharge_correction = false;
0980 case 'off'
0981 set(handles.menuUnitDischargeCorrection, 'Checked','on')
0982 guiparams.unit_discharge_correction = true;
0983 end
0984
0985
0986
0987 setappdata(handles.figure1,'guiparams',guiparams)
0988
0989
0990
0991
0992
0993 function menuPlottingParameters_Callback(hObject, eventdata, handles)
0994
0995
0996
0997 function menuUnits_Callback(hObject, eventdata, handles)
0998
0999
1000
1001 function menuMetric_Callback(hObject, eventdata, handles)
1002
1003
1004
1005
1006 guiparams = getappdata(handles.figure1,'guiparams');
1007 guiprefs = getappdata(handles.figure1,'guiprefs');
1008
1009
1010
1011 guiparams.english_units = false;
1012 guiprefs.units = 'metric';
1013
1014
1015
1016 setappdata(handles.figure1,'guiparams',guiparams)
1017 setappdata(handles.figure1,'guiprefs',guiprefs)
1018 store_prefs(handles.figure1,'units')
1019
1020
1021
1022 set(handles.menuMetric, 'Checked','on')
1023 set(handles.menuEnglish,'Checked','off')
1024
1025
1026
1027
1028
1029 function menuEnglish_Callback(hObject, eventdata, handles)
1030
1031
1032
1033
1034 guiparams = getappdata(handles.figure1,'guiparams');
1035 guiprefs = getappdata(handles.figure1,'guiprefs');
1036
1037
1038
1039 guiparams.english_units = true;
1040 guiprefs.units = 'english';
1041
1042
1043
1044 setappdata(handles.figure1,'guiparams',guiparams)
1045 setappdata(handles.figure1,'guiprefs',guiprefs)
1046 store_prefs(handles.figure1,'units')
1047
1048
1049
1050 set(handles.menuMetric, 'Checked','off')
1051 set(handles.menuEnglish,'Checked','on')
1052
1053
1054
1055
1056
1057 function menuSetCrossSectionEndpoints_Callback(hObject, eventdata, handles)
1058
1059
1060
1061 function menuCrossSectionEndpointAutomatic_Callback(hObject, eventdata, handles)
1062
1063
1064
1065
1066 guiparams = getappdata(handles.figure1,'guiparams');
1067
1068
1069
1070 guiparams.set_cross_section_endpoints = false;
1071
1072
1073
1074 setappdata(handles.figure1,'guiparams',guiparams)
1075
1076
1077
1078 set(handles.menuCrossSectionEndpointAutomatic, 'Checked','on')
1079 set(handles.menuCrossSectionEndpointManual, 'Checked','off')
1080
1081
1082
1083
1084
1085 function menuCrossSectionEndpointManual_Callback(hObject, eventdata, handles)
1086
1087
1088
1089
1090 guiparams = getappdata(handles.figure1,'guiparams');
1091
1092
1093
1094 guiparams.set_cross_section_endpoints = true;
1095
1096
1097
1098 setappdata(handles.figure1,'guiparams',guiparams)
1099
1100
1101
1102 set(handles.menuCrossSectionEndpointAutomatic, 'Checked','off')
1103 set(handles.menuCrossSectionEndpointManual, 'Checked','on')
1104
1105
1106
1107
1108
1109
1110
1111 function menuPlotStyle_Callback(hObject, eventdata, handles)
1112
1113
1114
1115 function menuStylePrint_Callback(hObject, eventdata, handles)
1116
1117
1118
1119 guiparams = getappdata(handles.figure1,'guiparams');
1120
1121
1122
1123 guiparams.print = true;
1124 guiparams.presentation = false;
1125
1126
1127
1128 setappdata(handles.figure1,'guiparams',guiparams)
1129
1130
1131
1132 set(handles.menuStylePrint, 'Checked','on')
1133 set(handles.menuStylePresentation, 'Checked','off')
1134 set(handles.menuPrintFormat, 'Checked','on')
1135 set(handles.menuPresentationFormat,'Checked','off')
1136
1137
1138
1139
1140 hf = findobj('type','figure');
1141 valid_names = {'Plan View Map'; 'Mean Cross Section Contour'};
1142
1143
1144 BkgdColor = 'white';
1145 AxColor = 'black';
1146 FigColor = 'white';
1147 FntSize = 14;
1148
1149
1150
1151 if ~isempty(hf) && any(ishandle(hf))
1152
1153 for i = 1:length(valid_names)
1154 switch valid_names{i}
1155 case 'Plan View Map'
1156
1157 hff = findobj('name','Plan View Map');
1158 if ~isempty(hff) && ishandle(hff)
1159 figure(hff)
1160
1161
1162 set(gcf,'Color',BkgdColor);
1163 set(gca,'FontSize',FntSize)
1164 set(get(gca,'Title'),'FontSize',FntSize)
1165 set(gca,'Color',FigColor)
1166 set(gca,'XColor',AxColor)
1167 set(gca,'YColor',AxColor)
1168 set(gca,'ZColor',AxColor)
1169 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
1170 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
1171 set(get(gca,'xLabel'),'FontSize',FntSize,'Color',AxColor)
1172 set(get(gca,'yLabel'),'FontSize',FntSize,'Color',AxColor)
1173
1174
1175
1176 ismultiplot = numel(guiparams.mat_file)>1;
1177 if ~ismultiplot
1178 filestr = guiparams.savefile;
1179 wd = length(filestr);
1180 hd = 1;
1181 else
1182
1183 filestr = [{guiparams.mat_path};guiparams.mat_file'];
1184 wd = max(cellfun(@length,filestr));
1185 hd = numel(filestr);
1186
1187 end
1188
1189 fileinfotxt = uicontrol('style','text','units','characters');
1190 disableMenuBar(hff)
1191 set(fileinfotxt,...
1192 'string',filestr)
1193 set(fileinfotxt,...
1194 'position',[0,0,wd,hd],...
1195 'Fontsize',FntSize/2,...
1196 'ForegroundColor',AxColor,...
1197 'BackgroundColor',BkgdColor,...
1198 'HorizontalAlignment','Left',...
1199 'Tag','fileinfotxt',...
1200 'Visible','off')
1201
1202 end
1203 case 'Mean Cross Section Contour'
1204
1205 hff = findobj('name','Mean Cross Section Contour');
1206 if ~isempty(hff) && ishandle(hff)
1207 figure(hff)
1208
1209
1210 set(gcf,'Color',BkgdColor);
1211 set(gca,'FontSize',FntSize)
1212 set(get(gca,'Title'),'FontSize',FntSize)
1213 set(gca,'Color',FigColor)
1214 set(gca,'XColor',AxColor)
1215 set(gca,'YColor',AxColor)
1216 set(gca,'ZColor',AxColor)
1217 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
1218 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
1219 set(get(gca,'xLabel'),'FontSize',FntSize,'Color',AxColor)
1220 set(get(gca,'yLabel'),'FontSize',FntSize,'Color',AxColor)
1221 set(findobj(gca,'tag','PlotBedElevation') ,'color' ,AxColor)
1222 set(findobj(gca,'tag','ReferenceVectorText'),'color' ,AxColor)
1223
1224
1225
1226 ismultiplot = numel(guiparams.mat_file)>1;
1227 if ~ismultiplot
1228 filestr = guiparams.savefile;
1229 wd = length(filestr);
1230 hd = 1;
1231 else
1232
1233 filestr = [{guiparams.mat_path};guiparams.mat_file'];
1234 wd = max(cellfun(@length,filestr));
1235 hd = numel(filestr);
1236
1237 end
1238
1239 fileinfotxt = uicontrol('style','text','units','characters');
1240 disableMenuBar(hff)
1241 set(fileinfotxt,...
1242 'string',filestr)
1243 set(fileinfotxt,...
1244 'position',[0,0,wd,hd],...
1245 'Fontsize',FntSize/2,...
1246 'ForegroundColor',AxColor,...
1247 'BackgroundColor',BkgdColor,...
1248 'HorizontalAlignment','Left',...
1249 'Tag','fileinfotxt',...
1250 'Visible','off')
1251 end
1252 otherwise
1253 end
1254 end
1255
1256
1257 end
1258
1259
1260
1261
1262
1263
1264 function menuStylePresentation_Callback(hObject, eventdata, handles)
1265
1266
1267 guiparams = getappdata(handles.figure1,'guiparams');
1268
1269
1270
1271 guiparams.print = false;
1272 guiparams.presentation = true;
1273
1274
1275
1276 setappdata(handles.figure1,'guiparams',guiparams)
1277
1278
1279
1280 set(handles.menuStylePrint, 'Checked','off')
1281 set(handles.menuStylePresentation, 'Checked','on')
1282 set(handles.menuPrintFormat, 'Checked','off')
1283 set(handles.menuPresentationFormat,'Checked','on')
1284
1285
1286
1287
1288 hf = findobj('type','figure');
1289 valid_names = {'Plan View Map'; 'Mean Cross Section Contour'};
1290
1291
1292
1293 BkgdColor = 'black';
1294 AxColor = 'white';
1295 FigColor = 'black';
1296 FntSize = 14;
1297
1298
1299
1300 if ~isempty(hf) && any(ishandle(hf))
1301
1302 for i = 1:length(valid_names)
1303 switch valid_names{i}
1304 case 'Plan View Map'
1305
1306 hff = findobj('name','Plan View Map');
1307 if ~isempty(hff) && ishandle(hff)
1308 figure(hff)
1309
1310
1311 set(gcf,'Color',BkgdColor);
1312 set(gca,'FontSize',FntSize)
1313 set(get(gca,'Title'),'FontSize',FntSize)
1314 set(gca,'Color',FigColor)
1315 set(gca,'XColor',AxColor)
1316 set(gca,'YColor',AxColor)
1317 set(gca,'ZColor',AxColor)
1318 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
1319 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
1320 set(get(gca,'xLabel'),'FontSize',FntSize,'Color',AxColor)
1321 set(get(gca,'yLabel'),'FontSize',FntSize,'Color',AxColor)
1322
1323
1324
1325 ismultiplot = numel(guiparams.mat_file)>1;
1326 if ~ismultiplot
1327 filestr = guiparams.savefile;
1328 wd = length(filestr);
1329 hd = 1;
1330 else
1331
1332 filestr = [{guiparams.mat_path};guiparams.mat_file'];
1333 wd = max(cellfun(@length,filestr));
1334 hd = numel(filestr);
1335
1336 end
1337
1338 fileinfotxt = uicontrol('style','text','units','characters');
1339 disableMenuBar(hff)
1340 set(fileinfotxt,...
1341 'string',filestr)
1342 set(fileinfotxt,...
1343 'position',[0,0,wd,hd],...
1344 'Fontsize',FntSize/2,...
1345 'ForegroundColor',AxColor,...
1346 'BackgroundColor',BkgdColor,...
1347 'HorizontalAlignment','Left',...
1348 'Tag','fileinfotxt',...
1349 'Visible','off')
1350
1351 end
1352 case 'Mean Cross Section Contour'
1353
1354 hff = findobj('name','Mean Cross Section Contour');
1355 if ~isempty(hff) && ishandle(hff)
1356 figure(hff)
1357
1358
1359 set(gcf,'Color',BkgdColor);
1360 set(gca,'FontSize',FntSize)
1361 set(get(gca,'Title'),'FontSize',FntSize)
1362 set(gca,'Color',[0.3 0.3 0.3])
1363 set(gca,'XColor',AxColor)
1364 set(gca,'YColor',AxColor)
1365 set(gca,'ZColor',AxColor)
1366 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
1367 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
1368 set(get(gca,'xLabel'),'FontSize',FntSize,'Color',AxColor)
1369 set(get(gca,'yLabel'),'FontSize',FntSize,'Color',AxColor)
1370 set(findobj(gca,'tag','PlotBedElevation') ,'color' ,AxColor)
1371 set(findobj(gca,'tag','ReferenceVectorText'),'color' ,AxColor)
1372
1373
1374
1375 ismultiplot = numel(guiparams.mat_file)>1;
1376 if ~ismultiplot
1377 filestr = guiparams.savefile;
1378 wd = length(filestr);
1379 hd = 1;
1380 else
1381
1382 filestr = [{guiparams.mat_path};guiparams.mat_file'];
1383 wd = max(cellfun(@length,filestr));
1384 hd = numel(filestr);
1385
1386 end
1387
1388 fileinfotxt = uicontrol('style','text','units','characters');
1389 disableMenuBar(hff)
1390 set(fileinfotxt,...
1391 'string',filestr)
1392 set(fileinfotxt,...
1393 'position',[0,0,wd,hd],...
1394 'Fontsize',FntSize/2,...
1395 'ForegroundColor',AxColor,...
1396 'BackgroundColor',BkgdColor,...
1397 'HorizontalAlignment','Left',...
1398 'Tag','fileinfotxt',...
1399 'Visible','off')
1400 end
1401 otherwise
1402 end
1403 end
1404
1405
1406 end
1407
1408
1409
1410
1411 function menuKMZVerticalOffset_Callback(hObject, eventdata, handles)
1412
1413
1414
1415 guiparams = getappdata(handles.figure1,'guiparams');
1416
1417
1418
1419 numstr = {num2str(guiparams.vertical_offset)};
1420 answer = NaN;
1421 while isnan(answer)
1422 answer = inputdlg('Vertical Offset (m)','KMZ Export',1,numstr);
1423
1424 if isempty(answer)
1425 return
1426 end
1427
1428 answer = str2double(answer);
1429
1430 end
1431
1432
1433
1434 guiparams.vertical_offset = answer;
1435 setappdata(handles.figure1,'guiparams',guiparams)
1436
1437
1438
1439
1440 function menuBathymetryParameters_Callback(hObject, eventdata, handles)
1441
1442
1443
1444 function menuTools_Callback(hObject, eventdata, handles)
1445
1446
1447
1448 function menuASCII2GIS_Callback(hObject, eventdata, handles)
1449 ASCII2GIS_GUI
1450
1451
1452
1453 function menuASCII2KML_Callback(hObject, eventdata, handles)
1454
1455
1456
1457 guiprefs = getappdata(handles.figure1,'guiprefs');
1458
1459 inpath = guiprefs.kmz_path;
1460 if iscell(guiprefs.kmz_file)
1461 infile = guiprefs.kmz_file{1};
1462 else
1463 infile = guiprefs.kmz_file;
1464 end
1465 [log_text,outpath,outfile] = ASCII2KML(inpath,infile);
1466
1467 guiprefs.kmz_path = outpath;
1468 guiprefs.kmz_file = outfile;
1469
1470
1471
1472 setappdata(handles.figure1,'guiprefs',guiprefs)
1473
1474
1475
1476
1477 function menuOpenBatchMode_Callback(hObject, eventdata, handles)
1478
1479
1480 guiprefs = getappdata(handles.figure1,'guiprefs');
1481
1482 VMT_BatchMode;
1483
1484
1485
1486 function menuHelp_Callback(hObject, eventdata, handles)
1487
1488
1489
1490 function menuUsersGuide_Callback(hObject, eventdata, handles)
1491 guiparams = getappdata(handles.figure1,'guiparams');
1492 try
1493 open([pwd filesep 'doc' filesep 'VMT User Guide ' guiparams.vmt_version '.pdf']);
1494
1495 catch err
1496
1497 if isdeployed
1498 errLogFileName = fullfile(pwd,...
1499 ['errorLog' datestr(now,'yyyymmddHHMMSS') '.txt']);
1500 msgbox({['An unexpected error occurred. Error code: ' err.identifier];...
1501 ['Error details are being written to the following file: '];...
1502 errLogFileName},...
1503 'VMT Status: Unexpected Error',...
1504 'error');
1505 fid = fopen(errLogFileName,'W');
1506 fwrite(fid,err.getReport('extended','hyperlinks','off'));
1507 fclose(fid);
1508 rethrow(err)
1509 else
1510 msgbox(['An unexpected error occurred. Error code: ' err.identifier],...
1511 'VMT Status: Unexpected Error',...
1512 'error');
1513 rethrow(err);
1514 end
1515 end
1516
1517
1518
1519 function menuFunctionLibrary_Callback(hObject, eventdata, handles)
1520
1521
1522
1523
1524 try
1525
1526
1527 rootpath = strrep(pwd,filesep,'/');
1528 webaddress = ['file:///' rootpath '/doc/index.html'];
1529 system(['start ' webaddress]);
1530
1531 catch err
1532 if isdeployed
1533 errLogFileName = fullfile(pwd,...
1534 ['errorLog' datestr(now,'yyyymmddHHMMSS') '.txt']);
1535 msgbox({['An unexpected error occurred. Error code: ' err.identifier];...
1536 ['Error details are being written to the following file: '];...
1537 errLogFileName},...
1538 'VMT Status: Unexpected Error',...
1539 'error');
1540 fid = fopen(errLogFileName,'W');
1541 fwrite(fid,err.getReport('extended','hyperlinks','off'));
1542 fclose(fid);
1543 rethrow(err)
1544 else
1545 msgbox(['An unexpected error occurred. Error code: ' err.identifier],...
1546 'VMT Status: Unexpected Error',...
1547 'error');
1548 rethrow(err);
1549 end
1550 end
1551
1552
1553
1554
1555 function menuCheckForUpdates_Callback(hObject, eventdata, handles)
1556
1557
1558
1559 guiparams = getappdata(handles.figure1,'guiparams');
1560 guiprefs = getappdata(handles.figure1,'guiprefs');
1561
1562
1563 try
1564 current_vmt_version = urlread('http://hydroacoustics.usgs.gov/movingboat/VMT/VMT_version.txt');
1565
1566 catch err
1567 if isdeployed
1568 errLogFileName = fullfile(pwd,...
1569 ['errorLog' datestr(now,'yyyymmddHHMMSS') '.txt']);
1570 msgbox({['An unexpected error occurred. Error code: ' err.identifier];...
1571 ['Error details are being written to the following file: '];...
1572 errLogFileName},...
1573 'VMT Status: Unexpected Error',...
1574 'error');
1575 fid = fopen(errLogFileName,'W');
1576 fwrite(fid,err.getReport('extended','hyperlinks','off'));
1577 fclose(fid);
1578 rethrow(err)
1579 else
1580 msgbox(['An unexpected error occurred. Error code: ' err.identifier],...
1581 'VMT Status: Unexpected Error',...
1582 'error');
1583 rethrow(err);
1584 end
1585 end
1586
1587 if strcmpi(guiparams.vmt_version,current_vmt_version)
1588 h = msgbox(...
1589 {'VMT is currently up to date, no updates available.';...
1590 '';...
1591 ['Latest available version: ' current_vmt_version];...
1592 ['Installed version: ' guiparams.vmt_version]},'Check for updates','modal');
1593 else
1594 h = msgbox(...
1595 {'VMT is out of date. Please visit the VMT homepage.';...
1596 '';...
1597 ['Latest available version: ' current_vmt_version];...
1598 ['Installed version: ' guiparams.vmt_version]},'Check for updates','modal');
1599 end
1600
1601
1602
1603 function menuAbout_Callback(hObject, eventdata, handles)
1604
1605
1606
1607 guiparams = getappdata(handles.figure1,'guiparams');
1608 messagestr = ...
1609 {'The Velocity Mapping Toolbox';...
1610 [' Version: ' guiparams.vmt_version];...
1611 '';...
1612 '';...
1613 'With collaborations from:';...
1614 ' U.S. Geological Survey';...
1615 ' University of Illinois';...
1616 ' University of Hull';...
1617 '';...
1618 '';...
1619 'Citation: ';...
1620 ' Parsons, D. R., Jackson, P. R., Czuba, J. A., Engel, F. L.,';...
1621 ' Rhoads, B. L., Oberg, K. A., Best, J. L., Mueller, D. S.,';...
1622 ' Johnson, K. K. and Riley, J. D. (2013), Velocity Mapping';...
1623 ' Toolbox (VMT): a processing and visualization suite for';...
1624 ' moving-vessel ADCP measurements. Earth Surf. Process.';...
1625 ' Landforms.doi: 10.1002/esp.3367'};
1626 h = msgbox(messagestr,'About VMT');
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637 function loadDataCallback(hObject, eventdata, handles)
1638
1639
1640
1641
1642 guiparams = getappdata(handles.figure1,'guiparams');
1643 guiprefs = getappdata(handles.figure1,'guiprefs');
1644
1645
1646
1647 current_file = fullfile(guiprefs.ascii_path,guiprefs.ascii_file{1});
1648 [filename,pathname] = uigetfile({'*_ASC.TXT','ASCII (*_ASC.TXT)'}, ...
1649 'Select the ASCII Output Files', ...
1650 current_file, ...
1651 'MultiSelect','on');
1652
1653 if ischar(pathname)
1654 guiparams.data_folder = pathname;
1655 if ischar(filename)
1656 filename = {filename};
1657 end
1658 guiparams.data_files = filename;
1659 guiparams.mat_file = '';
1660
1661 setappdata(handles.figure1,'guiparams',guiparams)
1662
1663
1664
1665
1666
1667 guiprefs = getappdata(handles.figure1,'guiprefs');
1668 guiprefs.ascii_path = pathname;
1669 guiprefs.ascii_file = filename;
1670 setappdata(handles.figure1,'guiprefs',guiprefs)
1671 store_prefs(handles.figure1,'ascii')
1672
1673
1674
1675 log_text = {...
1676 '';...
1677 ['%--- ' datestr(now) ' ---%'];...
1678 'Current Project Directory:';...
1679 guiparams.data_folder;
1680 'Loading the following files into memory:';...
1681 char(filename)};
1682 statusLogging(handles.LogWindow, log_text)
1683
1684
1685
1686 [~,~,savefile,A,z] = ...
1687 VMT_ReadFiles(guiparams.data_folder,guiparams.data_files);
1688 guiparams.savefile = savefile;
1689 guiparams.A = A;
1690 guiparams.z = z;
1691
1692
1693
1694
1695
1696
1697 if A(1).Sup.wm ~= 3
1698 set(handles.VerticalGridNodeSpacing,'String',double(A(1).Sup.binSize_cm(1))/100)
1699 guiparams.vertical_grid_node_spacing = double(A(1).Sup.binSize_cm(1))/100;
1700 else
1701 set(handles.VerticalGridNodeSpacing,'String',0.4)
1702 guiparams.vertical_grid_node_spacing = 0.4;
1703 end
1704
1705
1706
1707
1708 setappdata(handles.figure1,'guiparams',guiparams)
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742 set_enable(handles,'fileloaded')
1743
1744
1745
1746 end
1747
1748
1749
1750
1751
1752 function saveDataCallback(hObject, eventdata, handles)
1753
1754
1755
1756
1757 guiparams = getappdata(handles.figure1,'guiparams');
1758 z = guiparams.z;
1759 A = guiparams.A;
1760 V = guiparams.V;
1761 Map = guiparams.Map;
1762
1763 [the_file,the_path] = ...
1764 uiputfile({'*.mat','MAT-Files (*.mat)'}, ...
1765 'Save MAT-File', ...
1766 fullfile(guiparams.mat_path,guiparams.savefile));
1767
1768
1769
1770 if ischar(the_file)
1771 guiparams.mat_path = the_path;
1772 guiparams.mat_file = the_file;
1773 guiparams.savefile = the_file;
1774
1775
1776
1777 setappdata(handles.figure1,'guiparams',guiparams)
1778
1779
1780
1781 guiprefs = getappdata(handles.figure1,'guiprefs');
1782 guiprefs.mat_path = the_path;
1783 guiprefs.mat_file = the_file;
1784 setappdata(handles.figure1,'guiprefs',guiprefs)
1785 store_prefs(handles.figure1,'mat')
1786
1787 [pathstr,filename,extension] = fileparts([guiparams.mat_path guiparams.savefile]);
1788 savefile = fullfile(pathstr,[filename extension]);
1789
1790
1791 log_text = {...
1792 'Saving Processed Data File...';...
1793 savefile};
1794 statusLogging(handles.LogWindow,log_text)
1795 save(savefile,'A','V','z','Map')
1796 end
1797
1798
1799
1800
1801
1802 function saveBathymetryCallback(hObject, eventdata, handles)
1803
1804
1805
1806 guiparams = getappdata(handles.figure1,'guiparams');
1807 z = guiparams.z;
1808 A = guiparams.A;
1809
1810
1811
1812
1813
1814 msgbox('Processing Bathymetry...Please Be Patient','VMT Status','help','replace')
1815
1816 VMT_MBBathy(z,A,savefile, ...
1817 guiparams.beam_angle, ...
1818 guiparams.magnetic_variation, ...
1819 guiparams.wse, ...
1820 guiparams.output_auxiliary_data);
1821
1822 msgbox('Bathymetry Output Complete','VMT Status','help','replace')
1823
1824
1825
1826
1827 function plottingParametersCallback(hObject, eventdata, handles)
1828
1829
1830
1831 guiparams = getappdata(handles.figure1,'guiparams');
1832
1833 [guiparams.english_units,guiparams.set_cross_section_endpoints,...
1834 guiparams.presentation,guiparams.print] = ...
1835 plotParametersDialog(guiparams.english_units, ...
1836 guiparams.set_cross_section_endpoints,...
1837 guiparams.presentation,guiparams.print,...
1838 handles.figure1);
1839
1840
1841
1842 if guiparams.english_units
1843 set(handles.menuMetric, 'Checked','off')
1844 set(handles.menuEnglish,'Checked','on')
1845 else
1846 set(handles.menuMetric, 'Checked','on')
1847 set(handles.menuEnglish,'Checked','off')
1848 end
1849
1850 if guiparams.set_cross_section_endpoints
1851 set(handles.menuCrossSectionEndpointAutomatic,'Checked','off')
1852 set(handles.menuCrossSectionEndpointManual, 'Checked','on')
1853 else
1854 set(handles.menuCrossSectionEndpointAutomatic,'Checked','on')
1855 set(handles.menuCrossSectionEndpointManual, 'Checked','off')
1856 end
1857
1858 if guiparams.presentation
1859 menuStylePresentation_Callback(hObject, eventdata, handles)
1860
1861
1862
1863
1864 else
1865 menuStylePrint_Callback(hObject, eventdata, handles)
1866
1867
1868
1869
1870 end
1871
1872
1873
1874 setappdata(handles.figure1,'guiparams',guiparams)
1875
1876
1877
1878
1879
1880 function processingParametersCallback(hObject, eventdata, handles)
1881
1882
1883
1884 guiparams = getappdata(handles.figure1,'guiparams');
1885 z = guiparams.z;
1886 A = guiparams.A;
1887 V = guiparams.V;
1888 Map = guiparams.Map;
1889
1890
1891
1892
1893
1894 function shiptracksPlotCallback(hObject, eventdata, handles)
1895
1896
1897
1898
1899 guiparams = getappdata(handles.figure1,'guiparams');
1900 z = guiparams.z;
1901 A = guiparams.A;
1902 V = guiparams.V;
1903
1904 setends = guiparams.set_cross_section_endpoints;
1905
1906
1907
1908 A = VMT_PreProcess(z,A);
1909
1910
1911
1912 log_text = {...
1913 ' Preprocessing complete.';...
1914 ' Begin Data Processing...'};
1915 statusLogging(handles.LogWindow, log_text)
1916
1917
1918
1919 A(1).hgns = guiparams.horizontal_grid_node_spacing;
1920 A(1).vgns = guiparams.vertical_grid_node_spacing;
1921 A(1).wse = guiparams.wse;
1922 [A,V,processing_log_text] = VMT_ProcessTransects(z,A,...
1923 guiparams.set_cross_section_endpoints,guiparams.unit_discharge_correction);
1924
1925
1926
1927
1928
1929 V = VMT_SmoothVar(V, ...
1930 ...
1931 guiparams.horizontal_smoothing_window, ...
1932 guiparams.vertical_smoothing_window);
1933
1934
1935
1936 statusLogging(handles.LogWindow, processing_log_text)
1937
1938
1939
1940 guiparams.z = z;
1941 guiparams.A = A;
1942 guiparams.V = V;
1943 setappdata(handles.figure1,'guiparams',guiparams)
1944
1945
1946
1947 log_text = {'Plotting Shiptracks (reprocessing)'};
1948 statusLogging(handles.LogWindow, log_text)
1949
1950
1951
1952
1953
1954 VMT_PlotShiptracks(A,V,z,setends,handles.Plot1Shiptracks);
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966 function planviewPlotCallback(hObject, eventdata, handles)
1967
1968
1969
1970
1971 guiparams = getappdata(handles.figure1,'guiparams');
1972 guiprefs = getappdata(handles.figure1,'guiprefs');
1973
1974 if iscell(guiparams.mat_file)
1975
1976
1977 log_text = {'Plotting Multiple Transects (Planview)'};
1978 statusLogging(handles.LogWindow, log_text)
1979
1980
1981
1982
1983 log_text = {...
1984 'Plan View Plotting Parameters';...
1985 sprintf(' Depth range %3.1f to %3.1f m',guiparams.depth_range_min, guiparams.depth_range_max);...
1986 sprintf(' Vector scale: %d',guiparams.vector_scale_plan_view);...
1987 sprintf(' Vector spacing: %d',guiparams.vector_spacing_plan_view);...
1988 sprintf(' Smoothing window size: %d',guiparams.smoothing_window_size);...
1989 };
1990 statusLogging(handles.LogWindow, log_text)
1991
1992
1993
1994 z = [];
1995 A = [];
1996 V = [];
1997 Map = [];
1998 depth_range = [guiparams.depth_range_min guiparams.depth_range_max];
1999 [PVdata,~,log_text] = VMT_PlotPlanViewQuivers(z,A,V,Map, ...
2000 depth_range, ...
2001 guiparams.vector_scale_plan_view, ...
2002 guiparams.vector_spacing_plan_view, ...
2003 guiparams.smoothing_window_size, ...
2004 guiparams.display_shoreline, ...
2005 guiparams.english_units, ...
2006 guiparams.mat_file, ...
2007 guiparams.mat_path);
2008 statusLogging(handles.LogWindow, log_text)
2009
2010
2011
2012 if guiparams.display_shoreline
2013 [guiprefs.shoreline_file,guiprefs.shoreline_path] = uigetfile(...
2014 {'*.txt;*.csv','All Text Files'; '*.*','All Files'},...
2015 'Select Map Text File',...
2016 fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file));
2017 if ischar(guiprefs.shoreline_file)
2018 mapdata = dlmread(fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file));
2019 Map.UTMe = mapdata(:,1);
2020 Map.UTMn = mapdata(:,2);
2021 Map.infile = fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file);
2022
2023 else
2024 Map = [];
2025 end
2026 VMT_PlotShoreline(Map)
2027 log_text = {...
2028 ' Loading map file.';...
2029 ' Plotting shoreline.'...
2030 };
2031 statusLogging(handles.LogWindow, log_text)
2032 else
2033 Map = [];
2034 end
2035
2036 else
2037 z = guiparams.z;
2038 A = guiparams.A;
2039
2040 Map = guiparams.Map;
2041
2042
2043
2044 log_text = {'Plotting Depth Averaged Vectors (reprocessing)'};
2045 statusLogging(handles.LogWindow, log_text)
2046
2047
2048
2049
2050 A = VMT_PreProcess(z,A);
2051
2052
2053
2054 A(1).hgns = guiparams.horizontal_grid_node_spacing;
2055 A(1).vgns = guiparams.vertical_grid_node_spacing;
2056 A(1).wse = guiparams.wse;
2057 [A,V,processing_log_text] = VMT_ProcessTransects(z,A,...
2058 guiparams.set_cross_section_endpoints,guiparams.unit_discharge_correction);
2059
2060
2061
2062
2063
2064 V = VMT_SmoothVar(V, ...
2065 ...
2066 guiparams.horizontal_smoothing_window, ...
2067 guiparams.vertical_smoothing_window);
2068
2069
2070
2071 statusLogging(handles.LogWindow, processing_log_text)
2072
2073
2074
2075 log_text = {...
2076 'Plan View Plotting Parameters';...
2077 sprintf(' Depth range %3.1f to %3.1f m',guiparams.depth_range_min, guiparams.depth_range_max);...
2078 sprintf(' Vector scale: %d',guiparams.vector_scale_plan_view);...
2079 sprintf(' Vector spacing: %d',guiparams.vector_spacing_plan_view);...
2080 sprintf(' Smoothing window size: %d',guiparams.smoothing_window_size);...
2081 };
2082 statusLogging(handles.LogWindow, log_text)
2083
2084
2085
2086
2087 depth_range = [guiparams.depth_range_min guiparams.depth_range_max];
2088
2089
2090 [PVdata,~,log_text] = VMT_PlotPlanViewQuivers(z,A,V,Map, ...
2091 depth_range, ...
2092 guiparams.vector_scale_plan_view, ...
2093 guiparams.vector_spacing_plan_view, ...
2094 guiparams.smoothing_window_size, ...
2095 guiparams.display_shoreline, ...
2096 guiparams.english_units, ...
2097 guiparams.mat_file, ...
2098 guiparams.mat_path);
2099 statusLogging(handles.LogWindow, log_text)
2100
2101
2102
2103 if guiparams.display_shoreline
2104 [guiprefs.shoreline_file,guiprefs.shoreline_path] = uigetfile(...
2105 {'*.txt;*.csv','All Text Files'; '*.*','All Files'},...
2106 'Select Map Text File',...
2107 fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file));
2108 if ischar(guiprefs.shoreline_file)
2109 mapdata = dlmread(fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file));
2110 Map.UTMe = mapdata(:,1);
2111 Map.UTMn = mapdata(:,2);
2112 Map.infile = fullfile(guiprefs.shoreline_path,guiprefs.shoreline_file);
2113
2114 else
2115 Map = [];
2116 end
2117 VMT_PlotShoreline(Map)
2118 log_text = {...
2119 ' Loading map file.';...
2120 ' Plotting shoreline.'...
2121 };
2122 statusLogging(handles.LogWindow, log_text)
2123 else
2124 Map = [];
2125 end
2126
2127 end
2128
2129 if guiparams.add_background
2130 [guiprefs,log_text] = VMT_OverlayDOQQ(guiprefs);
2131 statusLogging(handles.LogWindow, log_text)
2132 end
2133
2134
2135
2136 guiparams.z = z;
2137 guiparams.A = A;
2138 guiparams.V = V;
2139 guiparams.Map = Map;
2140 guiparams.iric_anv_planview_data = PVdata;
2141 setappdata(handles.figure1,'guiparams',guiparams);
2142
2143
2144
2145 setappdata(handles.figure1,'guiprefs',guiprefs)
2146 store_prefs(handles.figure1,'shoreline')
2147 store_prefs(handles.figure1,'aerial')
2148
2149
2150
2151 if guiparams.presentation
2152 menuStylePresentation_Callback(hObject, eventdata, handles)
2153 else
2154 menuStylePrint_Callback(hObject, eventdata, handles)
2155 end
2156 switch guiparams.renderer
2157 case 'OpenGL'
2158 menuOpenGL_Callback(hObject, eventdata, handles)
2159 case 'painters'
2160 menuPainters_Callback(hObject, eventdata, handles)
2161 case 'zbuffer'
2162 menuZbuffer_Callback(hObject, eventdata, handles)
2163 end
2164
2165
2166
2167 hff = findobj('name','Plan View Map');
2168 if ~isempty(hff) && ishandle(hff)
2169 figure(hff)
2170 end
2171
2172
2173
2174 VMT_GraphicsControl
2175
2176
2177
2178
2179
2180 function crosssectionPlotCallback(hObject, eventdata, handles)
2181
2182
2183
2184
2185 guiparams = getappdata(handles.figure1,'guiparams');
2186 z = guiparams.z;
2187 A = guiparams.A;
2188
2189
2190
2191
2192
2193 A = VMT_PreProcess(z,A);
2194
2195
2196
2197 log_text = {'Plotting Cross Section (reprocessing)'};
2198 statusLogging(handles.LogWindow, log_text)
2199
2200
2201
2202 A(1).hgns = guiparams.horizontal_grid_node_spacing;
2203 A(1).vgns = guiparams.vertical_grid_node_spacing;
2204 A(1).wse = guiparams.wse;
2205 [A,V,processing_log_text] = VMT_ProcessTransects(z,A,...
2206 guiparams.set_cross_section_endpoints,guiparams.unit_discharge_correction);
2207
2208
2209
2210 statusLogging(handles.LogWindow, processing_log_text)
2211
2212
2213
2214 log_text = {...
2215 'Cross Section Plotting Parameters';...
2216 sprintf(' Contour variable: %s' ,guiparams.contours(guiparams.idx_contour).string);...
2217 sprintf(' Vertical exaggeration: %d' ,guiparams.vertical_exaggeration);...
2218 sprintf(' Vector scale: %3.1f' ,guiparams.vector_scale_cross_section);...
2219 sprintf(' Horizontal vector spacing: %d' ,guiparams.horizontal_vector_spacing);...
2220 sprintf(' Vertical vector spacing: %d' ,guiparams.vertical_vector_spacing);...
2221 sprintf(' Horizontal smooting window: %d',guiparams.horizontal_smoothing_window);...
2222 sprintf(' Vertical smoothing window: %d' ,guiparams.vertical_smoothing_window);...
2223 };
2224 if guiparams.plot_secondary_flow_vectors
2225 log_text = vertcat(log_text, {...
2226 sprintf(' Vector variable: %s',guiparams.secondary_flows(guiparams.idx_secondary_flow_vector_variable).string);...
2227 sprintf(' Inc. vertical component?: %d',guiparams.include_vertical_velocity)...
2228 });
2229 end
2230
2231
2232 statusLogging(handles.LogWindow, log_text)
2233
2234 if guiparams.plot_secondary_flow_vectors
2235
2236
2237
2238
2239
2240 V = VMT_SmoothVar(V, ...
2241 ...
2242 guiparams.horizontal_smoothing_window, ...
2243 guiparams.vertical_smoothing_window);
2244 [~,A,V,plot_cont_log_text] = VMT_PlotXSContQuiver(z,A,V, ...
2245 guiparams.contour, ...
2246 guiparams.vector_scale_cross_section, ...
2247 guiparams.vertical_exaggeration, ...
2248 guiparams.horizontal_vector_spacing, ...
2249 guiparams.vertical_vector_spacing, ...
2250 guiparams.secondary_flow_vector_variable, ...
2251 guiparams.include_vertical_velocity, ...
2252 guiparams.english_units);
2253
2254 elseif ~guiparams.plot_secondary_flow_vectors
2255 V = VMT_SmoothVar(V, ...
2256 ...
2257 guiparams.horizontal_smoothing_window, ...
2258 guiparams.vertical_smoothing_window);
2259
2260 [~,A,V,zmin,zmax,plot_cont_log_text] = VMT_PlotXSCont(z,A,V, ...
2261 guiparams.contour, ...
2262 guiparams.vertical_exaggeration, ...
2263 guiparams.english_units);
2264
2265 guiparams.zmin = zmin;
2266 guiparams.zmax = zmax;
2267 setappdata(handles.figure1,'guiparams',guiparams)
2268 end
2269
2270
2271
2272 if guiparams.presentation
2273 menuStylePresentation_Callback(hObject, eventdata, handles)
2274 else
2275 menuStylePrint_Callback(hObject, eventdata, handles)
2276 end
2277 switch guiparams.renderer
2278 case 'OpenGL'
2279 menuOpenGL_Callback(hObject, eventdata, handles)
2280 case 'painters'
2281 menuPainters_Callback(hObject, eventdata, handles)
2282 case 'zbuffer'
2283 menuZbuffer_Callback(hObject, eventdata, handles)
2284 end
2285
2286
2287
2288 hff = findobj('name','Mean Cross Section Contour');
2289 if ~isempty(hff) && ishandle(hff)
2290 figure(hff)
2291 end
2292
2293
2294
2295 guiparams.V = V;
2296 setappdata(handles.figure1,'guiparams',guiparams)
2297
2298
2299
2300 VMT_GraphicsControl
2301
2302
2303
2304 statusLogging(handles.LogWindow, plot_cont_log_text)
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315 function SaveMATFile_Callback(hObject, eventdata, handles)
2316
2317
2318
2319
2320 guiparams = getappdata(handles.figure1,'guiparams');
2321 z = guiparams.z;
2322 A = guiparams.A;
2323 V = guiparams.V;
2324 Map = guiparams.Map;
2325
2326 [the_file,the_path] = ...
2327 uiputfile({'*.mat','MAT-Files (*.mat)'}, ...
2328 'Save MAT-File', ...
2329 fullfile(guiparams.mat_path,guiparams.savefile));
2330
2331
2332
2333 if ischar(the_file)
2334 guiparams.mat_path = the_path;
2335 guiparams.mat_file = the_file;
2336 guiparams.savefile = the_file;
2337
2338
2339
2340 setappdata(handles.figure1,'guiparams',guiparams)
2341
2342
2343
2344 guiprefs = getappdata(handles.figure1,'guiprefs');
2345 guiprefs.mat_path = the_path;
2346 guiprefs.mat_file = the_file;
2347 setappdata(handles.figure1,'guiprefs',guiprefs)
2348 store_prefs(handles.figure1,'mat')
2349
2350 [~,filename,extension] = fileparts(guiparams.savefile);
2351 savefile = [filename extension];
2352 h = msgbox(['Saving processed data in MAT File ''' savefile ''''], ...
2353 'Saving Processed Data File...');
2354 disp('Saving Processed Data File...')
2355 disp(savefile)
2356 save(savefile,'A','V','z','Map')
2357 end
2358
2359
2360
2361
2362
2363 function SaveTecplotFile_Callback(hObject, eventdata, handles)
2364
2365
2366
2367 guiparams = getappdata(handles.figure1,'guiparams');
2368
2369
2370 V = guiparams.V;
2371
2372
2373 [the_file,the_path] = ...
2374 uiputfile({'*.dat','Tecplot Files (*.dat)'}, ...
2375 'Save Tecplot File', ...
2376 fullfile(guiparams.tecplot_path,guiparams.tecplot_file));
2377
2378
2379
2380 if ischar(the_file)
2381 guiparams.tecplot_path = the_path;
2382 guiparams.tecplot_file = the_file;
2383
2384
2385
2386 setappdata(handles.figure1,'guiparams',guiparams)
2387
2388
2389
2390 guiprefs = getappdata(handles.figure1,'guiprefs');
2391 guiprefs.tecplot_path = the_path;
2392 guiprefs.tecplot_file = the_file;
2393 setappdata(handles.figure1,'guiprefs',guiprefs)
2394 store_prefs(handles.figure1,'tecplot')
2395
2396
2397
2398 log_text = {...
2399 'Exporting Data to Tecplot (*.dat) File...';...
2400 'Directory:';...
2401 the_path;...
2402 ['Filename: ' the_file]};
2403 statusLogging(handles.LogWindow,log_text)
2404
2405 if isempty(V)
2406 A = guiparams.A;
2407 A(1).hgns = guiparams.horizontal_grid_node_spacing;
2408 A(1).vgns = guiparams.vertical_grid_node_spacing;
2409 A(1).wse = guiparams.wse;
2410 [~,V,processing_log_text] = VMT_ProcessTransects(z,A,...
2411 guiparams.set_cross_section_endpoints,...
2412 guiparams.unit_discharge_correction);
2413 end
2414 VMT_BuildTecplotFile(V,fullfile(guiparams.tecplot_path,guiparams.tecplot_file));
2415
2416
2417
2418 log_text = {'Exporting XS Bathy Data to Tecplot (*.dat) File...'};
2419 statusLogging(handles.LogWindow,log_text)
2420
2421 VMT_BuildTecplotFile_XSBathy(V,fullfile(guiparams.tecplot_path,guiparams.tecplot_file));
2422
2423
2424
2425 log_text = {'Tecplot Export Complete'};
2426 statusLogging(handles.LogWindow,log_text)
2427
2428 end
2429
2430
2431
2432
2433
2434 function SaveGoogleEarthFile_Callback(hObject, eventdata, handles)
2435
2436
2437
2438 guiparams = getappdata(handles.figure1,'guiparams');
2439
2440 A = guiparams.A;
2441 V = guiparams.V;
2442 Map = guiparams.Map;
2443
2444 [the_file,the_path] = ...
2445 uiputfile({'*.kmz','Google Earth Files (*.kmz)'}, ...
2446 'Save Google Earth File', ...
2447 fullfile(guiparams.kmz_path,guiparams.kmz_file));
2448
2449
2450
2451 if ischar(the_file)
2452 guiparams.kmz_path = the_path;
2453 guiparams.kmz_file = the_file;
2454
2455
2456
2457 setappdata(handles.figure1,'guiparams',guiparams)
2458
2459
2460
2461 guiprefs = getappdata(handles.figure1,'guiprefs');
2462 guiprefs.kmz_path = the_path;
2463 guiprefs.kmz_file = the_file;
2464 setappdata(handles.figure1,'guiprefs',guiprefs)
2465 store_prefs(handles.figure1,'kmz')
2466
2467
2468
2469
2470
2471
2472 if isempty(V)
2473 A = guiparams.A;
2474 A(1).hgns = guiparams.horizontal_grid_node_spacing;
2475 A(1).vgns = guiparams.vertical_grid_node_spacing;
2476 A(1).wse = guiparams.wse;
2477 [~,V,processing_log_text] = VMT_ProcessTransects(z,A,...
2478 guiparams.set_cross_section_endpoints,...
2479 guiparams.unit_discharge_correction);
2480 end
2481 VMT_MeanXS2GE_3D(A,V,[], ...
2482 fullfile(guiparams.kmz_path,guiparams.kmz_file), ...
2483 guiparams.vertical_exaggeration, ...
2484 guiparams.vertical_offset);
2485 end
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495 function ExportMultibeamBathymetry_Callback(hObject, eventdata, handles)
2496
2497
2498
2499 guiparams = getappdata(handles.figure1,'guiparams');
2500 guiprefs = getappdata(handles.figure1,'guiprefs');
2501 z = guiparams.z;
2502 A = guiparams.A;
2503 V = guiparams.V;
2504
2505 setends = guiparams.set_cross_section_endpoints;
2506
2507 [the_file,the_path] = ...
2508 uiputfile({'*.csv','Multibeam Bathymetry Files (*.csv)'}, ...
2509 'Export Multibeam Bathymetry', ...
2510 fullfile(guiprefs.multibeambathymetry_path, ...
2511 guiprefs.multibeambathymetry_file));
2512
2513 if ischar(the_file)
2514 guiparams.multibeambathymetry_path = the_path;
2515 guiparams.multibeambathymetry_file = the_file;
2516
2517
2518
2519 setappdata(handles.figure1,'guiparams',guiparams)
2520
2521
2522
2523 guiprefs = getappdata(handles.figure1,'guiprefs');
2524 guiprefs.multibeambathymetry_path = the_path;
2525 guiprefs.multibeambathymetry_file = the_file;
2526 setappdata(handles.figure1,'guiprefs',guiprefs)
2527 store_prefs(handles.figure1,'multibeambathymetry')
2528
2529 if guiparams.output_auxiliary_data
2530 end
2531
2532
2533
2534 savefile = fullfile(guiparams.multibeambathymetry_path, ...
2535 guiparams.multibeambathymetry_file);
2536
2537 log_text = {'Multibeam bathymetry file saved to:';...
2538 [' ' savefile]};
2539 statusLogging(handles.LogWindow,log_text)
2540
2541
2542
2543 A(1).hgns = guiparams.horizontal_grid_node_spacing;
2544 A(1).vgns = guiparams.vertical_grid_node_spacing;
2545 A(1).wse = guiparams.wse;
2546 [A,V,processing_log_text] = VMT_ProcessTransects(z,A,...
2547 guiparams.set_cross_section_endpoints,guiparams.unit_discharge_correction);
2548
2549
2550
2551
2552
2553 V = VMT_SmoothVar(V, ...
2554 ...
2555 guiparams.horizontal_smoothing_window, ...
2556 guiparams.vertical_smoothing_window);
2557
2558
2559
2560 statusLogging(handles.LogWindow, processing_log_text)
2561
2562
2563 VMT_MBBathy(guiparams.z, ...
2564 guiparams.A, ...
2565 savefile, ...
2566 guiparams.beam_angle, ...
2567 guiparams.magnetic_variation, ...
2568 guiparams.wse, ...
2569 guiparams.output_auxiliary_data);
2570
2571
2572
2573 end
2574
2575
2576
2577
2578
2579 function BeamAngle_Callback(hObject, eventdata, handles)
2580
2581
2582
2583
2584 guiparams = getappdata(handles.figure1,'guiparams');
2585
2586
2587
2588 new_beam_angle = str2double(get(hObject,'String'));
2589 is_a_number = ~isnan(new_beam_angle);
2590 is_positive = new_beam_angle>=0;
2591
2592
2593
2594 if is_a_number && is_positive
2595 guiparams.beam_angle = new_beam_angle;
2596
2597
2598
2599 setappdata(handles.figure1,'guiparams',guiparams)
2600
2601 else
2602 set(hObject,'String',guiparams.beam_angle)
2603 end
2604
2605
2606
2607
2608
2609 function MagneticVariation_Callback(hObject, eventdata, handles)
2610
2611
2612
2613
2614 guiparams = getappdata(handles.figure1,'guiparams');
2615
2616
2617
2618 new_magnetic_variation = str2double(get(hObject,'String'));
2619 is_a_number = ~isnan(new_magnetic_variation);
2620 is_positive = new_magnetic_variation>=0;
2621
2622
2623
2624 if is_a_number && is_positive
2625 guiparams.magnetic_variation = new_magnetic_variation;
2626
2627
2628
2629 setappdata(handles.figure1,'guiparams',guiparams)
2630
2631 else
2632 set(hObject,'String',guiparams.magnetic_variation)
2633 end
2634
2635
2636
2637
2638
2639 function WSE_Callback(hObject, eventdata, handles)
2640
2641
2642
2643 guiparams = getappdata(handles.figure1,'guiparams');
2644
2645
2646
2647 new_wse = str2double(get(hObject,'String'));
2648 is_a_number = ~isnan(new_wse);
2649 is_positive = new_wse>=0;
2650
2651
2652
2653 if is_a_number && is_positive
2654 guiparams.wse = new_wse;
2655
2656
2657
2658 setappdata(handles.figure1,'guiparams',guiparams)
2659
2660 else
2661 set(hObject,'String',guiparams.wse)
2662 end
2663
2664
2665
2666
2667
2668 function OutputAuxiliaryData_Callback(hObject, eventdata, handles)
2669
2670
2671
2672
2673 guiparams = getappdata(handles.figure1,'guiparams');
2674
2675
2676
2677 guiparams.output_auxiliary_data = logical(get(hObject,'Value'));
2678
2679
2680
2681 setappdata(handles.figure1,'guiparams',guiparams)
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691 function DepthRangeMin_Callback(hObject, eventdata, handles)
2692
2693
2694
2695 guiparams = getappdata(handles.figure1,'guiparams');
2696
2697
2698
2699 new_depth_range_min = str2double(get(hObject,'String'));
2700 is_a_number = ~isnan(new_depth_range_min);
2701 is_positive = new_depth_range_min>=0;
2702
2703
2704
2705 if is_a_number && is_positive
2706 guiparams.depth_range_min = new_depth_range_min;
2707
2708
2709
2710 setappdata(handles.figure1,'guiparams',guiparams)
2711
2712 else
2713 set(hObject,'String',guiparams.depth_range_min)
2714 end
2715
2716
2717
2718
2719
2720 function DepthRangeMax_Callback(hObject, eventdata, handles)
2721
2722
2723
2724 guiparams = getappdata(handles.figure1,'guiparams');
2725
2726
2727
2728 new_depth_range_max = str2double(get(hObject,'String'));
2729 is_a_number = ~isnan(new_depth_range_max);
2730 is_positive = new_depth_range_max>=0;
2731
2732
2733
2734 if is_a_number && is_positive
2735 guiparams.depth_range_max = new_depth_range_max;
2736
2737
2738
2739 setappdata(handles.figure1,'guiparams',guiparams)
2740
2741 else
2742 set(hObject,'String',guiparams.depth_range_max)
2743 end
2744
2745
2746
2747
2748
2749 function VectorScalePlanView_Callback(hObject, eventdata, handles)
2750
2751
2752
2753
2754 guiparams = getappdata(handles.figure1,'guiparams');
2755
2756
2757
2758 new_vector_scale_plan_view = str2double(get(hObject,'String'));
2759 is_a_number = ~isnan(new_vector_scale_plan_view);
2760 is_positive = new_vector_scale_plan_view>=0;
2761
2762
2763
2764 if is_a_number && is_positive
2765 guiparams.vector_scale_plan_view = round(new_vector_scale_plan_view);
2766
2767
2768
2769 setappdata(handles.figure1,'guiparams',guiparams)
2770
2771 else
2772 set(hObject,'String',guiparams.vector_scale_plan_view)
2773 end
2774
2775
2776
2777
2778
2779 function VectorSpacingPlanview_Callback(hObject, eventdata, handles)
2780
2781
2782
2783
2784 guiparams = getappdata(handles.figure1,'guiparams');
2785
2786
2787
2788 new_vector_spacing_plan_view = str2double(get(hObject,'String'));
2789 is_a_number = ~isnan(new_vector_spacing_plan_view);
2790 is_positive = new_vector_spacing_plan_view>=0;
2791
2792
2793
2794 if is_a_number && is_positive
2795 guiparams.vector_spacing_plan_view = round(new_vector_spacing_plan_view);
2796
2797
2798
2799 setappdata(handles.figure1,'guiparams',guiparams)
2800
2801 else
2802 set(hObject,'String',guiparams.vector_spacing_plan_view)
2803 end
2804
2805
2806
2807
2808
2809 function SmoothingWindowSize_Callback(hObject, eventdata, handles)
2810
2811
2812
2813
2814 guiparams = getappdata(handles.figure1,'guiparams');
2815
2816
2817
2818 new_smoothing_window_size = str2double(get(hObject,'String'));
2819 is_a_number = ~isnan(new_smoothing_window_size);
2820 is_positive = new_smoothing_window_size>=0;
2821
2822
2823
2824 if is_a_number && is_positive
2825 guiparams.smoothing_window_size = round(new_smoothing_window_size);
2826
2827
2828
2829 setappdata(handles.figure1,'guiparams',guiparams)
2830
2831 else
2832 set(hObject,'String',guiparams.smoothing_window_size)
2833 end
2834
2835
2836
2837
2838
2839 function DisplayShoreline_Callback(hObject, eventdata, handles)
2840
2841
2842
2843 guiparams = getappdata(handles.figure1,'guiparams');
2844
2845
2846
2847 guiparams.display_shoreline = logical(get(hObject,'Value'));
2848
2849
2850
2851 setappdata(handles.figure1,'guiparams',guiparams)
2852
2853
2854
2855
2856
2857 function AddBackground_Callback(hObject, eventdata, handles)
2858
2859
2860
2861 guiparams = getappdata(handles.figure1,'guiparams');
2862
2863
2864
2865 guiparams.add_background = logical(get(hObject,'Value'));
2866
2867
2868
2869 setappdata(handles.figure1,'guiparams',guiparams)
2870
2871
2872
2873
2874
2875 function PlotPlanView_Callback(hObject, eventdata, handles)
2876 planviewPlotCallback(hObject, eventdata, handles)
2877
2878
2879
2880
2881
2882
2883
2884
2885 function HorizontalGridNodeSpacing_Callback(hObject, eventdata, handles)
2886
2887
2888
2889
2890 guiparams = getappdata(handles.figure1,'guiparams');
2891
2892
2893
2894 new_horizontal_grid_node_spacing = str2double(get(hObject,'String'));
2895 is_a_number = ~isnan(new_horizontal_grid_node_spacing);
2896 is_positive = new_horizontal_grid_node_spacing>=0;
2897
2898
2899
2900 if is_a_number && is_positive
2901 guiparams.horizontal_grid_node_spacing = new_horizontal_grid_node_spacing;
2902
2903
2904
2905 setappdata(handles.figure1,'guiparams',guiparams)
2906
2907 else
2908 set(hObject,'String',guiparams.horizontal_grid_node_spacing)
2909 end
2910
2911
2912
2913
2914 function VerticalGridNodeSpacing_Callback(hObject, eventdata, handles)
2915
2916
2917
2918
2919 guiparams = getappdata(handles.figure1,'guiparams');
2920
2921
2922
2923 new_vertical_grid_node_spacing = str2double(get(hObject,'String'));
2924 is_a_number = ~isnan(new_vertical_grid_node_spacing);
2925 is_positive = new_vertical_grid_node_spacing>=0;
2926
2927
2928
2929 if is_a_number && is_positive
2930 guiparams.vertical_grid_node_spacing = new_vertical_grid_node_spacing;
2931
2932
2933
2934 setappdata(handles.figure1,'guiparams',guiparams)
2935
2936 else
2937 set(hObject,'String',guiparams.vertical_grid_node_spacing)
2938 end
2939
2940
2941
2942
2943 function SetCrossSectionEndpoints_Callback(hObject, eventdata, handles)
2944
2945
2946
2947
2948 guiparams = getappdata(handles.figure1,'guiparams');
2949
2950
2951
2952 guiparams.set_cross_section_endpoints = logical(get(hObject,'Value'));
2953
2954
2955
2956 setappdata(handles.figure1,'guiparams',guiparams)
2957
2958
2959
2960
2961
2962 function PlotShiptracks_Callback(hObject, eventdata, handles)
2963 shiptracksPlotCallback(hObject, eventdata, handles)
2964
2965
2966
2967
2968
2969
2970
2971
2972 function Contour_Callback(hObject, eventdata, handles)
2973
2974
2975
2976 guiparams = getappdata(handles.figure1,'guiparams');
2977
2978
2979
2980 idx_variable = get(hObject,'Value');
2981 guiparams.idx_contour = idx_variable;
2982 guiparams.contour = guiparams.contours(idx_variable).variable;
2983
2984
2985
2986 setappdata(handles.figure1,'guiparams',guiparams)
2987
2988
2989
2990
2991
2992 function VerticalExaggeration_Callback(hObject, eventdata, handles)
2993
2994
2995
2996
2997 guiparams = getappdata(handles.figure1,'guiparams');
2998
2999
3000
3001 guiparams.vertical_exaggeration = str2double(get(hObject,'String'));
3002
3003
3004
3005 setappdata(handles.figure1,'guiparams',guiparams)
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015 function VectorScaleCrossSection_Callback(hObject, eventdata, handles)
3016
3017
3018
3019 guiparams = getappdata(handles.figure1,'guiparams');
3020
3021
3022
3023 guiparams.vector_scale_cross_section = str2double(get(hObject,'String'));
3024
3025
3026
3027 setappdata(handles.figure1,'guiparams',guiparams)
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037 function HorizontalVectorSpacing_Callback(hObject, eventdata, handles)
3038
3039
3040
3041 guiparams = getappdata(handles.figure1,'guiparams');
3042
3043
3044
3045 guiparams.horizontal_vector_spacing = str2double(get(hObject,'String'));
3046
3047
3048
3049 setappdata(handles.figure1,'guiparams',guiparams)
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059 function VerticalVectorSpacing_Callback(hObject, eventdata, handles)
3060
3061
3062
3063
3064 guiparams = getappdata(handles.figure1,'guiparams');
3065
3066
3067
3068 guiparams.vertical_vector_spacing = str2double(get(hObject,'String'));
3069
3070
3071
3072 setappdata(handles.figure1,'guiparams',guiparams)
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082 function HorizontalSmoothingWindow_Callback(hObject, eventdata, handles)
3083
3084
3085
3086
3087 guiparams = getappdata(handles.figure1,'guiparams');
3088
3089
3090
3091 guiparams.horizontal_smoothing_window = str2double(get(hObject,'String'));
3092
3093
3094
3095 setappdata(handles.figure1,'guiparams',guiparams)
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105 function VerticalSmoothingWindow_Callback(hObject, eventdata, handles)
3106
3107
3108
3109
3110 guiparams = getappdata(handles.figure1,'guiparams');
3111
3112
3113
3114 guiparams.vertical_smoothing_window = str2double(get(hObject,'String'));
3115
3116
3117
3118 setappdata(handles.figure1,'guiparams',guiparams)
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128 function PlotSecondaryFlowVectors_Callback(hObject, eventdata, handles)
3129
3130
3131
3132 guiparams = getappdata(handles.figure1,'guiparams');
3133
3134
3135
3136 guiparams.plot_secondary_flow_vectors = logical(get(hObject,'Value'));
3137
3138
3139
3140 setappdata(handles.figure1,'guiparams',guiparams)
3141
3142
3143
3144
3145
3146 function SecondaryFlowVectorVariable_Callback(hObject, eventdata, handles)
3147
3148
3149
3150 guiparams = getappdata(handles.figure1,'guiparams');
3151
3152
3153
3154 idx_variable = get(hObject,'Value');
3155 guiparams.idx_secondary_flow_vector_variable = idx_variable;
3156 guiparams.secondary_flow_vector_variable = guiparams.secondary_flows(idx_variable).variable;
3157
3158
3159
3160 setappdata(handles.figure1,'guiparams',guiparams)
3161
3162
3163
3164
3165
3166 function IncludeVerticalVelocity_Callback(hObject, eventdata, handles)
3167
3168
3169
3170 guiparams = getappdata(handles.figure1,'guiparams');
3171
3172
3173
3174 guiparams.include_vertical_velocity = logical(get(hObject,'Value'));
3175
3176
3177
3178 setappdata(handles.figure1,'guiparams',guiparams)
3179
3180
3181
3182
3183
3184 function PlotCrossSection_Callback(hObject, eventdata, handles)
3185 crosssectionPlotCallback(hObject, eventdata, handles)
3186
3187
3188
3189
3190 function ClearLog_Callback(hObject, eventdata, handles)
3191 set(handles.LogWindow,'string','')
3192
3193
3194
3195 function SaveLog_Callback(hObject, eventdata, handles)
3196
3197
3198
3199 guiparams = getappdata(handles.figure1,'guiparams');
3200 guiprefs = getappdata(handles.figure1,'guiprefs');
3201
3202
3203
3204
3205
3206 [the_file,the_path] = ...
3207 uiputfile({'*.txt','TXT-Files (*.txt)'}, ...
3208 'Choose where to save the log file', ...
3209 fullfile(guiprefs.log_path,guiprefs.log_file));
3210
3211
3212
3213 if ischar(the_file)
3214 guiparams.log_path = the_path;
3215 guiparams.log_file = the_file;
3216
3217
3218
3219
3220 setappdata(handles.figure1,'guiparams',guiparams)
3221
3222
3223
3224 guiprefs = getappdata(handles.figure1,'guiprefs');
3225 guiprefs.log_path = the_path;
3226 guiprefs.log_file = the_file;
3227 setappdata(handles.figure1,'guiprefs',guiprefs)
3228 store_prefs(handles.figure1,'log')
3229
3230 [~,filename,extension] = fileparts(the_file);
3231 savefile = [the_path filename extension];
3232 h = msgbox(['Saving log to: ''' savefile ''''], ...
3233 'Saving Log File...');
3234
3235 logfile = get(handles.LogWindow,'string');
3236 [nrows,~]= size(logfile);
3237 fid = fopen(savefile, 'w');
3238 for row=1:nrows
3239 fprintf(fid, '%s \n', logfile{row,:});
3240 end
3241 fclose(fid);
3242 end
3243
3244
3245
3246
3247
3248
3249
3250 function handles = buildToolbar(handles)
3251
3252 icons = getIcons;
3253 ht = uitoolbar('Parent',handles.figure1);
3254
3255
3256
3257
3258
3259 handles.toolbarLoadData = ...
3260 uipushtool('Parent', ht, ...
3261 'CData', icons(1).data, ...
3262 'TooltipString','Open ASCII File');
3263
3264
3265
3266
3267
3268 handles.toolbarSaveMatFile = ...
3269 uipushtool('Parent', ht, ...
3270 'CData', icons(2).data, ...
3271 'TooltipString','Save MAT File', ...
3272 'Separator', 'on');
3273
3274
3275
3276
3277 handles.toolbarSaveBathymetry = ...
3278 uipushtool('Parent', ht, ...
3279 'CData', icons(5).data, ...
3280 'TooltipString','Export Bathymetry');
3281
3282
3283
3284 handles.toolbarSaveFigures = ...
3285 uipushtool('Parent', ht, ...
3286 'CData', icons(6).data, ...
3287 'TooltipString','Export Figures');
3288
3289
3290
3291 handles.toolbarSaveExcel = ...
3292 uipushtool('Parent', ht, ...
3293 'CData', icons(7).data, ...
3294 'TooltipString','Export Excel File');
3295
3296
3297
3298
3299
3300 handles.toolbarPlottingParameters = ...
3301 uipushtool('Parent', ht, ...
3302 'CData', icons(3).data, ...
3303 'TooltipString','Plotting Parameters', ...
3304 'Separator', 'on');
3305
3306
3307
3308
3309 handles.toolbarProcessingParameters = ...
3310 uipushtool('Parent', ht, ...
3311 'CData', icons(4).data, ...
3312 'TooltipString','Processing Parameters');
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341 set(handles.toolbarLoadData, 'ClickedCallback',{@loadDataCallback,handles})
3342 set(handles.toolbarSaveMatFile, 'ClickedCallback',{@saveDataCallback,handles})
3343 set(handles.toolbarSaveBathymetry, 'ClickedCallback',{@ExportMultibeamBathymetry_Callback,handles})
3344 set(handles.toolbarSaveFigures, 'ClickedCallback',{@menuExportFigures_Callback,handles})
3345 set(handles.toolbarSaveExcel, 'ClickedCallback',{@menuSaveExcel_Callback,handles})
3346 set(handles.toolbarPlottingParameters, 'ClickedCallback',{@plottingParametersCallback,handles})
3347 set(handles.toolbarProcessingParameters,'ClickedCallback',{@processingParametersCallback,handles})
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358 function load_prefs(hfigure)
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384 if ispref('VMT','ascii')
3385 ascii = getpref('VMT','ascii');
3386 if exist(ascii.path,'dir')
3387 guiprefs.ascii_path = ascii.path;
3388 else
3389 guiprefs.ascii_path = pwd;
3390 end
3391 does_exist = false(1,length(ascii.file));
3392 for k = 1:length(ascii.file)
3393 does_exist(k) = exist(fullfile(ascii.path,ascii.file{k}),'file');
3394 end
3395 if any(does_exist)
3396 guiprefs.ascii_file = ascii.file(does_exist);
3397 else
3398 guiprefs.ascii_file = {''};
3399 end
3400 else
3401 guiprefs.ascii_path = pwd;
3402 guiprefs.ascii_file = {''};
3403
3404 ascii.path = pwd;
3405 ascii.file = {''};
3406 setpref('VMT','ascii',ascii)
3407 end
3408
3409
3410 if ispref('VMT','mat')
3411 mat = getpref('VMT','mat');
3412 if exist(mat.path,'dir')
3413 guiprefs.mat_path = mat.path;
3414 else
3415 guiprefs.mat_path = pwd;
3416 end
3417
3418 if iscell(mat.file)
3419 if exist(fullfile(mat.path,mat.file{1}),'file')
3420 guiprefs.mat_file = mat.file;
3421 else
3422 guiprefs.mat_file = '';
3423 end
3424 else
3425 if exist(fullfile(mat.path,mat.file),'file')
3426 guiprefs.mat_file = mat.file;
3427 else
3428 guiprefs.mat_file = '';
3429 end
3430 end
3431 else
3432 guiprefs.mat_path = pwd;
3433 guiprefs.mat_file = '';
3434
3435 mat.path = pwd;
3436 mat.file = '';
3437 setpref('VMT','mat',mat)
3438 end
3439
3440
3441 if ispref('VMT','tecplot')
3442 tecplot = getpref('VMT','tecplot');
3443 if exist(tecplot.path,'dir')
3444 guiprefs.tecplot_path = tecplot.path;
3445 else
3446 guiprefs.tecplot_path = pwd;
3447 end
3448 if exist(fullfile(tecplot.path,tecplot.file),'file')
3449 guiprefs.tecplot_file = tecplot.file;
3450 else
3451 guiprefs.tecplot_file = '';
3452 end
3453 else
3454 guiprefs.tecplot_path = pwd;
3455 guiprefs.tecplot_file = '';
3456
3457 tecplot.path = pwd;
3458 tecplot.file = '';
3459 setpref('VMT','tecplot',tecplot)
3460 end
3461
3462
3463 if ispref('VMT','kmz')
3464 kmz = getpref('VMT','kmz');
3465 if exist(kmz.path,'dir')
3466 guiprefs.kmz_path = kmz.path;
3467 else
3468 guiprefs.kmz_path = pwd;
3469 end
3470 if exist(fullfile(kmz.path,kmz.file),'file')
3471 guiprefs.kmz_file = kmz.file;
3472 else
3473 guiprefs.kmz_file = '';
3474 end
3475 else
3476 guiprefs.kmz_path = pwd;
3477 guiprefs.kmz_file = '';
3478
3479 kmz.path = pwd;
3480 kmz.file = '';
3481 setpref('VMT','kmz',kmz)
3482 end
3483
3484
3485 if ispref('VMT','multibeambathymetry')
3486 multibeambathymetry = getpref('VMT','multibeambathymetry');
3487 if exist(multibeambathymetry.path,'dir')
3488 guiprefs.multibeambathymetry_path = multibeambathymetry.path;
3489 else
3490 guiprefs.multibeambathymetry_path = pwd;
3491 end
3492 if exist(fullfile(multibeambathymetry.path,multibeambathymetry.file),'file')
3493 guiprefs.multibeambathymetry_file = multibeambathymetry.file;
3494 else
3495 guiprefs.multibeambathymetry_file = '';
3496 end
3497 else
3498 guiprefs.multibeambathymetry_path = pwd;
3499 guiprefs.multibeambathymetry_file = '';
3500
3501 multibeambathymetry.path = pwd;
3502 multibeambathymetry.file = '';
3503 setpref('VMT','multibeambathymetry',multibeambathymetry)
3504 end
3505
3506
3507 if ispref('VMT','log')
3508 log = getpref('VMT','log');
3509 if exist(log.path,'dir')
3510 guiprefs.log_path = log.path;
3511 else
3512 guiprefs.log_path = pwd;
3513 end
3514 if exist(fullfile(log.path,log.file),'file')
3515 guiprefs.log_file = log.file;
3516 else
3517 guiprefs.log_file = '';
3518 end
3519 else
3520 guiprefs.log_path = pwd;
3521 guiprefs.log_file = '';
3522
3523 log.path = pwd;
3524 log.file = '';
3525 setpref('VMT','log',log)
3526 end
3527
3528
3529 if ispref('VMT','iric')
3530 iric = getpref('VMT','iric');
3531 if exist(iric.path,'dir')
3532 guiprefs.iric_path = iric.path;
3533 else
3534 guiprefs.iric_path = pwd;
3535 end
3536 if exist(fullfile(iric.path,iric.file),'file')
3537 guiprefs.iric_file = iric.file;
3538 else
3539 guiprefs.iric_file = '';
3540 end
3541 else
3542 guiprefs.iric_path = pwd;
3543 guiprefs.iric_file = '';
3544
3545 iric.path = pwd;
3546 iric.file = '';
3547 setpref('VMT','iric',iric)
3548 end
3549
3550
3551 if ispref('VMT','excel')
3552 excel = getpref('VMT','excel');
3553 if exist(excel.path,'dir')
3554 guiprefs.excel_path = excel.path;
3555 else
3556 guiprefs.excel_path = pwd;
3557 end
3558 if exist(fullfile(excel.path,excel.file),'file')
3559 guiprefs.excel_file = excel.file;
3560 else
3561 guiprefs.excel_file = '';
3562 end
3563 else
3564 guiprefs.excel_path = pwd;
3565 guiprefs.excel_file = '';
3566
3567 excel.path = pwd;
3568 excel.file = '';
3569 setpref('VMT','excel',excel)
3570 end
3571
3572
3573 if ispref('VMT','aerial')
3574 aerial = getpref('VMT','aerial');
3575 if exist(aerial.path,'dir')
3576 guiprefs.aerial_path = aerial.path;
3577 else
3578 guiprefs.aerial_path = pwd;
3579 end
3580 does_exist = false(1,length(aerial.file));
3581 if iscell(aerial.file)
3582 for k = 1:numel(aerial.file)
3583 does_exist(k) = exist(fullfile(aerial.path,aerial.file{k}),'file');
3584 end
3585 else
3586 does_exist = exist(fullfile(aerial.path,aerial.file),'file');
3587 end
3588 if any(does_exist)
3589 guiprefs.aerial_file = aerial.file;
3590 else
3591 guiprefs.aerial_file = {''};
3592 end
3593 else
3594 guiprefs.aerial_path = pwd;
3595 guiprefs.aerial_file = {''};
3596
3597 aerial.path = pwd;
3598 aerial.file = {''};
3599 setpref('VMT','aerial',aerial)
3600 end
3601
3602
3603 if ispref('VMT','shoreline')
3604 shoreline = getpref('VMT','shoreline');
3605 if exist(shoreline.path,'dir')
3606 guiprefs.shoreline_path = shoreline.path;
3607 else
3608 guiprefs.shoreline_path = pwd;
3609 end
3610
3611 if iscell(shoreline.file)
3612 if exist(fullfile(shoreline.path,shoreline.file{1}),'file')
3613 guiprefs.shoreline_file = shoreline.file;
3614 else
3615 guiprefs.shoreline_file = '';
3616 end
3617 else
3618 if exist(fullfile(shoreline.path,shoreline.file),'file')
3619 guiprefs.shoreline_file = shoreline.file;
3620 else
3621 guiprefs.shoreline_file = '';
3622 end
3623 end
3624 else
3625 guiprefs.shoreline_path = pwd;
3626 guiprefs.shoreline_file = '';
3627
3628 shoreline.path = pwd;
3629 shoreline.file = '';
3630 setpref('VMT','shoreline',shoreline)
3631 end
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649 if ispref('VMT','renderer')
3650 renderer = getpref('VMT','renderer');
3651 guiprefs.renderer = renderer;
3652 else
3653 renderer = 'OpenGL';
3654 guiprefs.renderer = renderer;
3655 setpref('VMT','renderer',renderer)
3656 end
3657
3658
3659 if ispref('VMT','units')
3660 units = getpref('VMT','units');
3661 guiprefs.units = units;
3662 else
3663 units = 'metric';
3664 guiprefs.units = renderer;
3665 setpref('VMT','units',units)
3666 end
3667
3668
3669 if ispref('VMT','runcounter')
3670 runcounter = getpref('VMT','runcounter')+1;
3671 guiprefs.runcounter = runcounter;
3672 else
3673 runcounter = 1;
3674 guiprefs.runcounter = runcounter;
3675 setpref('VMT','runcounter',runcounter)
3676 end
3677 setappdata(hfigure,'guiprefs',guiprefs)
3678
3679
3680
3681
3682
3683 function store_prefs(hfigure,pref)
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703 guiprefs = getappdata(hfigure,'guiprefs');
3704
3705 switch pref
3706 case 'ascii'
3707 ascii.path = guiprefs.ascii_path;
3708 ascii.file = guiprefs.ascii_file;
3709 setpref('VMT','ascii',ascii)
3710 case 'mat'
3711 mat.path = guiprefs.mat_path;
3712 mat.file = guiprefs.mat_file;
3713 setpref('VMT','mat',mat)
3714 case 'tecplot'
3715 tecplot.path = guiprefs.tecplot_path;
3716 tecplot.file = guiprefs.tecplot_file;
3717 setpref('VMT','tecplot',tecplot)
3718 case 'kmz'
3719 kmz.path = guiprefs.kmz_path;
3720 kmz.file = guiprefs.kmz_file;
3721 setpref('VMT','kmz',kmz)
3722 case 'multibeambathymetry'
3723 multibeambathymetry.path = guiprefs.multibeambathymetry_path;
3724 multibeambathymetry.file = guiprefs.multibeambathymetry_file;
3725 setpref('VMT','multibeambathymetry',multibeambathymetry)
3726 case 'log'
3727 log.path = guiprefs.log_path;
3728 log.file = guiprefs.log_file;
3729 setpref('VMT','log',log)
3730 case 'iric'
3731 iric.path = guiprefs.iric_path;
3732 iric.file = guiprefs.iric_file;
3733 setpref('VMT','iric',iric)
3734 case 'excel'
3735 excel.path = guiprefs.excel_path;
3736 excel.file = guiprefs.excel_file;
3737 setpref('VMT','excel',excel)
3738 case 'aerial'
3739 aerial.path = guiprefs.aerial_path;
3740 aerial.file = guiprefs.aerial_file;
3741 setpref('VMT','aerial',aerial)
3742 case 'shoreline'
3743 shoreline.path = guiprefs.shoreline_path;
3744 shoreline.file = guiprefs.shoreline_file;
3745 setpref('VMT','shoreline',shoreline)
3746 case 'renderer'
3747 renderer = guiprefs.renderer;
3748 setpref('VMT','renderer',renderer)
3749 case 'units'
3750 units = guiprefs.units;
3751 setpref('VMT','units',units)
3752 case 'runcounter'
3753 runcounter = guiprefs.runcounter;
3754 setpref('VMT','runcounter',runcounter)
3755 otherwise
3756 end
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770 function initGUI(handles)
3771
3772
3773 guiparams = getappdata(handles.figure1,'guiparams');
3774
3775
3776 set(handles.figure1,'Name',['Velocity Mapping Toolbox (VMT) ' guiparams.vmt_version], ...
3777 'DockControls','off')
3778
3779
3780
3781 axes(handles.Plot1Shiptracks);
3782 set(handles.Plot1Shiptracks,'DataAspectRatio',[1 1 1],'PlotBoxAspectRatio',[1 1 1])
3783 xlabel('UTM Easting (m)')
3784 ylabel('UTM Northing (m)')
3785 box on
3786 grid on
3787
3788
3789
3790
3791
3792 if guiparams.english_units
3793 set(handles.menuMetric, 'Checked','off')
3794 set(handles.menuEnglish,'Checked','on')
3795 else
3796 set(handles.menuMetric, 'Checked','on')
3797 set(handles.menuEnglish,'Checked','off')
3798 end
3799
3800 if guiparams.set_cross_section_endpoints
3801 set(handles.menuCrossSectionEndpointAutomatic,'Checked','off')
3802 set(handles.menuCrossSectionEndpointManual, 'Checked','on')
3803 else
3804 set(handles.menuCrossSectionEndpointAutomatic,'Checked','on')
3805 set(handles.menuCrossSectionEndpointManual, 'Checked','off')
3806 end
3807
3808
3809 if guiparams.print
3810 set(handles.menuPrintFormat, 'Checked','on')
3811 set(handles.menuPresentationFormat,'Checked','off')
3812 set(handles.menuStylePrint, 'Checked','on')
3813 set(handles.menuStylePresentation, 'Checked','off')
3814 elseif guiparams.presentation
3815 set(handles.menuPrintFormat, 'Checked','off')
3816 set(handles.menuPresentationFormat,'Checked','on')
3817 set(handles.menuStylePrint, 'Checked','off')
3818 set(handles.menuStylePresentation, 'Checked','on')
3819 else
3820 end
3821
3822 switch guiparams.renderer
3823 case 'OpenGL'
3824 set(handles.menuOpenGL, 'Checked','on')
3825 set(handles.menuPainters, 'Checked','off')
3826 set(handles.menuZbuffer, 'Checked','off')
3827 case 'painters'
3828 set(handles.menuOpenGL, 'Checked','off')
3829 set(handles.menuPainters, 'Checked','on')
3830 set(handles.menuZbuffer, 'Checked','off')
3831 case 'zbuffer'
3832 set(handles.menuOpenGL, 'Checked','off')
3833 set(handles.menuPainters, 'Checked','off')
3834 set(handles.menuZbuffer, 'Checked','on')
3835 end
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851 set(handles.DepthRangeMin, 'String',guiparams.depth_range_min)
3852 set(handles.DepthRangeMax, 'String',guiparams.depth_range_max)
3853 set(handles.VectorScalePlanView, 'String',guiparams.vector_scale_plan_view)
3854 set(handles.VectorSpacingPlanview, 'String',guiparams.vector_spacing_plan_view)
3855 set(handles.SmoothingWindowSize, 'String',guiparams.smoothing_window_size)
3856 set(handles.DisplayShoreline, 'Value', guiparams.display_shoreline)
3857 set(handles.AddBackground, 'Value', guiparams.add_background)
3858
3859
3860
3861
3862
3863 set(handles.HorizontalGridNodeSpacing, 'String',guiparams.horizontal_grid_node_spacing)
3864 set(handles.VerticalGridNodeSpacing, 'String',guiparams.vertical_grid_node_spacing)
3865
3866
3867
3868
3869
3870
3871 set(handles.Contour, 'String',{guiparams.contours.string}, ...
3872 'Value', guiparams.idx_contour)
3873 set(handles.VerticalExaggeration, 'String',guiparams.vertical_exaggeration)
3874 set(handles.VectorScaleCrossSection, 'String',guiparams.vector_scale_cross_section)
3875 set(handles.HorizontalVectorSpacing, 'String',guiparams.horizontal_vector_spacing)
3876 set(handles.VerticalVectorSpacing, 'String',guiparams.vertical_vector_spacing)
3877 set(handles.HorizontalSmoothingWindow, 'String',guiparams.horizontal_smoothing_window)
3878 set(handles.VerticalSmoothingWindow, 'String',guiparams.vertical_smoothing_window)
3879 set(handles.PlotSecondaryFlowVectors, 'Value', guiparams.plot_secondary_flow_vectors)
3880 set(handles.SecondaryFlowVectorVariable,'String',{guiparams.secondary_flows.string}, ...
3881 'Value', guiparams.idx_secondary_flow_vector_variable)
3882 set(handles.IncludeVerticalVelocity, 'Value', guiparams.include_vertical_velocity)
3883
3884
3885
3886
3887
3888
3889
3890 function set_enable(handles,enable_state)
3891
3892 guiparams = getappdata(handles.figure1,'guiparams');
3893
3894 switch enable_state
3895 case 'init'
3896 guiparams.gui_state = 'init';
3897 set([handles.menuFile
3898 handles.menuOpen
3899 handles.menuOpenASCII
3900 handles.menuOpenMAT
3901 ],'Enable','on')
3902
3903 set([handles.toolbarLoadData
3904 ],'Enable','on')
3905 set([handles.toolbarSaveMatFile
3906 handles.toolbarSaveBathymetry
3907 handles.toolbarSaveFigures
3908 handles.toolbarSaveExcel
3909 handles.toolbarPlottingParameters
3910 handles.toolbarProcessingParameters
3911 ],'Enable','off')
3912
3913 set([handles.DepthRangeMin
3914 handles.DepthRangeMax
3915 handles.VectorScalePlanView
3916 handles.VectorSpacingPlanview
3917 handles.SmoothingWindowSize
3918 handles.DisplayShoreline
3919 handles.AddBackground
3920 handles.PlotPlanView
3921 ],'Enable','off')
3922
3923 set([handles.HorizontalGridNodeSpacing
3924 handles.VerticalGridNodeSpacing
3925 handles.PlotShiptracks
3926 ],'Enable','off')
3927
3928 set([handles.Contour
3929 handles.VerticalExaggeration
3930 handles.VectorScaleCrossSection
3931 handles.HorizontalVectorSpacing
3932 handles.VerticalVectorSpacing
3933 handles.HorizontalSmoothingWindow
3934 handles.VerticalSmoothingWindow
3935 handles.PlotSecondaryFlowVectors
3936 handles.SecondaryFlowVectorVariable
3937 handles.IncludeVerticalVelocity
3938 handles.PlotCrossSection
3939 ],'Enable','off')
3940
3941 case 'fileloaded'
3942 guiparams.gui_state = 'fileloaded';
3943 set([handles.menuFile
3944 handles.menuOpen
3945 handles.menuOpenASCII
3946 handles.menuOpenMAT
3947 handles.menuSaveMAT
3948 handles.menuSaveTecplot
3949 handles.menuSaveKMZFile
3950 handles.menuParameters
3951 handles.menuPlottingParameters
3952 handles.menuMetric
3953 handles.menuEnglish
3954 handles.menuBathymetryExportSettings
3955 handles.menuExportMultibeamBathymetry
3956 handles.menuKMZVerticalOffset
3957 ],'Enable','on')
3958
3959 set([handles.toolbarLoadData
3960 handles.toolbarSaveMatFile
3961 handles.toolbarSaveBathymetry
3962 handles.toolbarSaveExcel
3963 handles.toolbarSaveFigures
3964 handles.toolbarPlottingParameters
3965 ],'Enable','on')
3966 set([handles.toolbarProcessingParameters
3967 ],'Enable','off')
3968
3969
3970 set([handles.DepthRangeMin
3971 handles.DepthRangeMax
3972 handles.VectorScalePlanView
3973 handles.VectorSpacingPlanview
3974 handles.SmoothingWindowSize
3975 handles.DisplayShoreline
3976 handles.PlotPlanView
3977 ],'Enable','on')
3978 if guiparams.has_mapping_toolbox
3979 set(handles.AddBackground,'Enable','on')
3980 else
3981 set(handles.AddBackground,'Enable','off')
3982 end
3983
3984 set([handles.HorizontalGridNodeSpacing
3985 handles.VerticalGridNodeSpacing
3986 handles.PlotShiptracks
3987 ],'Enable','on')
3988
3989 set([handles.Contour
3990 handles.VerticalExaggeration
3991 handles.VectorScaleCrossSection
3992 handles.HorizontalVectorSpacing
3993 handles.VerticalVectorSpacing
3994 handles.HorizontalSmoothingWindow
3995 handles.VerticalSmoothingWindow
3996 handles.PlotSecondaryFlowVectors
3997 handles.SecondaryFlowVectorVariable
3998 handles.IncludeVerticalVelocity
3999 handles.PlotCrossSection
4000 ],'Enable','on')
4001 case 'multiplematfiles'
4002 guiparams.gui_state = 'multiplematfiles';
4003 set([handles.menuFile
4004 handles.menuOpen
4005 handles.menuOpenASCII
4006 handles.menuOpenMAT
4007 handles.menuParameters
4008 handles.menuPlottingParameters
4009 handles.menuMetric
4010 handles.menuEnglish
4011 ],'Enable','on')
4012 set([handles.menuSaveMAT
4013 handles.menuBathymetryExportSettings
4014 handles.menuExportMultibeamBathymetry
4015 handles.menuKMZVerticalOffset
4016 handles.menuSaveKMZFile
4017 handles.menuSaveTecplot
4018 ],'Enable','off')
4019
4020 set([handles.toolbarLoadData
4021 handles.toolbarSaveFigures
4022 handles.toolbarPlottingParameters
4023 handles.toolbarSaveExcel
4024 ],'Enable','on')
4025 set([handles.toolbarProcessingParameters
4026 handles.toolbarSaveMatFile
4027 handles.toolbarSaveBathymetry
4028 ],'Enable','off')
4029
4030 set([handles.DepthRangeMin
4031 handles.DepthRangeMax
4032 handles.VectorScalePlanView
4033 handles.VectorSpacingPlanview
4034 handles.SmoothingWindowSize
4035 handles.DisplayShoreline
4036 handles.PlotPlanView
4037 ],'Enable','on')
4038 if guiparams.has_mapping_toolbox
4039 set(handles.AddBackground,'Enable','on')
4040 else
4041 set(handles.AddBackground,'Enable','off')
4042 end
4043
4044 set([handles.HorizontalGridNodeSpacing
4045 handles.VerticalGridNodeSpacing
4046 handles.PlotShiptracks
4047 ],'Enable','off')
4048
4049 set([handles.Contour
4050 handles.VerticalExaggeration
4051 handles.VectorScaleCrossSection
4052 handles.HorizontalVectorSpacing
4053 handles.VerticalVectorSpacing
4054 handles.HorizontalSmoothingWindow
4055 handles.VerticalSmoothingWindow
4056 handles.PlotSecondaryFlowVectors
4057 handles.SecondaryFlowVectorVariable
4058 handles.IncludeVerticalVelocity
4059 handles.PlotCrossSection
4060 ],'Enable','off')
4061 otherwise
4062 end
4063
4064
4065 setappdata(handles.figure1,'guiparams',guiparams)
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081 function [english_units,set_cross_section_endpoints,plot_presentation_style,plot_print_style] = ...
4082 plotParametersDialog(english_units,set_cross_section_endpoints,plot_presentation_style,plot_print_style,hf)
4083
4084 w = 500;
4085 h = 110;
4086 dx = 10;
4087 dy = 35;
4088 the_color = get(0,'factoryUipanelBackgroundColor');
4089 handles.Figure = figure('Name', 'Plotting Parameters', ...
4090 'Color',the_color, ...
4091 'NumberTitle','off', ...
4092 'HandleVisibility','callback', ...
4093 'WindowStyle','modal', ...
4094 'MenuBar','none', ...
4095 'ToolBar','none', ...
4096 'Units','pixels', ...
4097 'Position',[0 0 w h], ...
4098 'Resize','off', ...
4099 'Visible','off');
4100 dialog_params.english_units = english_units;
4101 dialog_params.set_cross_section_endpoints = set_cross_section_endpoints;
4102 dialog_params.presentation = plot_presentation_style;
4103 dialog_params.print = plot_print_style;
4104 setappdata(handles.Figure,'dialog_params',dialog_params)
4105 setappdata(handles.Figure,'original_dialog_params',dialog_params)
4106
4107
4108
4109 handles.UnitsPanel = uipanel('Parent',handles.Figure, ...
4110 'Title', 'Units', ...
4111 'Units','pixels', ...
4112 'Position',[dx dy (w-3*dx)/3 h-dx-dy+10]);
4113 handles.UnitsMetric = uicontrol('Style','checkbox', ...
4114 'Parent',handles.UnitsPanel, ...
4115 'String','Metric', ...
4116 'Units','pixels', ...
4117 'Position',[15 35 100 22]);
4118 handles.UnitsEnglish = uicontrol('Style','checkbox', ...
4119 'Parent',handles.UnitsPanel, ...
4120 'String','English', ...
4121 'Units','pixels', ...
4122 'Position',[15 10 100 22]);
4123
4124 handles.EndpointsPanel = uipanel('Parent',handles.Figure, ...
4125 'Title', 'Cross-Section Endpoints', ...
4126 'Units','pixels', ...
4127 'Position',[(w+dx)/3 dy (w-3*dx)/3 h-dx-dy+10]);
4128 handles.EndpointsAutomatic = uicontrol('Style','checkbox', ...
4129 'Parent',handles.EndpointsPanel, ...
4130 'String','Automatic', ...
4131 'Units','pixels', ...
4132 'Position',[15 35 100 22]);
4133 handles.EndpointsManual = uicontrol('Style','checkbox', ...
4134 'Parent',handles.EndpointsPanel, ...
4135 'String','Set Manually', ...
4136 'Units','pixels', ...
4137 'Position',[15 10 100 22]);
4138
4139 handles.StylePanel = uipanel('Parent',handles.Figure, ...
4140 'Title', 'Plot Style', ...
4141 'Units','pixels', ...
4142 'Position',[w-w/3 dy (w-3*dx)/3 h-dx-dy+10]);
4143 handles.StylePresentation = uicontrol('Style','checkbox', ...
4144 'Parent',handles.StylePanel, ...
4145 'String','Presentation', ...
4146 'Units','pixels', ...
4147 'Position',[15 35 100 22]);
4148 handles.StylePrint = uicontrol('Style','checkbox', ...
4149 'Parent',handles.StylePanel, ...
4150 'String','Print', ...
4151 'Units','pixels', ...
4152 'Position',[15 10 100 22]);
4153
4154 handles.OK = uicontrol('Style', 'pushbutton', ...
4155 'Parent', handles.Figure, ...
4156 'String', 'OK', ...
4157 'Units', 'pixels', ...
4158 'Position',[w/2-80-dx/4 6 80 22]);
4159 handles.Cancel = uicontrol('Style', 'pushbutton', ...
4160 'Parent', handles.Figure, ...
4161 'String', 'Cancel', ...
4162 'Units', 'pixels', ...
4163 'Position',[w/2+dx/4 6 80 22]);
4164
4165
4166
4167 if dialog_params.english_units
4168 set(handles.UnitsMetric, 'Value',0)
4169 set(handles.UnitsEnglish,'Value',1)
4170 else
4171 set(handles.UnitsMetric, 'Value',1)
4172 set(handles.UnitsEnglish,'Value',0)
4173 end
4174 if dialog_params.set_cross_section_endpoints
4175 set(handles.EndpointsAutomatic,'Value',0)
4176 set(handles.EndpointsManual, 'Value',1)
4177 else
4178 set(handles.EndpointsAutomatic,'Value',1)
4179 set(handles.EndpointsManual, 'Value',0)
4180 end
4181 if dialog_params.presentation
4182 set(handles.StylePresentation, 'Value',1)
4183 set(handles.StylePrint, 'Value',0)
4184 else
4185 set(handles.StylePresentation, 'Value',0)
4186 set(handles.StylePrint, 'Value',1)
4187 end
4188
4189
4190
4191 set(handles.Figure, 'CloseRequestFcn',{@dialogCloseReq, handles.OK})
4192 set(handles.UnitsMetric, 'Callback', {@dialogUnits, handles,'metric'})
4193 set(handles.UnitsEnglish, 'Callback', {@dialogUnits, handles,'english'})
4194 set(handles.EndpointsAutomatic,'Callback', {@dialogEnpoints, handles,'auto'})
4195 set(handles.EndpointsManual, 'Callback', {@dialogEnpoints, handles,'manual'})
4196 set(handles.StylePresentation, 'Callback', {@dialogPlotStyle,handles,'presentation'})
4197 set(handles.StylePrint, 'Callback', {@dialogPlotStyle,handles,'print'})
4198 set(handles.OK, 'Callback', {@dialogOK, handles.OK})
4199 set(handles.Cancel, 'Callback', {@dialogCancel, handles})
4200
4201
4202
4203 fpos = get(hf,'Position');
4204 dpos = [(fpos(1) + fpos(3)/2 -w/2) (fpos(2) + fpos(4)/2)];
4205 movegui(handles.Figure,dpos)
4206 set(handles.Figure,'Visible','on')
4207
4208
4209
4210 waitfor(handles.OK)
4211
4212
4213
4214 dialog_params = getappdata(handles.Figure,'dialog_params');
4215 english_units = dialog_params.english_units;
4216 set_cross_section_endpoints = dialog_params.set_cross_section_endpoints;
4217 plot_presentation_style = dialog_params.presentation;
4218 plot_print_style = dialog_params.print;
4219
4220 delete(handles.Figure)
4221
4222
4223
4224
4225
4226 function dialogUnits(hObject,eventdata,handles,the_units)
4227
4228 dialog_params = getappdata(handles.Figure,'dialog_params');
4229 switch the_units
4230 case 'metric'
4231 dialog_params.english_units = false;
4232
4233 set(handles.UnitsMetric, 'Value',1)
4234 set(handles.UnitsEnglish,'Value',0)
4235 case 'english'
4236 dialog_params.english_units = true;
4237
4238 set(handles.UnitsMetric, 'Value',0)
4239 set(handles.UnitsEnglish,'Value',1)
4240 otherwise
4241 end
4242 setappdata(handles.Figure,'dialog_params',dialog_params)
4243
4244
4245
4246
4247 function dialogEnpoints(hObject,eventdata,handles,the_endpoints)
4248
4249 dialog_params = getappdata(handles.Figure,'dialog_params');
4250 switch the_endpoints
4251 case 'auto'
4252 dialog_params.set_cross_section_endpoints = false;
4253
4254 set(handles.EndpointsAutomatic,'Value',1)
4255 set(handles.EndpointsManual, 'Value',0)
4256 case 'manual'
4257 dialog_params.set_cross_section_endpoints = true;
4258
4259 set(handles.EndpointsAutomatic,'Value',0)
4260 set(handles.EndpointsManual, 'Value',1)
4261 otherwise
4262 end
4263 setappdata(handles.Figure,'dialog_params',dialog_params)
4264
4265
4266
4267 function dialogPlotStyle(hObject,eventdata,handles,the_style)
4268
4269 dialog_params = getappdata(handles.Figure,'dialog_params');
4270 switch the_style
4271 case 'presentation'
4272 dialog_params.presentation = true;
4273 dialog_params.print = false;
4274
4275 set(handles.StylePresentation,'Value',1)
4276 set(handles.StylePrint, 'Value',0)
4277 case 'print'
4278 dialog_params.presentation = false;
4279 dialog_params.print = true;
4280
4281 set(handles.StylePresentation,'Value',0)
4282 set(handles.StylePrint, 'Value',1)
4283 otherwise
4284 end
4285 setappdata(handles.Figure,'dialog_params',dialog_params)
4286
4287
4288
4289
4290 function dialogOK(hObject,eventdata,h_OK)
4291
4292 delete(h_OK)
4293
4294
4295
4296
4297 function dialogCancel(hObject,eventdata,handles)
4298
4299 dialog_params = getappdata(handles.Figure,'original_dialog_params');
4300 setappdata(handles.Figure,'dialog_params',dialog_params)
4301 delete(handles.OK)
4302
4303
4304
4305
4306 function dialogCloseReq(hObject,eventdata,h_OK)
4307
4308 delete(h_OK)
4309
4310
4311
4312 function [beam_angle,magnetic_variation,wse,output_auxiliary_data] = exportSettingsDialog(beam_angle,magnetic_variation,wse,output_auxiliary_data,hf)
4313 w = 230;
4314 h = 200;
4315 dx = 10;
4316 dy = 35;
4317 the_color = get(0,'factoryUipanelBackgroundColor');
4318 handles.Figure = figure('Name', 'Export Settings', ...
4319 'Color',the_color, ...
4320 'NumberTitle','off', ...
4321 'HandleVisibility','callback', ...
4322 'WindowStyle','modal', ...
4323 'MenuBar','none', ...
4324 'ToolBar','none', ...
4325 'Units','pixels', ...
4326 'Position',[0 0 w h], ...
4327 'Resize','off', ...
4328 'Visible','off');
4329 dialog_params.beam_angle = beam_angle;
4330 dialog_params.magnetic_variation = magnetic_variation;
4331 dialog_params.wse = wse;
4332 dialog_params.output_auxiliary_data = output_auxiliary_data;
4333 setappdata(handles.Figure,'dialog_params',dialog_params)
4334 setappdata(handles.Figure,'original_dialog_params',dialog_params)
4335
4336
4337
4338 ph = 150;
4339 handles.BathymetryPanel = uipanel('Parent',handles.Figure, ...
4340 'Title', 'Bathymetry', ...
4341 'Units','pixels', ...
4342 'Position',[dx dy (w-2*dx) h-dx-dy+10]);
4343 handles.BeamAngleText = uicontrol('Style','text', ...
4344 'Parent',handles.BathymetryPanel, ...
4345 'String','Beam Angle (deg)', ...
4346 ...
4347 'HorizontalAlignment','right',...
4348 'Units','pixels', ...
4349 'Position',[dx+5 h-ph+60-4 100 22]);
4350 handles.BeamAngle = uicontrol('Style','edit', ...
4351 'Parent',handles.BathymetryPanel, ...
4352 ...
4353 'String',beam_angle,...
4354 'BackgroundColor','w',...
4355 'Units','pixels', ...
4356 'Position',[w-dx-80 h-ph+60 50 22]);
4357 handles.MagneticVariationText = uicontrol('Style','text', ...
4358 'Parent',handles.BathymetryPanel, ...
4359 'String','Magnetic Variation', ...
4360 ...
4361 'HorizontalAlignment','right',...
4362 'Units','pixels', ...
4363 'Position',[dx+5 h-ph+30-4 100 22]);
4364 handles.MagneticVariation = uicontrol('Style','edit', ...
4365 'Parent',handles.BathymetryPanel, ...
4366 ...
4367 'String',magnetic_variation,...
4368 'BackgroundColor','w',...
4369 'Units','pixels', ...
4370 'Position',[w-dx-80 h-ph+30 50 22]);
4371 handles.WSEText = uicontrol('Style','text', ...
4372 'Parent',handles.BathymetryPanel, ...
4373 'String','WSE (m)', ...
4374 ...
4375 'HorizontalAlignment','right',...
4376 'Units','pixels', ...
4377 'Position',[dx+5 h-ph-4 100 22]);
4378 handles.WSE = uicontrol('Style','edit', ...
4379 'Parent',handles.BathymetryPanel, ...
4380 ...
4381 'String',num2str(wse),...
4382 'BackgroundColor','w',...
4383 'Units','pixels', ...
4384 'Position',[w-dx-80 h-ph 50 22]);
4385 handles.OutputauxiliaryData = uicontrol('Style','checkbox', ...
4386 'Parent',handles.BathymetryPanel, ...
4387 'String','Output auxiliary Data', ...
4388 'Units','pixels', ...
4389 'Position',[dx+5 20 w-2*dx-30 22]);
4390 handles.OK = uicontrol('Style', 'pushbutton', ...
4391 'Parent', handles.Figure, ...
4392 'String', 'OK', ...
4393 'Units', 'pixels', ...
4394 'Position',[w/2-80-dx/4 6 80 22]);
4395 handles.Cancel = uicontrol('Style', 'pushbutton', ...
4396 'Parent', handles.Figure, ...
4397 'String', 'Cancel', ...
4398 'Units', 'pixels', ...
4399 'Position',[w/2+dx/4 6 80 22]);
4400
4401
4402
4403 set(handles.BeamAngle, 'String',dialog_params.beam_angle)
4404 set(handles.MagneticVariation, 'String',dialog_params.magnetic_variation)
4405 set(handles.WSE, 'String',dialog_params.wse)
4406 set(handles.OutputauxiliaryData, 'Value', double(dialog_params.output_auxiliary_data))
4407
4408
4409
4410 set(handles.Figure, 'CloseRequestFcn',{@dialogCloseReq,handles.OK})
4411 set(handles.BeamAngle, 'Callback', {@dialogExportSettings,handles})
4412 set(handles.MagneticVariation, 'Callback', {@dialogExportSettings,handles})
4413 set(handles.WSE, 'Callback', {@dialogExportSettings,handles})
4414 set(handles.OutputauxiliaryData, 'Callback', {@dialogExportSettings,handles})
4415 set(handles.OK, 'Callback', {@dialogOK, handles.OK})
4416 set(handles.Cancel, 'Callback', {@dialogCancel, handles})
4417
4418
4419
4420 fpos = get(hf,'Position');
4421 dpos = [(fpos(1) + fpos(3)/2 -w/2) (fpos(2) + fpos(4)/2)];
4422 movegui(handles.Figure,dpos)
4423 set(handles.Figure,'Visible','on')
4424
4425
4426
4427 waitfor(handles.OK)
4428
4429
4430
4431 dialog_params = getappdata(handles.Figure,'dialog_params');
4432 beam_angle = dialog_params.beam_angle;
4433 magnetic_variation = dialog_params.magnetic_variation;
4434 wse = str2double(dialog_params.wse);
4435 output_auxiliary_data = logical(dialog_params.output_auxiliary_data);
4436
4437 delete(handles.Figure)
4438
4439
4440
4441
4442 function dialogExportSettings(hObject,eventdata,handles)
4443
4444
4445 dialog_params = getappdata(handles.Figure,'dialog_params');
4446
4447
4448 dialog_params.beam_angle = get(handles.BeamAngle,'String');
4449 dialog_params.magnetic_variation = get(handles.MagneticVariation,'String');
4450 dialog_params.wse = get(handles.WSE,'String');
4451 dialog_params.output_auxiliary_data = get(handles.OutputauxiliaryData,'Value');
4452
4453
4454 setappdata(handles.Figure,'dialog_params',dialog_params)
4455
4456
4457
4458 function [selected_figures] = openFiguresDialog(figure_names,hf)
4459
4460 w = 230;
4461 h = 200;
4462 dx = 10;
4463 dy = 35;
4464 the_color = get(0,'factoryUipanelBackgroundColor');
4465 handles.Figure = figure('Name', 'Select open figures to export', ...
4466 'Color',the_color, ...
4467 'NumberTitle','off', ...
4468 'HandleVisibility','callback', ...
4469 'WindowStyle','modal', ...
4470 'MenuBar','none', ...
4471 'ToolBar','none', ...
4472 'Units','pixels', ...
4473 'Position',[0 0 w h], ...
4474 'Resize','off', ...
4475 'Visible','off');
4476 dialog_params.figure_names = figure_names;
4477 dialog_params.selected_figures = '';
4478 setappdata(handles.Figure,'dialog_params',dialog_params)
4479 setappdata(handles.Figure,'original_dialog_params',dialog_params)
4480
4481
4482
4483 handles.ListboxPanel = uipanel('Parent',handles.Figure, ...
4484 'Title', 'Figures', ...
4485 'Units','pixels', ...
4486 'Position',[dx dy (w-2*dx) h-dx-dy+10]);
4487 handles.Figures = uicontrol('Style','listbox', ...
4488 'Parent',handles.ListboxPanel, ...
4489 'BackGroundColor','white',...
4490 'String',figure_names, ...
4491 'Min', 0,...
4492 'Max', 2,...
4493 'Units','pixels', ...
4494 'Position',[15 35 (w-5*dx) 100]);
4495
4496
4497 handles.OK = uicontrol('Style', 'pushbutton', ...
4498 'Parent', handles.Figure, ...
4499 'String', 'OK', ...
4500 'Units', 'pixels', ...
4501 'Position',[w/2-80-dx/4 6 80 22]);
4502 handles.Cancel = uicontrol('Style', 'pushbutton', ...
4503 'Parent', handles.Figure, ...
4504 'String', 'Cancel', ...
4505 'Units', 'pixels', ...
4506 'Position',[w/2+dx/4 6 80 22]);
4507
4508
4509
4510
4511
4512
4513
4514 set(handles.Figure, 'CloseRequestFcn',{@dialogCloseReq,handles.OK})
4515 set(handles.Figures, 'Callback', {@dialogSelectFigures handles})
4516 set(handles.OK, 'Callback', {@dialogOK, handles.OK})
4517 set(handles.Cancel, 'Callback', {@dialogCancel, handles})
4518
4519
4520
4521 fpos = get(hf,'Position');
4522 dpos = [(fpos(1) + fpos(3)/2 -w/2) (fpos(2) + fpos(4)/2)];
4523 movegui(handles.Figure,dpos)
4524 set(handles.Figure,'Visible','on')
4525
4526
4527
4528 waitfor(handles.OK)
4529
4530
4531
4532 dialog_params = getappdata(handles.Figure,'dialog_params');
4533 selected_figures = dialog_params.selected_figures;
4534
4535 delete(handles.Figure)
4536
4537
4538
4539
4540 function dialogSelectFigures(hObject,eventdata,handles)
4541
4542 dialog_params = getappdata(handles.Figure,'dialog_params');
4543
4544 idx_selected = get(handles.Figures,'Value');
4545 fig_names = get(handles.Figures,'String');
4546 selected = fig_names(idx_selected);
4547 dialog_params.selected_figures = selected;
4548
4549 setappdata(handles.Figure,'dialog_params',dialog_params)
4550
4551
4552
4553
4554 function icons = getIcons
4555
4556
4557 idx = 1;
4558 icons(idx).data(:,:,1) = ...
4559 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4560 NaN NaN NaN NaN NaN NaN NaN NaN NaN 129 120 135 188 NaN NaN NaN
4561 NaN NaN NaN NaN NaN NaN NaN NaN 96 189 NaN NaN 130 NaN 95 NaN
4562 NaN NaN 206 206 206 206 NaN NaN NaN NaN NaN NaN NaN 84 79 NaN
4563 NaN 206 255 255 255 255 198 197 NaN NaN NaN NaN 83 79 76 NaN
4564 198 255 255 255 255 255 255 198 198 198 198 198 198 212 212 NaN
4565 198 255 255 255 255 255 255 255 255 255 255 255 198 157 197 NaN
4566 198 255 226 198 198 198 198 198 198 198 198 198 198 198 177 NaN
4567 198 255 198 218 255 255 255 255 255 255 255 255 255 255 161 NaN
4568 198 253 198 247 255 255 255 255 255 255 255 255 255 251 155 NaN
4569 198 226 201 255 255 255 255 255 255 255 255 255 231 206 165 NaN
4570 198 207 215 255 255 255 255 255 255 255 255 255 239 198 159 NaN
4571 198 198 240 255 255 255 255 255 255 255 255 255 222 157 159 NaN
4572 198 199 255 255 255 255 255 255 255 255 255 255 191 165 159 NaN
4573 NaN 165 165 165 165 165 165 165 165 165 165 165 165 159 159 NaN
4574 NaN NaN 159 159 159 159 159 159 159 159 159 159 159 159 NaN NaN]/255;
4575
4576 icons(idx).data(:,:,2) = ...
4577 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4578 NaN NaN NaN NaN NaN NaN NaN NaN NaN 145 137 149 195 NaN NaN NaN
4579 NaN NaN NaN NaN NaN NaN NaN NaN 116 196 NaN NaN 145 NaN 116 NaN
4580 NaN NaN 162 162 162 162 NaN NaN NaN NaN NaN NaN NaN 107 105 NaN
4581 NaN 162 255 255 255 255 154 197 NaN NaN NaN NaN 106 104 103 NaN
4582 154 255 255 255 255 255 255 154 154 154 154 154 154 208 208 NaN
4583 154 243 243 243 243 243 243 255 255 255 255 255 154 123 197 NaN
4584 154 235 193 154 154 154 154 154 154 154 154 154 154 154 137 NaN
4585 154 215 154 191 255 255 251 255 255 255 255 255 231 255 126 NaN
4586 154 213 154 240 255 255 255 255 255 255 255 255 199 249 123 NaN
4587 154 179 160 255 247 247 247 247 247 247 247 247 190 188 115 NaN
4588 154 162 184 255 235 235 235 235 235 235 235 231 186 154 169 NaN
4589 154 154 228 255 227 227 227 227 227 227 227 223 178 123 169 NaN
4590 154 156 255 215 215 215 215 215 215 215 215 215 153 115 169 NaN
4591 NaN 115 115 115 115 115 115 115 115 115 115 115 115 169 169 NaN
4592 NaN NaN 169 169 169 169 169 169 169 169 169 169 169 169 NaN NaN]/255;
4593
4594 icons(idx).data(:,:,3) = ...
4595 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4596 NaN NaN NaN NaN NaN NaN NaN NaN NaN 166 161 170 202 NaN NaN NaN
4597 NaN NaN NaN NaN NaN NaN NaN NaN 149 205 NaN NaN 166 NaN 148 NaN
4598 NaN NaN 34 34 34 34 NaN NaN NaN NaN NaN NaN NaN 141 144 NaN
4599 NaN 34 255 255 255 255 25 197 NaN NaN NaN NaN 142 145 147 NaN
4600 25 255 156 156 156 156 255 25 25 25 25 25 25 200 200 NaN
4601 25 156 140 140 140 140 140 255 255 255 255 255 25 26 197 NaN
4602 25 132 80 25 25 25 25 25 25 25 25 25 25 25 25 NaN
4603 25 132 25 108 255 255 247 255 255 255 255 255 132 255 25 NaN
4604 25 112 25 137 156 156 156 156 156 156 156 156 91 150 25 NaN
4605 25 67 33 165 148 148 148 148 148 148 148 148 83 92 13 NaN
4606 25 38 64 156 132 132 132 132 132 132 132 132 67 25 176 NaN
4607 25 26 122 156 124 124 124 124 124 124 124 124 67 26 176 NaN
4608 25 28 156 108 108 108 108 108 108 108 108 108 41 13 176 NaN
4609 NaN 13 13 13 13 13 13 13 13 13 13 13 13 176 176 NaN
4610 NaN NaN 176 176 176 176 176 176 176 176 176 176 176 176 NaN NaN]/255;
4611
4612
4613 idx = idx+1;
4614 icons(idx).data(:,:,1) = ...
4615 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4616 NaN 0.6902 0.6902 0.6902 0.6902 0.6902 0.6274 0.6274 0.5647 0.5647 0.5647 0.5019 0.5019 0.4392 0.2510 NaN
4617 NaN 0.6902 0.7529 0.5647 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.3137 0.3765 0.2510 0.4670
4618 NaN 0.6902 0.7529 0.5647 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.2510 0.1882 0.2510 0.4670
4619 NaN 0.6274 0.7529 0.5019 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.8784 0.1882 0.5019 0.2510 0.4670
4620 NaN 0.6274 0.7529 0.4392 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.8784 0.8157 0.1882 0.4392 0.2510 0.4670
4621 NaN 0.6274 0.7529 0.4392 1.0000 1.0000 1.0000 0.9412 0.9412 0.8784 0.8157 0.7529 0.1255 0.3765 0.2510 0.4670
4622 NaN 0.5647 0.7529 0.3765 1.0000 1.0000 0.9412 0.9412 0.8784 0.8157 0.7529 0.7529 0.0627 0.3765 0.2510 0.4670
4623 NaN 0.5647 0.7529 0.6902 0.3765 0.3137 0.3137 0.2510 0.1882 0.1882 0.1255 0.0627 0.3765 0.3137 0.2510 0.4670
4624 NaN 0.5019 0.6902 0.6902 0.6274 0.5647 0.5019 0.5019 0.5019 0.4392 0.4392 0.3765 0.3137 0.3137 0.2510 0.4670
4625 NaN 0.5019 0.6902 0.6274 0.5647 0.3137 0.3137 0.3137 0.3137 0.3137 0.3765 0.3137 0.3137 0.2510 0.2510 0.4670
4626 NaN 0.4392 0.6274 0.5647 0.5019 0.3137 NaN 0.1882 0.8157 0.8157 0.3765 0.2510 0.2510 0.2510 0.2510 0.4670
4627 NaN 0.4392 0.6274 0.5019 0.5019 0.3137 0.1882 0.4392 0.8784 0.8784 0.4392 0.1882 0.2510 0.1882 0.2510 0.4670
4628 NaN 0.4392 0.5647 0.5019 0.1255 0.1255 0.6902 0.6902 0.7529 0.7529 0.3137 0.1882 0.1882 0.1882 0.2510 0.4670
4629 NaN 0.7333 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.2510 0.4670
4630 NaN NaN 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670 0.4670];
4631
4632 icons(idx).data(:,:,2) = ...
4633 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4634 NaN 0.7216 0.7216 0.6902 0.6902 0.6588 0.6274 0.5961 0.5647 0.5647 0.5333 0.5019 0.4706 0.4706 0.2196 NaN
4635 NaN 0.6902 0.7529 0.5647 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9725 0.3451 0.3451 0.2196 0.5378
4636 NaN 0.6902 0.7529 0.5333 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9725 0.9412 0.3137 0.1882 0.2196 0.5378
4637 NaN 0.6588 0.7529 0.5019 1.0000 1.0000 1.0000 1.0000 1.0000 0.9725 0.9412 0.9098 0.3137 0.4706 0.2196 0.5378
4638 NaN 0.6274 0.7529 0.4706 1.0000 1.0000 1.0000 1.0000 0.9725 0.9412 0.9098 0.8470 0.2824 0.4392 0.2196 0.5378
4639 NaN 0.5961 0.7529 0.4392 1.0000 1.0000 1.0000 0.9725 0.9412 0.9098 0.8470 0.8157 0.2510 0.4078 0.2196 0.5378
4640 NaN 0.5647 0.7529 0.4078 1.0000 1.0000 0.9725 0.9412 0.9098 0.8470 0.8157 0.7843 0.2196 0.3765 0.2196 0.5378
4641 NaN 0.5333 0.7216 0.7216 0.3765 0.3765 0.3451 0.3137 0.3137 0.2824 0.2510 0.2196 0.3765 0.3451 0.2196 0.5378
4642 NaN 0.5019 0.6902 0.6902 0.6274 0.5647 0.5333 0.5019 0.4706 0.4392 0.4078 0.3765 0.3451 0.3137 0.2196 0.5378
4643 NaN 0.4706 0.6588 0.6274 0.5647 0.3451 0.3451 0.3451 0.3451 0.3765 0.4078 0.3451 0.3137 0.2824 0.2196 0.5378
4644 NaN 0.4706 0.6274 0.5647 0.5333 0.3451 NaN 0.2510 0.8470 0.8784 0.4706 0.2824 0.2824 0.2510 0.2196 0.5378
4645 NaN 0.4392 0.5961 0.5333 0.5019 0.3451 0.2510 0.4706 0.8784 0.9098 0.5019 0.2510 0.2510 0.2510 0.2196 0.5378
4646 NaN 0.4078 0.5647 0.5019 0.2824 0.1882 0.7216 0.7216 0.7529 0.7843 0.3137 0.2510 0.2510 0.2196 0.2196 0.5378
4647 NaN 0.7176 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.2196 0.5378
4648 NaN NaN 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378 0.5378];
4649
4650 icons(idx).data(:,:,3) = ...
4651 [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
4652 NaN 0.9412 0.9412 0.9412 0.9412 0.9412 0.9412 0.8784 0.8784 0.8784 0.8784 0.8784 0.8157 0.8157 0.4392 NaN
4653 NaN 0.9412 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.7529 0.6902 0.4392 0.5997
4654 NaN 0.9412 1.0000 0.9412 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.7529 0.3765 0.4392 0.5997
4655 NaN 0.9412 1.0000 0.8784 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.6902 0.8784 0.4392 0.5997
4656 NaN 0.9412 1.0000 0.8784 1.0000 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.9412 0.6902 0.8157 0.4392 0.5997
4657 NaN 0.8784 1.0000 0.8157 1.0000 1.0000 1.0000 1.0000 0.9412 0.9412 0.9412 0.8784 0.6274 0.8157 0.4392 0.5997
4658 NaN 0.8784 1.0000 0.8157 1.0000 1.0000 1.0000 0.9412 0.9412 0.9412 0.8784 0.8784 0.6274 0.7529 0.4392 0.5997
4659 NaN 0.8784 1.0000 1.0000 0.8157 0.7529 0.7529 0.7529 0.6902 0.6902 0.6274 0.6274 0.7529 0.7529 0.4392 0.5997
4660 NaN 0.8784 1.0000 1.0000 1.0000 0.9412 0.9412 0.8784 0.8784 0.8157 0.8157 0.7529 0.7529 0.6902 0.4392 0.5997
4661 NaN 0.8157 1.0000 1.0000 0.9412 0.4392 0.4392 0.4392 0.4392 0.4392 0.5019 0.7529 0.6902 0.6902 0.4392 0.5997
4662 NaN 0.8157 1.0000 0.9412 0.9412 0.4392 NaN 0.2510 0.9412 0.9412 0.5019 0.6902 0.6902 0.6274 0.4392 0.5997
4663 NaN 0.8157 1.0000 0.9412 0.8784 0.4392 0.2510 0.5647 0.9412 0.9412 0.5647 0.6274 0.6274 0.6274 0.4392 0.5997
4664 NaN 0.8157 0.9412 0.8784 0.6902 0.2510 0.7529 0.7529 0.8157 0.8157 0.3137 0.6274 0.6274 0.6274 0.4392 0.5997
4665 NaN 0.8275 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.4392 0.5997
4666 NaN NaN 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997 0.5997];
4667
4668
4669 idx = idx+1;
4670 icons(idx).data(:,:,1) = ...
4671 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255
4672 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4673 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 165
4674 0 255 203 79 213 255 255 255 255 255 254 160 109 247 0 165
4675 0 254 71 224 79 255 255 255 255 255 211 101 165 123 0 165
4676 0 191 123 255 123 203 255 255 255 255 101 224 254 79 0 165
4677 0 101 239 255 224 109 255 255 255 247 79 254 254 123 36 165
4678 0 123 254 255 255 79 247 255 255 165 165 255 255 224 0 165
4679 0 255 255 255 254 160 173 255 255 87 239 255 255 255 0 165
4680 0 255 255 255 255 224 101 255 239 87 255 255 255 255 0 165
4681 0 255 255 255 255 255 101 224 123 191 255 255 255 255 0 165
4682 0 255 255 255 255 254 224 54 101 255 255 255 255 255 0 165
4683 0 255 255 255 255 255 255 247 255 255 255 255 255 255 0 165
4684 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 165
4685 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 165
4686 255 165 165 165 172 165 165 165 165 165 165 165 165 165 165 165]/255;
4687
4688 icons(idx).data(:,:,2) = ...
4689 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4690 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0
4691 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 165
4692 0 255 203 79 213 255 255 255 255 255 254 160 109 247 0 165
4693 0 254 71 224 79 255 255 255 255 255 211 101 165 123 0 165
4694 0 191 123 255 123 203 255 255 255 255 101 224 254 79 0 165
4695 0 101 239 255 224 109 255 255 255 247 79 254 254 123 0 165
4696 0 123 254 255 255 79 247 255 255 165 165 255 255 224 0 165
4697 0 255 255 255 254 160 173 255 255 87 239 255 255 255 0 165
4698 0 255 255 255 255 224 101 255 239 87 255 255 255 255 0 165
4699 0 255 255 255 255 255 101 224 123 191 255 255 255 255 0 165
4700 0 255 255 255 255 254 224 54 101 255 255 255 255 255 0 165
4701 0 255 255 255 255 255 255 247 255 255 255 255 255 255 0 165
4702 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 165
4703 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 165
4704 0 165 165 165 153 165 165 165 165 165 165 165 165 165 165 165]/255;
4705
4706 icons(idx).data(:,:,3) = ...
4707 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255
4708 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4709 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4710 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4711 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4712 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4713 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4714 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4715 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4716 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4717 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4718 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4719 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4720 0 255 255 255 255 255 255 255 255 255 255 255 255 255 0 145
4721 0 24 39 0 0 0 0 0 0 0 0 0 0 0 0 145
4722 255 145 145 145 134 145 145 145 145 145 145 145 145 145 145 145]/255;
4723
4724
4725 idx = idx+1;
4726 icons(idx).data(:,:,1) = ...
4727 [255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
4728 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255
4729 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4730 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4731 255 0 255 255 107 255 255 107 255 255 107 255 107 255 0 255
4732 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4733 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4734 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4735 255 0 255 255 107 255 107 255 107 255 255 107 255 255 0 255
4736 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4737 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4738 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4739 255 0 255 107 255 107 255 107 255 255 107 255 107 255 0 255
4740 255 0 255 255 107 255 255 107 255 255 255 107 255 255 0 255
4741 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4742 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255]/255;
4743
4744 icons(idx).data(:,:,2) = ...
4745 [255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
4746 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255
4747 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4748 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4749 255 0 255 255 99 255 255 99 255 255 99 255 99 255 0 255
4750 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4751 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4752 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4753 255 0 255 255 99 255 99 255 99 255 255 99 255 255 0 255
4754 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4755 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4756 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4757 255 0 255 99 255 99 255 99 255 255 99 255 99 255 0 255
4758 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4759 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4760 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255]/255;
4761
4762 icons(idx).data(:,:,3) = ...
4763 [255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
4764 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255
4765 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4766 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4767 255 0 255 255 99 255 255 99 255 255 99 255 99 255 0 255
4768 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4769 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4770 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4771 255 0 255 255 99 255 99 255 99 255 255 99 255 255 0 255
4772 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4773 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4774 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4775 255 0 255 99 255 99 255 99 255 255 99 255 99 255 0 255
4776 255 0 255 255 99 255 255 99 255 255 255 99 255 255 0 255
4777 255 0 255 255 255 255 255 255 255 255 255 255 255 255 0 255
4778 255 0 0 0 255 255 255 255 255 255 255 255 0 0 0 255]/255;
4779
4780
4781 idx = idx+1;
4782 icons(idx).data(:,:,1) = ...
4783 [226 226 226 226 226 226 226 197 220 226 226 226 226 226 226 226
4784 226 226 226 226 226 227 241 144 158 241 228 228 229 228 229 226
4785 226 243 243 243 237 237 246 164 119 242 232 225 226 218 243 206
4786 179 152 153 166 148 148 177 179 63 185 141 146 154 151 179 189
4787 167 4 134 175 151 164 161 198 122 255 212 233 215 199 140 185
4788 134 50 209 241 255 255 133 118 15 20 28 94 4 0 0 89
4789 136 0 0 0 0 0 0 0 0 0 0 0 0 21 56 140
4790 208 255 226 233 255 242 215 232 251 237 226 233 207 222 156 139
4791 172 159 152 153 166 145 178 147 169 164 161 163 154 153 128 135
4792 160 164 148 139 171 150 165 154 165 185 166 173 190 190 148 162
4793 214 233 211 203 217 212 217 238 202 236 213 222 230 224 184 184
4794 219 206 174 190 219 204 201 218 183 224 219 222 217 202 176 182
4795 210 182 183 214 225 220 203 229 175 217 220 220 222 212 184 185
4796 197 175 207 224 223 220 205 231 170 221 220 220 222 217 191 187
4797 186 193 223 224 220 201 203 228 171 224 218 220 222 215 190 187
4798 189 211 220 216 204 201 214 213 187 213 216 220 220 212 193 189
4799 ]/255;
4800 icons(idx).data(:,:,2) = ...
4801 [233 233 233 233 233 233 233 204 227 233 233 233 233 233 233 233
4802 233 233 233 233 233 234 247 152 167 247 235 234 235 234 236 233
4803 233 242 242 240 236 237 247 170 131 243 234 231 234 224 245 212
4804 208 193 199 209 196 196 211 197 100 211 194 196 200 199 202 196
4805 205 19 179 199 183 197 182 179 162 255 217 246 234 231 191 199
4806 167 47 229 240 255 252 139 154 87 86 99 139 79 46 23 121
4807 175 30 47 29 28 19 5 41 33 39 54 55 65 83 81 185
4808 236 255 249 253 255 251 240 255 235 255 247 252 233 245 204 190
4809 208 200 195 196 204 192 214 202 144 215 201 201 195 195 177 186
4810 200 201 189 183 206 192 204 210 111 231 209 214 222 223 199 209
4811 245 255 251 247 254 254 252 255 156 255 254 255 255 254 235 232
4812 249 244 227 237 247 244 242 255 132 239 254 250 247 244 228 231
4813 245 231 231 246 253 249 243 255 119 223 255 251 250 245 229 232
4814 239 227 244 251 251 248 244 255 110 217 255 250 251 246 233 233
4815 233 237 250 252 249 242 246 255 115 209 255 250 251 246 232 232
4816 234 245 249 247 242 242 246 231 154 192 246 249 249 245 234 233
4817 ]/255;
4818 icons(idx).data(:,:,3) = ...
4819 [233 233 233 233 233 233 233 204 227 233 233 233 233 233 233 233
4820 233 233 233 233 233 234 247 152 167 247 235 234 235 234 236 233
4821 233 242 242 240 236 237 247 170 131 243 234 231 234 224 245 212
4822 208 193 199 209 196 196 211 197 100 211 194 196 200 199 202 196
4823 205 19 179 199 183 197 182 179 162 255 217 246 234 231 191 199
4824 167 47 229 240 255 252 139 154 87 86 99 139 79 46 23 121
4825 175 30 47 29 28 19 5 41 33 39 54 55 65 83 81 185
4826 236 255 249 253 255 251 240 255 235 255 247 252 233 245 204 190
4827 208 200 195 196 204 192 214 202 144 215 201 201 195 195 177 186
4828 200 201 189 183 206 192 204 210 111 231 209 214 222 223 199 209
4829 245 255 251 247 254 254 252 255 156 255 254 255 255 254 235 232
4830 249 244 227 237 247 244 242 255 132 239 254 250 247 244 228 231
4831 245 231 231 246 253 249 243 255 119 223 255 251 250 245 229 232
4832 239 227 244 251 251 248 244 255 110 217 255 250 251 246 233 233
4833 233 237 250 252 249 242 246 255 115 209 255 250 251 246 232 232
4834 234 245 249 247 242 242 246 231 154 192 246 249 249 245 234 233
4835 ]/255;
4836
4837
4838 idx = idx + 1;
4839 icons(idx).data(:,:,1) = ...
4840 [NaN NaN 10 23 23 23 23 23 23 23 21 3 NaN NaN NaN NaN
4841 NaN NaN 67 255 255 255 255 255 255 255 201 141 NaN NaN NaN NaN
4842 NaN NaN 43 255 241 240 241 246 252 255 186 220 151 NaN NaN NaN
4843 NaN NaN 42 255 238 237 237 236 238 254 210 178 214 38 NaN NaN
4844 NaN NaN 43 255 241 241 241 241 240 244 252 255 255 79 NaN NaN
4845 NaN NaN 47 255 232 232 225 224 224 223 220 238 255 69 NaN NaN
4846 NaN NaN 55 233 114 225 230 223 221 221 215 237 255 67 NaN NaN
4847 4 NaN 37 181 168 126 193 214 205 200 203 242 255 67 NaN NaN
4848 41 164 134 153 144 139 131 209 238 223 242 240 255 67 NaN NaN
4849 41 118 91 91 122 125 120 106 170 241 245 241 255 67 NaN NaN
4850 41 113 91 89 97 108 99 89 117 205 190 230 255 67 NaN NaN
4851 41 124 94 88 78 74 81 179 255 252 244 241 255 67 NaN NaN
4852 13 34 76 187 88 92 222 255 255 250 250 250 255 73 NaN NaN
4853 NaN NaN 69 236 121 227 255 243 238 238 238 238 255 82 NaN NaN
4854 NaN NaN NaN 0 0 0 0 0 0 0 0 0 0 0 NaN NaN]/255;
4855
4856
4857 icons(idx).data(:,:,2) = ...
4858 [NaN NaN 10 24 24 24 24 24 24 24 22 4 NaN NaN NaN NaN
4859 NaN NaN 69 255 255 255 255 255 255 255 204 144 NaN NaN NaN NaN
4860 NaN NaN 45 255 241 240 241 246 252 255 189 222 155 NaN NaN NaN
4861 NaN NaN 43 255 238 237 237 236 238 254 210 179 215 39 NaN NaN
4862 NaN NaN 44 255 241 241 241 241 240 244 252 255 255 80 NaN NaN
4863 NaN NaN 49 255 231 230 225 224 224 223 220 238 255 70 NaN NaN
4864 NaN NaN 56 227 136 214 227 223 221 221 215 237 255 68 NaN NaN
4865 4 NaN 19 157 243 154 181 210 204 200 203 242 255 67 NaN NaN
4866 51 255 231 225 219 217 172 197 232 222 242 240 255 67 NaN NaN
4867 52 227 184 183 195 201 204 172 169 239 245 241 255 67 NaN NaN
4868 51 218 177 177 180 187 187 177 130 202 190 230 255 67 NaN NaN
4869 51 237 195 183 172 170 152 175 255 251 244 241 255 67 NaN NaN
4870 15 38 72 173 183 149 211 255 255 250 250 250 255 73 NaN NaN
4871 NaN NaN 65 226 174 214 252 242 238 238 238 238 255 84 NaN NaN
4872 NaN NaN NaN 0 0 0 0 0 0 0 0 0 0 0 NaN NaN]/255;
4873
4874
4875 icons(idx).data(:,:,3) = ...
4876 [NaN NaN 9 23 23 23 23 23 23 23 21 3 NaN NaN NaN NaN
4877 NaN NaN 66 255 255 255 255 255 255 255 196 139 NaN NaN NaN NaN
4878 NaN NaN 42 255 239 238 238 244 252 255 186 216 148 NaN NaN NaN
4879 NaN NaN 41 255 236 235 235 234 237 251 210 176 212 36 NaN NaN
4880 NaN NaN 42 255 239 239 239 239 238 241 252 255 255 78 NaN NaN
4881 NaN NaN 46 255 233 232 224 223 223 223 219 235 255 67 NaN NaN
4882 NaN NaN 53 240 101 232 230 221 219 218 213 235 255 65 NaN NaN
4883 5 NaN 60 212 94 107 205 215 203 198 201 240 255 66 NaN NaN
4884 34 56 40 80 70 62 94 222 241 221 240 238 255 66 NaN NaN
4885 35 10 2 0 51 55 36 46 176 240 243 239 255 66 NaN NaN
4886 35 11 9 7 16 34 12 6 110 204 188 228 255 66 NaN NaN
4887 35 14 0 0 0 0 14 187 255 251 242 239 255 66 NaN NaN
4888 12 37 84 206 0 41 234 255 255 248 248 248 255 72 NaN NaN
4889 NaN NaN 69 249 79 239 255 240 236 236 236 236 255 80 NaN NaN
4890 NaN NaN NaN 0 0 0 0 0 0 0 0 0 0 0 NaN NaN]/255;
4891
4892
4893 idx = idx + 1;
4894 icons(idx).data(:,:,1) = ...
4895 [NaN NaN NaN NaN NaN NaN 106 252 255 255 255 255 255 255 255 255
4896 38 136 109 101 96 77 95 134 106 99 93 87 90 66 255 255
4897 52 197 232 217 210 202 191 178 170 164 160 159 155 15 255 255
4898 51 181 255 255 255 255 255 255 255 255 255 255 253 9 255 255
4899 49 174 245 153 156 175 255 255 181 153 149 205 245 0 255 255
4900 47 168 199 122 149 100 155 183 99 99 15 117 245 0 255 241
4901 45 158 255 146 146 141 87 68 120 34 86 255 238 0 252 232
4902 42 144 255 255 158 158 143 74 68 117 255 255 230 0 255 255
4903 40 134 255 255 169 15 150 111 68 81 105 167 236 0 230 217
4904 37 131 255 158 99 106 10 143 117 50 51 165 252 0 255 254
4905 35 122 208 0 22 32 8 17 110 20 0 13 212 0 255 245
4906 33 115 255 255 255 255 255 250 146 113 119 106 217 0 236 217
4907 31 109 255 254 252 251 250 255 255 255 255 255 241 0 255 251
4908 29 116 190 168 164 157 145 133 126 121 117 118 112 0 215 205
4909 20 63 47 38 36 20 38 83 64 51 52 55 64 20 255 241
4910 NaN NaN NaN NaN NaN NaN 96 249 252 228 237 251 249 203 241 246]/255;
4911
4912 icons(idx).data(:,:,2) = ...
4913 [NaN NaN NaN NaN NaN NaN 114 252 255 255 255 255 255 255 255 255
4914 49 180 152 145 140 118 140 173 150 139 132 126 126 106 255 255
4915 67 249 252 242 237 231 221 207 201 196 194 193 193 75 255 255
4916 66 232 255 255 255 255 255 255 255 255 255 255 255 68 255 255
4917 64 226 251 197 191 200 255 255 194 170 168 214 253 61 255 255
4918 62 220 224 183 207 173 189 202 167 175 116 172 253 58 255 246
4919 60 211 255 190 196 203 166 131 187 134 148 255 249 54 254 240
4920 57 199 255 255 198 203 202 158 132 168 255 255 245 47 255 255
4921 54 190 255 255 200 110 199 185 155 147 160 203 251 44 240 230
4922 52 187 255 204 187 194 121 204 189 139 99 179 255 39 255 254
4923 49 180 230 42 49 53 36 64 182 98 65 70 228 36 255 248
4924 47 171 255 255 255 255 255 255 186 115 124 114 235 34 243 229
4925 45 166 255 255 254 254 255 255 255 255 255 255 255 33 255 252
4926 43 176 222 206 204 200 190 180 174 171 169 169 169 32 229 220
4927 30 101 81 74 69 54 72 116 96 84 84 84 94 55 255 245
4928 NaN NaN NaN NaN NaN NaN 105 251 253 237 242 252 251 218 246 249]/255;
4929
4930 icons(idx).data(:,:,3) = ...
4931 [ NaN NaN NaN NaN NaN NaN 125 253 255 255 255 255 255 255 255 255
4932 34 118 92 84 79 56 83 111 88 79 73 69 74 45 255 255
4933 46 180 228 207 203 195 182 169 159 155 149 149 145 0 255 255
4934 45 163 255 255 255 255 255 255 255 255 255 255 254 0 255 255
4935 42 156 248 152 155 176 255 255 181 154 147 206 245 0 255 255
4936 40 150 202 117 136 87 154 181 90 84 8 120 243 0 255 252
4937 38 138 255 145 137 131 81 65 106 27 86 255 238 0 255 250
4938 35 122 255 255 159 152 137 75 62 121 255 255 229 0 255 255
4939 33 113 255 255 171 13 145 111 67 76 84 159 234 0 255 247
4940 30 109 255 160 89 97 10 136 111 36 33 159 251 0 255 255
4941 28 99 211 0 12 23 2 11 101 0 0 13 209 0 255 253
4942 26 92 255 255 255 255 255 250 146 111 117 104 213 0 255 245
4943 23 89 255 255 255 255 255 255 255 255 255 255 241 0 255 254
4944 22 93 180 156 151 141 129 114 105 98 93 93 83 0 255 239
4945 15 43 26 17 15 0 25 63 45 39 38 39 44 9 255 252
4946 NaN NaN NaN NaN NaN NaN 117 253 255 249 251 255 254 239 252 254]/255;
4947
4948
4949 idx = idx + 1;
4950 icons(idx).data(:,:,1) = ...
4951 [NaN,NaN,0.745082780193790,0.603906309605554,0.603906309605554,0.603906309605554,0.603906309605554,0.568627450980392,0.764705882352941,NaN,NaN,NaN,NaN,NaN,NaN,NaN;NaN,0.698023956664378,0.568627450980392,0.780392156862745,0.823514152742809,0.854886701762417,0.925474937056535,0.827450980392157,0.596063172350652,0.749019607843137,NaN,NaN,NaN,NaN,NaN,NaN;0.752925917448692,0.501945525291829,0.737239642938888,0.643121995880064,0.584313725490196,0.690180819409476,0.760769054703594,1,0.894102388036927,0.596063172350652,NaN,NaN,NaN,NaN,NaN,NaN;0.682337682154574,0.639215686274510,0.650965133134966,0.600000000000000,0.596063172350652,0.196078431372549,0.596063172350652,0.764705882352941,0.941161211566339,0.721553368429084,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.686274509803922,0.678431372549020,0.682337682154574,0.662745098039216,0.196078431372549,0.650965133134966,0.639215686274510,0.788235294117647,0.811764705882353,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.764705882352941,0.815671015487907,0.196078431372549,0.196078431372549,0.196078431372549,0.196078431372549,0.196078431372549,0.682337682154574,0.815671015487907,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.866666666666667,0.952941176470588,0.803921568627451,0.803921568627451,0.196078431372549,0.619592584115358,0.607843137254902,0.737239642938888,0.741176470588235,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.682337682154574,0.721553368429084,1,1,0.968627450980392,0.196078431372549,0.709803921568628,0.670588235294118,0.807827878233005,0.564690623331045,0.772549019607843,NaN,NaN,NaN,NaN,NaN;NaN,0.592156862745098,0.839200427252613,1,1,0.901945525291829,0.788235294117647,0.792141603723201,0.549004348821241,0.654901960784314,NaN,1,NaN,NaN,NaN,NaN;NaN,NaN,0.639215686274510,0.698023956664378,0.827450980392157,0.784298466468299,0.650965133134966,0.498054474708171,0.623529411764706,0.627435721370260,0.890196078431373,0.937254901960784,0.996063172350652,NaN,NaN,NaN;NaN,NaN,NaN,0.772549019607843,0.698023956664378,0.678431372549020,0.690180819409476,0.784298466468299,0.666651407644770,0.615686274509804,0.745082780193790,1,0.933318074311437,0.996063172350652,NaN,NaN;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.705867093919280,0.517631799801633,0.745082780193790,1,0.929411764705882,1,NaN;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.701960784313725,0.513725490196078,0.741176470588235,1,0.925474937056535,0.749019607843137;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.705867093919280,0.513725490196078,0.741176470588235,0.988220035095750,0.745082780193790;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.701960784313725,0.533318074311437,0.549004348821241,0.654901960784314;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.694117647058824,0.635278858625162,NaN;];
4952 icons(idx).data(:,:,2) = ...
4953 [1,1,0.745082780193790,0.670588235294118,0.670588235294118,0.670588235294118,0.670588235294118,0.576470588235294,0.760769054703594,1,1,1,1,1,1,1;1,0.701960784313725,0.650965133134966,0.917631799801633,0.968627450980392,0.992156862745098,1,0.898039215686275,0.603906309605554,0.741176470588235,1,1,1,1,1,1;0.756862745098039,0.588220035095750,0.929411764705882,0.858823529411765,0.807827878233005,0.854886701762417,0.894102388036927,1,0.976470588235294,0.596063172350652,1,1,1,1,1,1;0.721553368429084,0.823514152742809,0.878416113527123,0.835294117647059,0.831357289997711,0.274509803921569,0.815671015487907,0.894102388036927,1,0.807827878233005,0.670588235294118,1,1,1,1,1;0.670588235294118,0.901945525291829,0.890196078431373,0.890196078431373,0.878416113527123,0.274509803921569,0.854886701762417,0.831357289997711,0.937254901960784,0.933318074311437,0.670588235294118,1,1,1,1,1;0.670588235294118,0.937254901960784,0.937254901960784,0.274509803921569,0.274509803921569,0.274509803921569,0.274509803921569,0.274509803921569,0.878416113527123,0.937254901960784,0.670588235294118,1,1,1,1,1;0.670588235294118,0.937254901960784,0.988220035095750,0.862729839017319,0.862729839017319,0.274509803921569,0.815671015487907,0.803921568627451,0.921568627450980,0.854886701762417,0.670588235294118,1,1,1,1,1;0.721553368429084,0.737239642938888,1,1,0.988220035095750,0.274509803921569,0.898039215686275,0.882352941176471,0.980376897840848,0.627435721370260,0.768612191958496,1,1,1,1,1;1,0.603906309605554,0.847043564507515,1,1,0.984313725490196,0.960784313725490,0.976470588235294,0.662745098039216,0.658808270389868,1,0.615686274509804,1,1,1,1;1,1,0.650965133134966,0.701960784313725,0.854886701762417,0.874509803921569,0.780392156862745,0.564690623331045,0.615686274509804,0.627435721370260,0.733333333333333,0.713710231174182,0.600000000000000,1,1,1;1,1,1,0.772549019607843,0.705867093919280,0.686274509803922,0.694117647058824,0.784298466468299,0.674494544899672,0.572533760585946,0.498054474708171,0.741176470588235,0.709803921568628,0.600000000000000,1,1;1,1,1,1,1,1,1,1,1,0.701960784313725,0.439215686274510,0.509788662546731,0.741176470588235,0.709803921568628,0.600000000000000,1;1,1,1,1,1,1,1,1,1,1,0.701960784313725,0.439215686274510,0.505882352941176,0.741176470588235,0.721553368429084,0.501945525291829;1,1,1,1,1,1,1,1,1,1,1,0.705867093919280,0.443152513923857,0.505882352941176,0.733333333333333,0.670588235294118;1,1,1,1,1,1,1,1,1,1,1,1,0.705867093919280,0.454901960784314,0.435309376668956,0.658808270389868;1,1,1,1,1,1,1,1,1,1,1,1,1,0.694117647058824,0.647058823529412,1;];
4954 icons(idx).data(:,:,3) = ...
4955 [1,1,0.796078431372549,0.854886701762417,0.854886701762417,0.854886701762417,0.854886701762417,0.713710231174182,0.792141603723201,1,1,1,1,1,1,1;1,0.768612191958496,0.827450980392157,0.956847486076143,0.976470588235294,0.992156862745098,1,0.945098039215686,0.803921568627451,0.796078431372549,1,1,1,1,1,1;0.776455329213397,0.749019607843137,0.952941176470588,0.901945525291829,0.882352941176471,0.909788662546731,0.937254901960784,1,0.988220035095750,0.819607843137255,1,1,1,1,1,1;0.858823529411765,0.882352941176471,0.909788662546731,0.882352941176471,0.886259250782025,0.470588235294118,0.882352941176471,0.933318074311437,1,0.921568627450980,0.854886701762417,1,1,1,1,1;0.854886701762417,0.925474937056535,0.909788662546731,0.913725490196078,0.905882352941177,0.470588235294118,0.901945525291829,0.894102388036927,0.960784313725490,0.968627450980392,0.854886701762417,1,1,1,1,1;0.854886701762417,0.945098039215686,0.949004348821241,0.470588235294118,0.470588235294118,0.470588235294118,0.470588235294118,0.470588235294118,0.921568627450980,0.968627450980392,0.854886701762417,1,1,1,1,1;0.854886701762417,0.952941176470588,0.992156862745098,0.917631799801633,0.917631799801633,0.470588235294118,0.945098039215686,0.949004348821241,0.941161211566339,0.937254901960784,0.854886701762417,1,1,1,1,1;0.858823529411765,0.827450980392157,1,1,0.992156862745098,0.470588235294118,0.921568627450980,0.909788662546731,0.980376897840848,0.823514152742809,0.792141603723201,1,1,1,1,1;1,0.717647058823529,0.925474937056535,1,1,0.980376897840848,0.960784313725490,0.976470588235294,0.815671015487907,0.776455329213397,1,0.180392156862745,1,1,1,1;1,1,0.776455329213397,0.870572976272221,0.941161211566339,0.937254901960784,0.866666666666667,0.717647058823529,0.682337682154574,0.607843137254902,0.490211337453269,0.435309376668956,0.203921568627451,1,1,1;1,1,1,0.799984740978103,0.796078431372549,0.792141603723201,0.764705882352941,0.792141603723201,0.780392156862745,0.545098039215686,0.125490196078431,0.325505455100328,0.450995651178759,0.203921568627451,1,1;1,1,1,1,1,1,1,1,1,0.784298466468299,0.384313725490196,0.149019607843137,0.325505455100328,0.458838788433661,0.180392156862745,1;1,1,1,1,1,1,1,1,1,1,0.796078431372549,0.396093690394446,0.149019607843137,0.329411764705882,0.458838788433661,0.254917219806210;1,1,1,1,1,1,1,1,1,1,1,0.803921568627451,0.407843137254902,0.149019607843137,0.298039215686275,0.580376897840848;1,1,1,1,1,1,1,1,1,1,1,1,0.803921568627451,0.403936827649348,0.258823529411765,0.674494544899672;1,1,1,1,1,1,1,1,1,1,1,1,1,0.749019607843137,0.654901960784314,1;];
4956
4957
4958 idx = idx + 1;
4959 icons(idx).data(:,:,1) = ...
4960 [NaN,NaN,0.745082780193790,0.603906309605554,0.603906309605554,0.603906309605554,0.603906309605554,0.568627450980392,0.764705882352941,NaN,NaN,NaN,NaN,NaN,NaN,NaN;NaN,0.698023956664378,0.568627450980392,0.780392156862745,0.823514152742809,0.854886701762417,0.925474937056535,0.827450980392157,0.596063172350652,0.749019607843137,NaN,NaN,NaN,NaN,NaN,NaN;0.752925917448692,0.501945525291829,0.737239642938888,0.643121995880064,0.584313725490196,0.690180819409476,0.760769054703594,1,0.894102388036927,0.596063172350652,NaN,NaN,NaN,NaN,NaN,NaN;0.682337682154574,0.639215686274510,0.650965133134966,0.600000000000000,0.596063172350652,0.643121995880064,0.596063172350652,0.764705882352941,0.941161211566339,0.721553368429084,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.686274509803922,0.678431372549020,0.682337682154574,0.662745098039216,0.650965133134966,0.650965133134966,0.639215686274510,0.788235294117647,0.811764705882353,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.764705882352941,0.815671015487907,0.196078431372549,0.196078431372549,0.196078431372549,0.196078431372549,0.196078431372549,0.682337682154574,0.815671015487907,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.603906309605554,0.866666666666667,0.952941176470588,0.760769054703594,0.760769054703594,0.760769054703594,0.760769054703594,0.760769054703594,0.737239642938888,0.741176470588235,0.603906309605554,NaN,NaN,NaN,NaN,NaN;0.682337682154574,0.721553368429084,1,1,0.968627450980392,0.870572976272221,0.709803921568628,0.670588235294118,0.807827878233005,0.564690623331045,0.772549019607843,NaN,NaN,NaN,NaN,NaN;NaN,0.592156862745098,0.839200427252613,1,1,0.901945525291829,0.788235294117647,0.792141603723201,0.549004348821241,0.654901960784314,NaN,NaN,NaN,NaN,NaN,NaN;NaN,NaN,0.639215686274510,0.698023956664378,0.827450980392157,0.784298466468299,0.650965133134966,0.498054474708171,0.623529411764706,0.627435721370260,0.890196078431373,0.937254901960784,0.996063172350652,NaN,NaN,NaN;NaN,NaN,NaN,0.772549019607843,0.698023956664378,0.678431372549020,0.690180819409476,0.784298466468299,NaN,0.615686274509804,0.745082780193790,1,0.933318074311437,0.996063172350652,NaN,NaN;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.705867093919280,0.517631799801633,0.745082780193790,1,0.929411764705882,1,NaN;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.701960784313725,0.513725490196078,0.741176470588235,1,0.925474937056535,0.749019607843137;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.705867093919280,0.513725490196078,0.741176470588235,0.988220035095750,0.745082780193790;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.701960784313725,0.533318074311437,0.549004348821241,0.654901960784314;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.694117647058824,0.635278858625162,NaN;];
4961 icons(idx).data(:,:,2) = ...
4962 [1,1,0.745082780193790,0.670588235294118,0.670588235294118,0.670588235294118,0.670588235294118,0.576470588235294,0.760769054703594,1,1,1,1,1,1,1;1,0.701960784313725,0.650965133134966,0.917631799801633,0.968627450980392,0.992156862745098,1,0.898039215686275,0.603906309605554,0.741176470588235,1,1,1,1,1,1;0.756862745098039,0.588220035095750,0.929411764705882,0.858823529411765,0.807827878233005,0.854886701762417,0.894102388036927,1,0.976470588235294,0.596063172350652,1,1,1,1,1,1;0.721553368429084,0.823514152742809,0.878416113527123,0.835294117647059,0.831357289997711,0.843137254901961,0.815671015487907,0.894102388036927,1,0.807827878233005,0.670588235294118,1,1,1,1,1;0.670588235294118,0.901945525291829,0.890196078431373,0.890196078431373,0.878416113527123,0.870572976272221,0.854886701762417,0.831357289997711,0.937254901960784,0.933318074311437,0.670588235294118,1,1,1,1,1;0.670588235294118,0.937254901960784,0.937254901960784,0.274509803921569,0.274509803921569,0.274509803921569,0.274509803921569,0.274509803921569,0.878416113527123,0.937254901960784,0.670588235294118,1,1,1,1,1;0.670588235294118,0.937254901960784,0.988220035095750,0.819607843137255,0.819607843137255,0.819607843137255,0.819607843137255,0.819607843137255,0.921568627450980,0.854886701762417,0.670588235294118,1,1,1,1,1;0.721553368429084,0.737239642938888,1,1,0.988220035095750,0.952941176470588,0.898039215686275,0.882352941176471,0.980376897840848,0.627435721370260,0.768612191958496,1,1,1,1,1;1,0.603906309605554,0.847043564507515,1,1,0.984313725490196,0.960784313725490,0.976470588235294,0.662745098039216,0.658808270389868,1,1,1,1,1,1;1,1,0.650965133134966,0.701960784313725,0.854886701762417,0.874509803921569,0.780392156862745,0.564690623331045,0.615686274509804,0.627435721370260,0.733333333333333,0.713710231174182,0.600000000000000,1,1,1;1,1,1,0.772549019607843,0.705867093919280,0.686274509803922,0.694117647058824,0.784298466468299,1,0.572533760585946,0.498054474708171,0.741176470588235,0.709803921568628,0.600000000000000,1,1;1,1,1,1,1,1,1,1,1,0.701960784313725,0.439215686274510,0.509788662546731,0.741176470588235,0.709803921568628,0.600000000000000,1;1,1,1,1,1,1,1,1,1,1,0.701960784313725,0.439215686274510,0.505882352941176,0.741176470588235,0.721553368429084,0.501945525291829;1,1,1,1,1,1,1,1,1,1,1,0.705867093919280,0.443152513923857,0.505882352941176,0.733333333333333,0.670588235294118;1,1,1,1,1,1,1,1,1,1,1,1,0.705867093919280,0.454901960784314,0.435309376668956,0.658808270389868;1,1,1,1,1,1,1,1,1,1,1,1,1,0.694117647058824,0.647058823529412,1;];
4963 icons(idx).data(:,:,3) = ...
4964 [1,1,0.796078431372549,0.854886701762417,0.854886701762417,0.854886701762417,0.854886701762417,0.713710231174182,0.792141603723201,1,1,1,1,1,1,1;1,0.768612191958496,0.827450980392157,0.956847486076143,0.976470588235294,0.992156862745098,1,0.945098039215686,0.803921568627451,0.796078431372549,1,1,1,1,1,1;0.776455329213397,0.749019607843137,0.952941176470588,0.901945525291829,0.882352941176471,0.909788662546731,0.937254901960784,1,0.988220035095750,0.819607843137255,1,1,1,1,1,1;0.858823529411765,0.882352941176471,0.909788662546731,0.882352941176471,0.886259250782025,0.894102388036927,0.882352941176471,0.933318074311437,1,0.921568627450980,0.854886701762417,1,1,1,1,1;0.854886701762417,0.925474937056535,0.909788662546731,0.913725490196078,0.905882352941177,0.901945525291829,0.901945525291829,0.894102388036927,0.960784313725490,0.968627450980392,0.854886701762417,1,1,1,1,1;0.854886701762417,0.945098039215686,0.949004348821241,0.470588235294118,0.470588235294118,0.470588235294118,0.470588235294118,0.470588235294118,0.921568627450980,0.968627450980392,0.854886701762417,1,1,1,1,1;0.854886701762417,0.952941176470588,0.992156862745098,0.890196078431373,0.890196078431373,0.890196078431373,0.890196078431373,0.890196078431373,0.941161211566339,0.937254901960784,0.854886701762417,1,1,1,1,1;0.858823529411765,0.827450980392157,1,1,0.992156862745098,0.964690623331045,0.921568627450980,0.909788662546731,0.980376897840848,0.823514152742809,0.792141603723201,1,1,1,1,1;1,0.717647058823529,0.925474937056535,1,1,0.980376897840848,0.960784313725490,0.976470588235294,0.815671015487907,0.776455329213397,1,1,1,1,1,1;1,1,0.776455329213397,0.870572976272221,0.941161211566339,0.937254901960784,0.866666666666667,0.717647058823529,0.682337682154574,0.607843137254902,0.490211337453269,0.435309376668956,0.203921568627451,1,1,1;1,1,1,0.799984740978103,0.796078431372549,0.792141603723201,0.764705882352941,0.792141603723201,1,0.545098039215686,0.125490196078431,0.325505455100328,0.450995651178759,0.203921568627451,1,1;1,1,1,1,1,1,1,1,1,0.784298466468299,0.384313725490196,0.149019607843137,0.325505455100328,0.458838788433661,0.180392156862745,1;1,1,1,1,1,1,1,1,1,1,0.796078431372549,0.396093690394446,0.149019607843137,0.329411764705882,0.458838788433661,0.254917219806210;1,1,1,1,1,1,1,1,1,1,1,0.803921568627451,0.407843137254902,0.149019607843137,0.298039215686275,0.580376897840848;1,1,1,1,1,1,1,1,1,1,1,1,0.803921568627451,0.403936827649348,0.258823529411765,0.674494544899672;1,1,1,1,1,1,1,1,1,1,1,1,1,0.749019607843137,0.654901960784314,1;];
4965
4966
4967 idx = idx + 1;
4968 icons(idx).data(:,:,1) = ...
4969 [NaN,NaN,NaN,NaN,NaN,NaN,NaN,0.290196078431373,0.290196078431373,NaN,NaN,NaN,NaN,NaN,NaN,NaN;NaN,NaN,NaN,0.290196078431373,0.290196078431373,NaN,0.290196078431373,1,1,0.290196078431373,0.290196078431373,0.290196078431373,NaN,NaN,NaN,NaN;NaN,NaN,0.290196078431373,1,1,0.290196078431373,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,NaN,NaN,NaN;NaN,NaN,0.290196078431373,1,1,0.290196078431373,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,NaN,0.290196078431373,NaN;NaN,NaN,NaN,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,0.290196078431373,1,0.290196078431373;NaN,NaN,NaN,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373,1,1,0.290196078431373;NaN,0.290196078431373,0.290196078431373,0.290196078431373,0.290196078431373,1,1,1,1,1,1,1,0.290196078431373,1,0.991546501869230,0.290196078431373;0.290196078431373,1,1,0.290196078431373,0.290196078431373,1,1,1,1,1,1,1,0.996032654306859,0.986602578774701,0.975188830395972,0.290196078431373;0.290196078431373,1,1,1,0.290196078431373,1,1,1,1,1,1,0.991546501869230,0.981109330891890,0.968841077286946,0.290196078431373,NaN;NaN,0.290196078431373,1,1,1,1,1,1,1,0.996032654306859,0.986602578774701,0.975188830395972,0.962127107652400,0.947631036850538,0.290196078431373,NaN;NaN,NaN,0.290196078431373,1,1,1,1,1,0.991546501869230,0.981109330891890,0.968871595330739,0.955046921492332,0.939909971770810,0.923643854428931,0.290196078431373,NaN;NaN,NaN,0.290196078431373,1,1,1,0.996063172350652,0.986572060730907,0.975188830395972,0.962127107652400,0.947631036850538,0.931914244296941,0.915190356298161,0.290196078431373,NaN,NaN;NaN,NaN,NaN,0.290196078431373,1,0.991546501869230,0.981109330891890,0.968841077286946,0.955016403448539,0.939909971770810,0.923643854428931,0.906553749904631,0.888761730373083,0.290196078431373,NaN,NaN;NaN,NaN,NaN,NaN,0.290196078431373,0.975188830395972,0.962127107652400,0.947631036850538,0.931914244296941,0.915220874341955,0.897734035248341,0.879728389410239,0.290196078431373,NaN,NaN,NaN;NaN,NaN,NaN,NaN,NaN,0.290196078431373,0.939909971770810,0.923643854428931,0.906553749904631,0.888761730373083,0.870634012359808,0.852231631952392,0.290196078431373,NaN,NaN,NaN;NaN,NaN,NaN,NaN,NaN,0.290196078431373,0.915190356298161,0.897734035248341,0.879758907454032,0.861478599221790,0.843076218814374,0.824887464713512,0.290196078431373,NaN,NaN,NaN;];
4970 icons(idx).data(:,:,2) = ...
4971 [0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.894102388036927,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894071869993134,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894071869993134,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.882536049439231,0.407843137254902;0.407843137254902,0.894102388036927,0.894102388036927,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.888700694285496,0.875730525673304,0.860105287251087,0.407843137254902;0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.882566567483024,0.868223086900130,0.851468680857557,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.888700694285496,0.875730525673304,0.860105287251087,0.842221713588159,0.822354467078660,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.894102388036927,0.882566567483024,0.868223086900130,0.851468680857557,0.832516975661860,0.811795223926146,0.789547570000763,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.894102388036927,0.894102388036927,0.888700694285496,0.875730525673304,0.860135805294881,0.842221713588159,0.822354467078660,0.800839246204318,0.777950713359274,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.894102388036927,0.882536049439231,0.868223086900130,0.851438162813764,0.832516975661860,0.811764705882353,0.789547570000763,0.766079194323644,0.741756313420310,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.860135805294881,0.842252231631952,0.822384985122454,0.800808728160525,0.777920195315480,0.754024567025254,0.729396505683986,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.811764705882353,0.789547570000763,0.766079194323644,0.741786831464103,0.716914625772488,0.691676203555352,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902,0.777920195315480,0.754024567025254,0.729396505683986,0.704371709773404,0.679133287556268,0.654261081864653,0.407843137254902,0.407843137254902,0.407843137254902,0.407843137254902;];
4972 icons(idx).data(:,:,3) = ...
4973 [0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.799954222934310,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.709803921568628,0.799954222934310,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799954222934310,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.709803921568628,0.799984740978103,0.785091935606928,0.709803921568628;0.709803921568628,0.799954222934310,0.799984740978103,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.792996108949416,0.776272220950637,0.756130312046998,0.709803921568628;0.709803921568628,0.799984740978103,0.799954222934310,0.799984740978103,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.785091935606928,0.766628519111925,0.744960708018616,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.799954222934310,0.799984740978103,0.799984740978103,0.799984740978103,0.792996108949416,0.776272220950637,0.756160830090791,0.733089188982986,0.707423514152743,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.799984740978103,0.785091935606928,0.766598001068132,0.744960708018616,0.720546272983902,0.693781948577096,0.665094987411307,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.799984740978103,0.799984740978103,0.792996108949416,0.776241702906844,0.756160830090791,0.733089188982986,0.707423514152743,0.679682612344549,0.650141145952545,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.799984740978103,0.785061417563134,0.766598001068132,0.744960708018616,0.720546272983902,0.693812466620890,0.665094987411307,0.634882124055848,0.603479056992447,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.756160830090791,0.733089188982986,0.707423514152743,0.679652094300755,0.650141145952545,0.619287403677424,0.587518120088502,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.693781948577096,0.665094987411307,0.634882124055848,0.603509575036240,0.571404592965591,0.538872358281834,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628,0.650141145952545,0.619256885633631,0.587518120088502,0.555230029755093,0.522697795071336,0.490638590066377,0.709803921568628,0.709803921568628,0.709803921568628,0.709803921568628;];
4974
4975
4976 function guiparams = createGUIparams
4977
4978
4979
4980
4981
4982 guiprefs = getpref('VMT');
4983
4984
4985
4986
4987
4988 guiparams.horizontal_grid_node_spacing = 1.0;
4989 guiparams.vertical_grid_node_spacing = 0.4;
4990
4991
4992
4993
4994 guiparams.contours = '';
4995 guiparams.contour = '';
4996 guiparams.idx_contour = 1;
4997 guiparams.vertical_exaggeration = 10;
4998 guiparams.vector_scale_cross_section = 0.2;
4999 guiparams.horizontal_vector_spacing = 1;
5000 guiparams.vertical_vector_spacing = 1;
5001 guiparams.horizontal_smoothing_window = 1;
5002 guiparams.vertical_smoothing_window = 1;
5003 guiparams.plot_secondary_flow_vectors = true;
5004 guiparams.secondary_flows = '';
5005 guiparams.secondary_flow_vector_variable = '';
5006 guiparams.idx_secondary_flow_vector_variable = 1;
5007 guiparams.include_vertical_velocity = true;
5008
5009
5010
5011
5012 guiparams.depth_range_min = 0;
5013 guiparams.depth_range_max = inf;
5014 guiparams.vector_scale_plan_view = 1;
5015 guiparams.vector_spacing_plan_view = 1;
5016 guiparams.smoothing_window_size = 1;
5017 guiparams.display_shoreline = false;
5018 guiparams.add_background = false;
5019
5020
5021
5022
5023 guiparams.beam_angle = 20.0;
5024 guiparams.magnetic_variation = 0.0;
5025 guiparams.wse = 0.0;
5026 guiparams.output_auxiliary_data = false;
5027
5028
5029
5030
5031 idx = 1;
5032 guiparams.contours(idx).string = 'Streamwise Velocity (u)';
5033 guiparams.contours(idx).variable = 'streamwise';
5034 idx = idx + 1;
5035 guiparams.contours(idx).string = 'Transverse Velocity (v)';
5036 guiparams.contours(idx).variable = 'transverse';
5037 idx = idx + 1;
5038 guiparams.contours(idx).string = 'Vertical Velocity (w)';
5039 guiparams.contours(idx).variable = 'vertical';
5040 idx = idx + 1;
5041 guiparams.contours(idx).string = 'Velocity Magnitude';
5042 guiparams.contours(idx).variable = 'mag';
5043 idx = idx + 1;
5044 guiparams.contours(idx).string = 'East Velocity (E)';
5045 guiparams.contours(idx).variable = 'east';
5046 idx = idx + 1;
5047 guiparams.contours(idx).string = 'North Velocity (N)';
5048 guiparams.contours(idx).variable = 'north';
5049 idx = idx + 1;
5050 guiparams.contours(idx).string = 'Error Velocity';
5051 guiparams.contours(idx).variable = 'error';
5052 idx = idx + 1;
5053 guiparams.contours(idx).string = 'Primary Velocity (zsd)';
5054 guiparams.contours(idx).variable = 'primary_zsd';
5055 idx = idx + 1;
5056 guiparams.contours(idx).string = 'Secondary Velocity (zsd)';
5057 guiparams.contours(idx).variable = 'secondary_zsd';
5058 idx = idx + 1;
5059 guiparams.contours(idx).string = 'Primary Velocity (Roz)';
5060 guiparams.contours(idx).variable = 'primary_roz';
5061 idx = idx + 1;
5062 guiparams.contours(idx).string = 'Secondary Velocity (Roz)';
5063 guiparams.contours(idx).variable = 'secondary_roz';
5064 idx = idx + 1;
5065 guiparams.contours(idx).string = 'Prim. Vel. (Roz, Downstream Comp.)';
5066 guiparams.contours(idx).variable = 'primary_roz_x';
5067 idx = idx + 1;
5068 guiparams.contours(idx).string = 'Prim. Vel. (Roz, Cross-Stream Comp.)';
5069 guiparams.contours(idx).variable = 'primary_roz_y';
5070 idx = idx + 1;
5071 guiparams.contours(idx).string = 'Sec. Vel. (Roz, Downstream Comp.)';
5072 guiparams.contours(idx).variable = 'secondary_roz_x';
5073 idx = idx + 1;
5074 guiparams.contours(idx).string = 'Sec. Vel. (Roz, Cross-Stream Comp.)';
5075 guiparams.contours(idx).variable = 'secondary_roz_y';
5076 idx = idx + 1;
5077 guiparams.contours(idx).string = 'Backscatter';
5078 guiparams.contours(idx).variable = 'backscatter';
5079 idx = idx + 1;
5080 guiparams.contours(idx).string = 'Flow Direction (deg.)';
5081 guiparams.contours(idx).variable = 'flowangle';
5082
5083 guiparams.contour = guiparams.contours(guiparams.idx_contour).variable;
5084
5085
5086
5087
5088 idx = 1;
5089 guiparams.secondary_flows(idx).string = 'Transverse';
5090 guiparams.secondary_flows(idx).variable = 'transverse';
5091 idx = idx + 1;
5092 guiparams.secondary_flows(idx).string = 'Secondary (zsd)';
5093 guiparams.secondary_flows(idx).variable = 'secondary_zsd';
5094 idx = idx + 1;
5095 guiparams.secondary_flows(idx).string = 'Secondary (Roz)';
5096 guiparams.secondary_flows(idx).variable = 'secondary_roz';
5097 idx = idx + 1;
5098 guiparams.secondary_flows(idx).string = 'Secondary (Roz, Cross-Stream Comp)';
5099 guiparams.secondary_flows(idx).variable = 'secondary_roz_y';
5100 idx = idx + 1;
5101 guiparams.secondary_flows(idx).string = 'Primary (Roz, Cross-Stream Comp)';
5102 guiparams.secondary_flows(idx).variable = 'primary_roz_y';
5103
5104 guiparams.secondary_flow_vector_variable = ...
5105 guiparams.secondary_flows(guiparams.idx_secondary_flow_vector_variable).variable;
5106
5107
5108
5109
5110
5111 guiparams.presentation = true;
5112 guiparams.print = false;
5113 guiparams.set_cross_section_endpoints = false;
5114 guiparams.unit_discharge_correction = false;
5115
5116 if ispref('VMT','units')
5117 switch guiprefs.units
5118 case 'metric'
5119 guiparams.english_units = false;
5120 case 'english'
5121 guiparams.english_units = true;
5122 end
5123 else
5124 guiparams.english_units = false;
5125 end
5126 guiparams.vertical_offset = 0;
5127
5128 if ispref('VMT','renderer')
5129 guiparams.renderer = guiprefs.renderer;
5130 else
5131 guiparams.renderer = 'OpenGL';
5132 end
5133
5134
5135
5136
5137
5138 guiparams.ascii_path = pwd;
5139 guiparams.ascii_file = '';
5140 guiparams.mat_path = pwd;
5141 guiparams.mat_file = '';
5142 guiparams.tecplot_path = pwd;
5143 guiparams.tecplot_file = '';
5144 guiparams.kmz_path = pwd;
5145 guiparams.kmz_file = '';
5146 guiparams.multibeambathymetry_path = pwd;
5147 guiparams.multibeambathymetry_file = '';
5148 guiparams.log_path = pwd;
5149 guiparams.log_file = '';
5150
5151
5152 if isdeployed
5153 guiparams.has_mapping_toolbox = true;
5154 else
5155 guiparams.has_mapping_toolbox = ...
5156 ~isempty(dir(fullfile(matlabroot,'toolbox','map')));
5157 end
5158
5159
5160
5161
5162 guiparams.z = [];
5163 guiparams.A = [];
5164 guiparams.V = [];
5165 guiparams.Map = [];
5166 guiparams.savefile = [];
5167 guiparams.iric_anv_planview_data = [];
5168
5169
5170
5171 guiparams.data_folder = '';
5172 guiparams.data_files = {''};
5173 guiparams.gui_state = 'init';
5174
5175
5176
5177 function ShiptracksZoom_Callback(obj,evd,handles)
5178 ticks_format('%6.0f','%8.0f');
5179
5180 function ShiptracksPan_Callback(obj,evd,handles)
5181 ticks_format('%6.0f','%8.0f');
5182
5183
5184
5185
5186
5187
5188
5189
5190 function figure1_WindowKeyPressFcn(hObject, eventdata, handles)
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201 in1 = eventdata.Modifier;
5202 in2 = eventdata.Key;
5203
5204 if ~isempty(in1)
5205 input = [in1{:} in2];
5206 else
5207 input = in2;
5208 end
5209
5210 switch input
5211
5212 case 'shiftcontrols'
5213 msgtxt = {...
5214 'VMT offers limited support for SonTek M9/S5 data.';...
5215 'SonTek RiverSurveyorLive required data format:';...
5216 ' -ENU coordinates';...
5217 ' -Desired GPS reference (BT/GGA/VTG)'
5218 '';...
5219 'Abosolutely NO GUARANTEE is made or implied that this';...
5220 'functionality will work for all cases. Results are';...
5221 'PROVISIONAL at best.'};
5222 msgbox(msgtxt, 'Hidden Functionality: Process SonTek M9', 'warn','replace')
5223
5224
5225
5226 guiparams = getappdata(handles.figure1,'guiparams');
5227 guiprefs = getappdata(handles.figure1,'guiprefs');
5228
5229
5230
5231
5232
5233 if iscell(guiprefs.mat_file)
5234 uifile = fullfile(guiprefs.mat_path,guiprefs.mat_file{1});
5235 else
5236 uifile = fullfile(guiprefs.mat_path,guiprefs.mat_file);
5237 end
5238 [filename,pathname] = ...
5239 uigetfile({'*.mat','MAT-files (*.mat)'}, ...
5240 'Select SonTek RiverSurveyor Live v3.60 MAT File', ...
5241 uifile, 'MultiSelect','on');
5242
5243 if ischar(pathname)
5244 guiparams.data_folder = pathname;
5245 if ischar(filename)
5246 filename = {filename};
5247 end
5248 guiparams.data_files = filename;
5249 guiparams.mat_file = '';
5250
5251 setappdata(handles.figure1,'guiparams',guiparams)
5252
5253
5254
5255
5256
5257 guiprefs = getappdata(handles.figure1,'guiprefs');
5258 guiprefs.ascii_path = pathname;
5259 guiprefs.ascii_file = filename;
5260 setappdata(handles.figure1,'guiprefs',guiprefs)
5261 store_prefs(handles.figure1,'ascii')
5262
5263
5264
5265 log_text = {...
5266 '';...
5267 ['%--- ' datestr(now) ' ---%'];...
5268 'Current Project Directory:';...
5269 guiparams.data_folder;
5270 'Loading the following files into memory:';...
5271 char(filename)};
5272 statusLogging(handles.LogWindow, log_text)
5273
5274
5275
5276
5277
5278 [~,~,savefile,A,z] = ...
5279 VMT_ReadFiles_SonTek(guiparams.data_folder,guiparams.data_files);
5280 guiparams.savefile = savefile;
5281 guiparams.A = A;
5282 guiparams.z = z;
5283 setappdata(handles.figure1,'guiparams',guiparams)
5284
5285
5286
5287
5288 set_enable(handles,'fileloaded')
5289 end
5290 case 'shiftcontroll'
5291 SontekMAT2KML;
5292 case 'f1'
5293 menuUsersGuide_Callback(hObject, eventdata, handles)
5294
5295 case 'controlalte'
5296 VMT_BuildCustomFlatFile;
5297 otherwise
5298
5299 end