diff --git a/TSGQC_amelioration.xls b/TSGQC_amelioration.xls
index 3aededec1253305dc644757f578c597baa9e5077..90ebe87f65f6276904ba0446e0f439ebd2d18069 100644
Binary files a/TSGQC_amelioration.xls and b/TSGQC_amelioration.xls differ
diff --git a/tsg_data/DATA_FORMAT_TSG_V1-6.nc b/tsg_data/DATA_FORMAT_TSG_V1-6.nc
index 44430545a6b479c390a6c49761841f8203673750..2ae81e21b06bea2dba3ba8c4609beeb5e8fab7e7 100644
Binary files a/tsg_data/DATA_FORMAT_TSG_V1-6.nc and b/tsg_data/DATA_FORMAT_TSG_V1-6.nc differ
diff --git a/tsg_util/corTsgLinear.m b/tsg_util/corTsgLinear.m
index e5c23758c171783b4660b47452f226b34378a091..991cd755803c4cb1980bb332efab885135099c80 100644
--- a/tsg_util/corTsgLinear.m
+++ b/tsg_util/corTsgLinear.m
@@ -4,7 +4,10 @@ function [error] = corTsgLinear(hMainFig, PARA, dateMin, dateMax)
 % 
 % Input
 % hMainFig ..... Handle to the main GUI
-% PARA ......... Parameter
+% PARA ..........Cell array
+%                   PARA{1} contains the characters (SSP, SSJT, SSTP)
+%                   PARA{2} contains either the cahracters (SSPS, SSJT, SSTP)
+%                           or (SSPS_CAL, SSJT_CAL, SSTP_CAL)
 % dateMin ...... the correction is applied between dateMin and date Max
 % dateMax ...... the correction is applied between dateMin and date Max
 %
@@ -66,10 +69,10 @@ VALUE_CHANGED = tsg.qc.hash.VALUE_CHANGED.code;
 % Intialisation
 % 01/09/2009 : intialisation to NaN
 % ---------------------------------
