diff --git a/TSGQC_amelioration.xls b/TSGQC_amelioration.xls index 3b9811e7c6d2646e27b419db8c2f1e36ace78246..8e374c8e4c63ad05bdff1eeac8cf3a00612d3f2e 100644 Binary files a/TSGQC_amelioration.xls and b/TSGQC_amelioration.xls differ diff --git a/tsg_util/plot_Validation.m b/tsg_util/plot_Validation.m index 63ce1321d8b0f2c9ffbfaf46758ff78179d4ad20..20d7f0ca7a13f3a95ff0d845478742e10540640c 100644 --- a/tsg_util/plot_Validation.m +++ b/tsg_util/plot_Validation.m @@ -46,8 +46,13 @@ switch nPlot erase_Line( hPlotAxes, 2 ); if ~isempty( tsg.(PARA) ) - plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.(PARA), [],... - PARA,'k','none','*',2); +% if ~isempty( tsg.([PARA '_QC']) ) + plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.(PARA),... + tsg.([PARA '_QC']),PARA,'','none','*',2); +% else +% plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.(PARA),... +% [],PARA,'k','none','*',2); +% end end % --------------------------------------------------------------------- diff --git a/tsg_util/quitProgram.m b/tsg_util/quitProgram.m index 8ac15c130aa28e5940f58d1ee19ce32d320581cc..cc754a8b64d6b73610fa7db0335e7143cfe8957f 100644 --- a/tsg_util/quitProgram.m +++ b/tsg_util/quitProgram.m @@ -1,4 +1,4 @@ -function quitProgram(hMainFig, DEFAULT_PATH_FILE) +function quitProgram(hMainFig, hMapPanel, DEFAULT_PATH_FILE) % QUITPROGRAM Exit tsgqc_GUI application % % Input @@ -14,6 +14,7 @@ function quitProgram(hMainFig, DEFAULT_PATH_FILE) % close the main windows % ---------------------- delete(hMainFig); +delete(hMapPanel); % reset userdata property of root Matalab object (0) for next use % --------------------------------------------------------------- diff --git a/tsgqc.m b/tsgqc.m index cb11f3ee0687376c2941c97a600d6d0a344a5481..60122ee9cac6e4b718940c16a72e8fd34f0171ab 100644 --- a/tsgqc.m +++ b/tsgqc.m @@ -616,12 +616,32 @@ hPlotAxes(3) = axes('Parent', hPlotsPanel, 'Visible', 'off',... 'box', 'on', 'Units', 'normalized', 'Tag', 'TAG_AXES_3', ... 'HandleVisibility','on', 'Position',[.05, .02, .93, .27]); + % The map will be plot in a uipanel -hMapPanel = uipanel( ... - 'Parent', hMainFig, ... - 'Units', 'normalized', ... - 'Visible', 'off', ... - 'Position',[0.15, 0, .85, .58]); +% --------------------------------- +% hMapPanel = uipanel( ... +% 'Parent', hMainFig, ... +% 'Units', 'normalized', ... +% 'Visible', 'off', ... +% 'Position',[0.15, 0, .85, .58]); + +% The map will be plot a new figure +% --------------------------------- +hMapPanel = figure(... + 'BackingStore','off',... + 'Name', 'TSG MAP FIGURE', ... + 'NumberTitle', 'off', ... + 'Resize', 'on', ... + 'Menubar','none', ... + 'Toolbar', 'none', ... + 'Tag', 'MAP_FIGURE', ... + 'Visible','off',... + 'WindowStyle', 'normal', ... + 'CloseRequestFcn', @QuitMapCallback,... + 'Units', 'normalized',... + 'Position',[0.17, 0.05, .8, .44],... + 'Color', get(0, 'DefaultUIControlBackgroundColor')); + hPlotAxes(4) = axes(... % the axes for plotting ship track map 'Parent', hMapPanel, ... 'Units', 'normalized', ... @@ -1157,7 +1177,7 @@ end set( hpCalCoef, 'Visible', 'off' ); set( hpDateLimit, 'Visible', 'off' ); set( hpInterpPos, 'Visible', 'off' ); - set( hMapPanel, 'Visible', 'off' ); +% set( hMapPanel, 'Visible', 'off' ); % set( hbgParameter, 'Visible', 'off'); % Toggle button @@ -1168,7 +1188,7 @@ end set( hInterpToggletool, 'state', 'off' ); set( hPanToggletool, 'state', 'off' ); set( hQCToggletool, 'state', 'off' ); - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); set( hTimelimitToggletool, 'state', 'off' ); % set( hZoomToggletool, 'state', 'off' ); @@ -1716,7 +1736,7 @@ end % Hide the map. Otherwise it slows down the zooming % ------------------------------------------------- - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); % returns a zoom mode object for the figure hMainFig handle % --------------------------------------------------------- @@ -1732,7 +1752,7 @@ end % Disallows a zoom operation on the MAP axes objects % -------------------------------------------------- - setAllowAxesZoom(hZoom, hPlotAxes(4), false); +% setAllowAxesZoom(hZoom, hPlotAxes(4), false); % turns on interactive zooming (same effect than zoom on) but prevent % side effect on another figure @@ -1775,7 +1795,7 @@ end % Hide the map. Otherwise it slows down the zooming % ------------------------------------------------- - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); % returns a zoom mode object for the figure hMainFig handle % --------------------------------------------------------- @@ -1787,7 +1807,7 @@ end % Disallows a zoom operation on the MAP axes objects % -------------------------------------------------- - setAllowAxesZoom(hZoom, hPlotAxes(4), false); +% setAllowAxesZoom(hZoom, hPlotAxes(4), false); % turns on interactive zooming (same effect than zoom on) but prevent % side effect on another figure @@ -1832,7 +1852,7 @@ end % Hide the map. Otherwise it slows down the panning % ------------------------------------------------- - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); % Returns a pan mode object for the figure handle % ----------------------------------------------- @@ -1840,7 +1860,7 @@ end % Disallows a pan operation on the MAP axes objects % -------------------------------------------------- - setAllowAxesPan(hPan, hPlotAxes(4), false); +% setAllowAxesPan(hPan, hPlotAxes(4), false); % turns on interactive pan (same effect than pan on) but prevent % side effect on another figure @@ -1882,6 +1902,12 @@ end set(hPlotAxes(iaxe), 'XTickMode', 'auto') datetick(hPlotAxes(iaxe), 'x', 'keeplimits') end + + % Re-draw the map once the zoom/pan is off + % ---------------------------------------- + erase_Line( hPlotAxes, 4 ); + plot_map( hMainFig, hPlotAxes); + end %% QC_OnMenuCallback ............................... Quality Control Module @@ -2388,7 +2414,7 @@ end set( hZoomInToggletool, 'state', 'off', 'enable', 'on' ); set( hZoomOutToggletool, 'state', 'off', 'enable', 'on' ); set( hPanToggletool, 'state', 'off' ); - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); set( hClimToggletool, 'state', 'off', 'enable', 'off'); set( hCalToggletool, 'enable', 'off' ); set( hInterpToggletool, 'enable', 'off' ); @@ -2439,7 +2465,7 @@ end set( hZoomInToggletool, 'state', 'off' ); set( hZoomOutToggletool, 'state', 'off' ); set( hPanToggletool, 'state', 'off' ); - set( hMapToggletool, 'state', 'off' ); +% set( hMapToggletool, 'state', 'off' ); set( hClimToggletool, 'enable', 'on'); set( hCalToggletool, 'enable', 'on' ); set( hInterpToggletool, 'enable', 'on' ); @@ -2900,7 +2926,7 @@ end plot_Calibration( hMainFig, hPlot, 1, 'SSPS' ); plot_Calibration( hMainFig, hPlot, 2, 'SSJT' ); plot_Calibration( hMainFig, hPlot, 3, 'SSTP' ); - elseif strcmp(get(hMapToggletool,'state'), 'on') +% elseif strcmp(get(hMapToggletool,'state'), 'on') % plot_map( hMainFig, hPlot) elseif strcmp(get(hInterpToggletool,'state'), 'on') plot_Interpolation( hMainFig, hPlot, 1 ); @@ -3144,6 +3170,19 @@ end end +%% QuitMapCallback + % ----------------------------------------------------------------- + % Callback function run when the Quit Map Figure item is selected + % ----------------------------------------------------------------- + function QuitMapCallback(hObject, eventdata) + + % Make the earth map invisible + % ---------------------------- + set(hMapPanel, 'Visible', 'off' ); + set( hMapToggletool, 'state', 'off' ); + + end + %% QuitMenuCallback % ----------------------------------------------------------------- % Callback function run when the Quit menu item is selected @@ -3181,7 +3220,7 @@ end % quit program % ------------ - quitProgram(hMainFig, DEFAULT_PATH_FILE); + quitProgram(hMainFig, hMapPanel, DEFAULT_PATH_FILE); else selection = ... @@ -3191,7 +3230,7 @@ end if strcmp(selection, 'No') return; else - quitProgram(hMainFig, DEFAULT_PATH_FILE); + quitProgram(hMainFig, hMapPanel, DEFAULT_PATH_FILE); end end