-if isempty( tsg.([PARA '_ADJUSTED']) )  
-  tsg.([PARA '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA)));
-  tsg.([PARA '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA '_QC'])));
-  tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA))); 
+if isempty( tsg.([PARA{1} '_ADJUSTED']) )  
+  tsg.([PARA{1} '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA{1})));
+  tsg.([PARA{1} '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA{1} '_QC'])));
+  tsg.([PARA{1} '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA{1}))); 
 end
 
 if dateMax > dateMin
@@ -77,7 +80,7 @@ if dateMax > dateMin
   % Find samples within TIME_WINDOWS with Good, probably Good, QC
   % -------------------------------------------------------------
   ind = find( tsg.DAYD_EXT    >= dateMin &  tsg.DAYD_EXT    <= dateMax &...
-    tsg.([SAMPLE '_EXT_QC']) <= PROBABLY_GOOD);
+              tsg.([SAMPLE '_EXT_QC']) <= PROBABLY_GOOD);
 
   if ~isempty(ind)
 
@@ -102,24 +105,24 @@ if dateMax > dateMin
       % ------------------------------------------------------------------------
       for icode = 1 : length( keptCode )
         dtTsg = find( tsg.DAYD    >= dateMin  & tsg.DAYD <= dateMax &...
-          tsg.([PARA '_QC']) == keptCode( icode ));
+                      tsg.([PARA{1} '_QC']) == keptCode( icode ));
 
         if ~isempty( dtTsg )
 
           % Compute the correction + the error
           % ----------------------------------
-          [tsg.([PARA '_ADJUSTED'])(dtTsg),...
-            tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg)] =...
+          [tsg.([PARA{1} '_ADJUSTED'])(dtTsg),...
+            tsg.([PARA{1} '_ADJUSTED_ERROR'])(dtTsg)] =...
                                             polyval( p, tsg.DAYD(dtTsg), S, mu);
 
           % Compute the corrected value : orignal value + correction
           % --------------------------------------------------------
-          tsg.([PARA '_ADJUSTED'])(dtTsg) =...
-                            tsg.(PARA)(dtTsg) + tsg.([PARA '_ADJUSTED'])(dtTsg);
+          tsg.([PARA{1} '_ADJUSTED'])(dtTsg) =...
+                   tsg.(PARA{2})(dtTsg) + tsg.([PARA{1} '_ADJUSTED'])(dtTsg);
 
           % Transfer the QC
           % ---------------
-          tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
+          tsg.([PARA{1} '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA{1} '_QC'])(dtTsg);
         end
       end
 
@@ -134,12 +137,12 @@ if dateMax > dateMin
       % ------------------------------------------------------------------------
       for icode = 1 : length( keptCode )
         dtTsg = find( tsg.DAYD    >= dateMin  & tsg.DAYD <= dateMax &...
-                      tsg.([PARA '_QC']) == keptCode( icode ));
+                      tsg.([PARA{1} '_QC']) == keptCode( icode ));
 
         if ~isempty( dtTsg )
-          tsg.([PARA '_ADJUSTED'])(dtTsg)       = tsg.(PARA)(dtTsg) + meanDif;
-          tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg) = meanDif / 2;
-          tsg.([PARA '_ADJUSTED_QC'])(dtTsg)    = tsg.([PARA '_QC'])(dtTsg);
+          tsg.([PARA{1} '_ADJUSTED'])(dtTsg) = tsg.(PARA{2})(dtTsg) + meanDif;
+          tsg.([PARA{1} '_ADJUSTED_ERROR'])(dtTsg) = meanDif / 2;
+          tsg.([PARA{1} '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA{1} '_QC'])(dtTsg);
         end
       end
 
@@ -148,11 +151,11 @@ if dateMax > dateMin
     % The error minimum cannot be lower than 0.01 or equal to Inf
     % -----------------------------------------------------------
     if ~isempty(ind2) && length(ind2) >= 2
-      tsg.([PARA '_ADJUSTED_ERROR'])...
-                               ( tsg.([PARA '_ADJUSTED_ERROR']) < 0.01 ) = 0.01;
+      tsg.([PARA{1} '_ADJUSTED_ERROR'])...
+                               ( tsg.([PARA{1} '_ADJUSTED_ERROR']) < 0.01 ) = 0.01;
 
-      tsg.([PARA '_ADJUSTED_ERROR'])...
-                            (isinf(tsg.([PARA '_ADJUSTED_ERROR'])) == 1) = 0.01;
+      tsg.([PARA{1} '_ADJUSTED_ERROR'])...
+                            (isinf(tsg.([PARA{1} '_ADJUSTED_ERROR'])) == 1) = 0.01;
     end
     %       end
   end
diff --git a/tsg_util/corTsgMedian.m b/tsg_util/corTsgMedian.m
index f55e7486d7a4f89752c6c76c4a9745a457610a13..401c9363eab466186ec3b1bdc6beeabd9d1aad60 100644
--- a/tsg_util/corTsgMedian.m
+++ b/tsg_util/corTsgMedian.m
@@ -6,7 +6,10 @@ function [error] = corTsgMedian(hMainFig, PARA, dateMin, dateMax)
 % 
 % Input
 % hMainFig ..... Handle to the main GUI
-% PARA ......... Parameter (SSPS, SSJT, SSTP)
+% PARA ..........Cell array
+%                   PARA{1} contains the characters (SSP, SSJT, SSTP)
+%                   PARA{2} contains either the cahracters (SSPS, SSJT, SSTP)
+%                           or (SSPS_CAL, SSJT_CAL, SSTP_CAL)
 % dateMin ...... the correction is applied between dateMin and date Max
 % dateMax ...... the correction is applied between dateMin and date Max
 %
@@ -62,10 +65,10 @@ VALUE_CHANGED = tsg.qc.hash.VALUE_CHANGED.code;
 
 % intialisation
 % -------------
-if isempty( tsg.([PARA '_ADJUSTED']) )  
-  tsg.([PARA '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA)));
-  tsg.([PARA '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA '_QC'])));
-  tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA))); 
+if isempty( tsg.([PARA{1} '_ADJUSTED']) )  
+  tsg.([PARA{1} '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA{1})));
+  tsg.([PARA{1} '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA{1} '_QC'])));
+  tsg.([PARA{1} '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA{1}))); 
 end
 
 % Create a structure with an NaN
@@ -185,13 +188,13 @@ if dateMax > dateMin
     % ----------------------------------------------------------------------
     for icode = 1 : length( keptCode )
       dtTsg = find( tsg.DAYD    >= dateMin  & tsg.DAYD <= dateMax &...
-                    tsg.([PARA '_QC']) == keptCode( icode ));
+                    tsg.([PARA{1} '_QC']) == keptCode( icode ));
 
-      tsg.([PARA '_ADJUSTED'])(dtTsg)       = tsg.(PARA)(dtTsg) + ...
+      tsg.([PARA{1} '_ADJUSTED'])(dtTsg)       = tsg.(PARA{2})(dtTsg) + ...
                                   interp1(cor.DAYD, cor.DIFF, tsg.DAYD(dtTsg));
-      tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg) = ...
+      tsg.([PARA{1} '_ADJUSTED_ERROR'])(dtTsg) = ...
                                   interp1(cor.DAYD, cor.ERROR, tsg.DAYD(dtTsg));
-      tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
+      tsg.([PARA{1} '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA{1} '_QC'])(dtTsg);
     end
         
   end
diff --git a/tsg_util/diffTsgSample.m b/tsg_util/diffTsgSample.m
index 0f4158bca0c39b94fee7158bcf3cc4bc68574016..d9a8784423944ffe657b16504901b769c0e41919 100644
--- a/tsg_util/diffTsgSample.m
+++ b/tsg_util/diffTsgSample.m
@@ -1,12 +1,22 @@
 function diffTsgSample(hMainFig, PARA)
 %
 % Co-location of sample and TSG measurements
-% Compute the sample-TSG difference
+% Compute the Sample - TSG difference
+% 
+% The TSG value is either the raw parameter either the calibrated parameter
+% depending if a calibration has been done.
+%
+% Input
+% hMainFig ........ Handle to the main GUI : TSGQC
+% PARA ............ Cell array
+%                   PARA{1} contains the characters (SSP, SSJT, SSTP)
+%                   PARA{2} contains either the cahracters (SSPS, SSJT, SSTP)
+%                           or (SSPS_CAL, SSJT_CAL, SSTP_CAL)
 %
 
 % Get the tsg and sample structures from the application
 % ------------------------------------------------------
-tsg    = getappdata( hMainFig, 'tsg_data');
+tsg = getappdata( hMainFig, 'tsg_data');
 
 % Get PROBABLY_GOOD code
 % ----------------------
@@ -16,14 +26,14 @@ defaultValueCode = tsg.qc.hash.MISSING_VALUE.code;
 % For temperature : 
 % IF PARA = 'SSJT' use 'SSTP' to get the samples
 % ----------------------------------------------
-SAMPLE = PARA;
+SAMPLE = char( PARA{1} );
 if strcmp( SAMPLE, 'SSJT')
   SAMPLE = 'SSTP';
 end
 
 % Consider only tsg data with NO_CONTROL, GOOD and PROBABLY_GOOD code
 % -------------------------------------------------------------------
-indTsg = find( tsg.([PARA '_QC']) < defaultValueCode );
+indTsg = find( tsg.([PARA{1} '_QC']) < defaultValueCode );
 
 if ~isempty( indTsg )
 
@@ -46,6 +56,7 @@ if ~isempty( indTsg )
     % Keep the smooth TSG value
     % -------------------------
     smooth = tsg_average(hMainFig, PARA, indMin);
+    
     if  timeDiff(indMin) < tsg.cst.TSG_WS_TIMEDIFF && ~isnan(smooth)
 
       % The smooth TSG time series (tsg_moveaverage) is
diff --git a/tsg_util/plot_Correction.m b/tsg_util/plot_Correction.m
index 2bab3d78a0bb97f46d698e15a907e9397b117fb5..9e766c21ad51cae3faa1440775593cedd1b5fc9a 100644
--- a/tsg_util/plot_Correction.m
+++ b/tsg_util/plot_Correction.m
@@ -1,4 +1,12 @@
 function plot_Correction( hMainFig, hPlotAxes, PARA )
+%
+% Input
+% hMainFig ........ Handle to the main GUI : TSGQC
+% hPlotAxes ....... Handle des axes
+% PARA ............ Cell array
+%                   PARA{1} contains the characters (SSP, SSJT, SSTP)
+%                   PARA{2} contains either the cahracters (SSPS, SSJT, SSTP)
+%                           or (SSPS_CAL, SSJT_CAL, SSTP_CAL)
 
 % Reinitialise plot 1 and 3
 % -------------------------
@@ -27,7 +35,7 @@ if ~isempty( tsg.([SAMPLE '_EXT']) )
   if ~isempty(indWS)
     plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD_EXT(indWS),...
               tsg.EXT_DIF(indWS), tsg.([SAMPLE '_EXT_QC'])(indWS),...
-              [PARA '_WS'],'','none','square',5);
+              [PARA{1} '_WS'],'','none','square',5);
   end
   
   % Plot other (external) samples
@@ -36,68 +44,68 @@ if ~isempty( tsg.([SAMPLE '_EXT']) )
   if ~isempty(indEXT)
     plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD_EXT(indEXT),...
               tsg.EXT_DIF(indEXT), tsg.([SAMPLE '_EXT_QC'])(indEXT),...
-              [PARA '_EXT'],'','none','o',5);
+              [PARA{1} '_EXT'],'','none','o',5);
   end
 end
 
 % Select the records CORRECTED 
 % Records corrected have an error value
 % -------------------------------------------
-iERR = find( isnan(tsg.([PARA '_ADJUSTED_ERROR'])) == 0);
+iERR = find( isnan(tsg.([PARA{1} '_ADJUSTED_ERROR'])) == 0);
 
 % Plot the difference tsg.SSPS_ADJUSTED-tsg.SSPS on axe 1
 % but only for records that were corrected using Water Sample
-% and but not corrected with the calibration coefficients.
 % -----------------------------------------------------------
 if iERR ~= 0
   plot_Tsg( hMainFig, hPlotAxes, 1,...
             tsg.DAYD(iERR),...
-            tsg.([PARA '_ADJUSTED'])(iERR)-tsg.(PARA)(iERR),...
-            [], [PARA '_ADJUSTED'],'b','none','.',1);
+            tsg.([PARA{1} '_ADJUSTED'])(iERR)-tsg.(PARA{2})(iERR),...
+            [], [PARA{1} '_ADJUSTED'],'b','none','.',1);
 end
 
 % **************************** AXE 2 ***********************************
 
-% Plot SSPS, SSJT, SSTP and SAMPLE, with code color, on axe 2
+% Plot SAMPLE and SSPS (SSJT, SSTP) with code color, on axe 2
 % -----------------------------------------------------------
-plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.(PARA), tsg.([PARA '_QC']),...
-          PARA,'','none','*',2);
-        
 if ~isempty( tsg.([SAMPLE '_EXT']) )
   ind   = 1: length( tsg.([SAMPLE '_EXT_TYPE']));
   indWS = strmatch( 'WS', tsg.([SAMPLE '_EXT_TYPE']), 'exact');
   if ~isempty(indWS)
     plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD_EXT(indWS),...
               tsg.([SAMPLE '_EXT'])(indWS), tsg.([SAMPLE '_EXT_QC'])(indWS),...
-              [PARA '_WS'],'','none','square',5);
+              [PARA{1} '_WS'],'','none','square',5);
   end
   indEXT = setxor(ind, indWS);
   if ~isempty(indEXT)
     plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD_EXT(indEXT),...
               tsg.([SAMPLE '_EXT'])(indEXT), tsg.([SAMPLE '_EXT_QC'])(indEXT),...
-              [PARA '_EXT'],'','none','o',5);
+              [PARA{1} '_EXT'],'','none','o',5);
   end
 end
 
+plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.(PARA{2}), tsg.([PARA{1} '_QC']),...
+          PARA{2},'','none','*',2);
+        
+
 % **************************** AXE 3 ***********************************
 
 % Plot SSPS, with no code, on axe3
 % --------------------------------
-plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.([PARA '_ADJUSTED']), [],...
-            [PARA '_ADJUSTED'],'r','none','*',2);
+plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.([PARA{1} '_ADJUSTED']), [],...
+          [PARA{1} '_ADJUSTED'],'r','none','*',2);
           
-plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.(PARA),...
-          [],PARA,'k','none','*',2);
+plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.(PARA{2}),...
+          [],PARA{2},'k','none','*',2);
 
 % Plot TSG_ADJUSTED + ERROR on axe 3
 % -----------------------------------
 if iERR ~= 0
   plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD(iERR),...
-          tsg.([PARA '_ADJUSTED'])(iERR) + tsg.([PARA '_ADJUSTED_ERROR'])(iERR),...
-          [], [PARA '_ADJUSTED'],'g','none','*',2);
+          tsg.([PARA{1} '_ADJUSTED'])(iERR) + tsg.([PARA{1} '_ADJUSTED_ERROR'])(iERR),...
+          [], [PARA{1} '_ADJUSTED'],'g','none','*',2);
   plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD(iERR),...
-          tsg.([PARA '_ADJUSTED'])(iERR) - tsg.([PARA '_ADJUSTED_ERROR'])(iERR),...
-          [], [PARA '_ADJUSTED'],'g','none','*',2);
+          tsg.([PARA{1} '_ADJUSTED'])(iERR) - tsg.([PARA{1} '_ADJUSTED_ERROR'])(iERR),...
+          [], [PARA{1} '_ADJUSTED'],'g','none','*',2);
 end
 
 end
diff --git a/tsg_util/tsg_average.m b/tsg_util/tsg_average.m
index 446482796ad1cea2021937922636b9656dba5909..ffe8d9eebed3041e3a160af64357b902be974bd7 100644
--- a/tsg_util/tsg_average.m
+++ b/tsg_util/tsg_average.m
@@ -6,7 +6,13 @@ function [smooth] = tsg_average(hMainFig, PARA, iTsg)
 % are not taken into account.
 %
 % Input
-% hMainFig ............ Handle to the main user interface
+% hMainFig ........ Handle to the main GUI : TSGQC
+% PARA ............ Cell array
+%                   PARA{1} contains the characters (SSP, SSJT, SSTP)
+%                   PARA{2} contains either the cahracters (SSPS, SSJT, SSTP)
+%                           or (SSPS_CAL, SSJT_CAL, SSTP_CAL)
+% iTsg ............ Indice of the TSG measurement the closest to the sample
+%                   taking into account the TSG quality code
 %
 % No computation : NaN
 %
@@ -20,7 +26,7 @@ tsg = getappdata( hMainFig, 'tsg_data');
 % ind2 : indices of tsg.PARA not rejected by the S.D. test
 % -----------------------------------------------------------------------
 ind1 = find( tsg.DAYD >= tsg.DAYD(iTsg) - tsg.cst.TSG_DT_SMOOTH/2 & ...
-  tsg.DAYD <= tsg.DAYD(iTsg) + tsg.cst.TSG_DT_SMOOTH/2 );
+             tsg.DAYD <= tsg.DAYD(iTsg) + tsg.cst.TSG_DT_SMOOTH/2 );
 
 ind2 = ind1;
 if ~isempty(ind2)
@@ -30,22 +36,22 @@ if ~isempty(ind2)
 
   % Compare Standard Deviation to the MAX acceptable STD
   % ----------------------------------------------------
-  while currentStd > tsg.([PARA '_STDMAX']) && currentStd ~= previousStd
+  while currentStd > tsg.([PARA{1} '_STDMAX']) && currentStd ~= previousStd
 
     previousStd = currentStd;
 
     % Standard deviation and average over timeInterval
     % ------------------------------------------------
-    currentStd = nanstd(  tsg.(PARA)(ind2) );
-    meanParam  = nanmean( tsg.(PARA)(ind2) );
+    currentStd = nanstd(  tsg.(PARA{2})(ind2) );
+    meanParam  = nanmean( tsg.(PARA{2})(ind2) );
 
-    % Indices of 'good' values of Param
+    % Indices of 'good' values of Para
     % ---------------------------------
-    ind2 = ind1( tsg.(PARA)(ind1) >= meanParam - currentStd & ...
-      tsg.(PARA)(ind1) <= meanParam + currentStd );
+    ind2 = ind1( tsg.(PARA{2})(ind1) >= meanParam - currentStd & ...
+                 tsg.(PARA{2})(ind1) <= meanParam + currentStd );
   end
 
-  smooth = nanmean( tsg.(PARA)(ind2) );
+  smooth = nanmean( tsg.(PARA{2})(ind2) );
 
 else
   smooth = NaN;
diff --git a/tsgqc.m b/tsgqc.m
index 6d4ba5cc1c6baafd56d1da75bc20eab2dea49015..d5c3fee8f0fa7c38fd1a6e9db65087762bf0321f 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -2384,12 +2384,7 @@ hrbInterpCancel = uicontrol( ...
     % Get the parameter we are working on (SSPS, SSJT, SSTP)
     % ------------------------------------------------------
     SAMPLE = tsg.plot.sample;
-    PARA   = tsg.plot.parameter{1};
-%     % test if _CAL variable exist
-%     % ---------------------------
-%     if ~isempty( tsg.([PARA '_CAL']) )
-%       PARA = [PARA '_CAL'];
-%     end
+    PARA = getParaCorModule( hMainFig );
 
     % Switch somme buttons
     % --------------------
@@ -2506,25 +2501,21 @@ hrbInterpCancel = uicontrol( ...
     tsg = getappdata(hMainFig, 'tsg_data');
 
     % Get parameter we are working on (SSPS, SSJT, SSTP)
-    % --------------------------------------------------
-    PARA = tsg.plot.parameter{1};
+    % or SSPS_CAL, SSJT_CAL, SSTP_CAL
+    % -------------------------------------------------
+    PARA = getParaCorModule( hMainFig );
 
     % To cancel the correction set the ADJUSTED variable
     % to []
     % --------------------------------------------------
-    tsg.([PARA '_ADJUSTED']) = [];
-    tsg.([PARA '_ADJUSTED_QC']) = [];
-    tsg.([PARA '_ADJUSTED_ERROR']) = [];
+    tsg.([PARA{1} '_ADJUSTED']) = [];
+    tsg.([PARA{1} '_ADJUSTED_QC']) = [];
+    tsg.([PARA{1} '_ADJUSTED_ERROR']) = [];
 
     % Save tsg data
     % -------------
     setappdata(hMainFig, 'tsg_data', tsg);
 
-    % Set the ADJUSTED variable either to the raw variable or to
-    % the calibrated variable
-    % ----------------------------------------------------------
-    % updateAdjustedVariable( hMainFig );
-
     % Plot in the 3 axes
     % ------------------
     plot_Correction( hMainFig, hPlotAxes, PARA );
@@ -2548,10 +2539,14 @@ hrbInterpCancel = uicontrol( ...
     dateMin = datenum(get( hetDateMin, 'String'), 'yyyy-mm-dd HH:MM:SS');
     dateMax = datenum(get( hetDateMax, 'String'), 'yyyy-mm-dd HH:MM:SS');
 
-    % Get the parameter (SSPS, SSJT, or SSTP)
-    % ---------------------------------------
+    % Get tsg application data
+    % ------------------------
     tsg    = getappdata(hMainFig, 'tsg_data');
-    PARA   = tsg.plot.parameter{1};
+    
+    % Get parameter we are working on (SSPS, SSJT, SSTP)
+    % or SSPS_CAL, SSJT_CAL, SSTP_CAL
+    % -------------------------------------------------
+    PARA = getParaCorModule( hMainFig );
     SAMPLE = tsg.plot.sample;
 
     if ~isempty( tsg.([SAMPLE '_EXT']) )
@@ -2598,10 +2593,14 @@ hrbInterpCancel = uicontrol( ...
     dateMin = datenum(get( hetDateMin, 'String'), 'yyyy-mm-dd HH:MM:SS');
     dateMax = datenum(get( hetDateMax, 'String'), 'yyyy-mm-dd HH:MM:SS');
 
-    % Get the parameter (SSPS, SSJT, or SSTP)
-    % ---------------------------------------
-    tsg    = getappdata(hMainFig, 'tsg_data');
-    PARA   = tsg.plot.parameter{1};
+    % Get tsg application data
+    % ------------------------
+    tsg = getappdata(hMainFig, 'tsg_data');
+    
+    % Get parameter we are working on (SSPS, SSJT, SSTP)
+    % or SSPS_CAL, SSJT_CAL, SSTP_CAL
+    % -------------------------------------------------
+    PARA = getParaCorModule( hMainFig );
     SAMPLE = tsg.plot.sample;
 
     if ~isempty( tsg.([SAMPLE '_EXT']) )