Skip to content
Snippets Groups Projects
Commit ff253b83 authored by Yves Gouriou's avatar Yves Gouriou
Browse files

Variables ADJUSTED

Ces variables ne contiennent plus que des données ayant été corrigées via le module de correction.
Les données n'ayant pas été corrigées sont mises à NaN dans ces variables ADJUSTED
parent b60e6942
No related branches found
No related tags found
No related merge requests found
...@@ -48,4 +48,33 @@ must be the same. ...@@ -48,4 +48,33 @@ must be the same.
Error in ==> tsgqc>Cal_OffMenuCallback at 1603 Error in ==> tsgqc>Cal_OffMenuCallback at 1603
tsg.CNDC_LINCOEF(1) = str2num(get( hetCalCNDCSlope, 'String')); tsg.CNDC_LINCOEF(1) = str2num(get( hetCalCNDCSlope, 'String'));
9/01/2009
---------
The name of the directory cannot be identical to the name of the program.
It cannot be named 'tsgqc'. Otherwise there is a problem to get the
directory of the program. See the following lines :
fulltsgqcname = mfilename('fullpath');
DEFAULT_PATH_FILE = strrep(fulltsgqcname, tsgqcname, '') ;
9/01/2009
---------
La touche CANCEL the calibration rend les variables _CAL
EMPTY.
En fait si à l'ouverture du fichier une vzariable CAL existe,
que l'on veuille plusieurs tests et revenir à la variable _CAL
intiale ce n'est pas possible. La réinitialisation est sévère !
IL faut 2 boutons :
1 - BACK -One step backward
2 - CANCEL - Empties the varaibalbe _CAL
9/01/2009
---------
The correction is applied on SSPS, SSJT, SSTP data but not
on _CAL data
...@@ -57,17 +57,13 @@ PROBABLY_GOOD = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code'); ...@@ -57,17 +57,13 @@ PROBABLY_GOOD = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code');
PROBABLY_BAD = get(tsg.qc.hash, 'PROBABLY_BAD', 'code'); PROBABLY_BAD = get(tsg.qc.hash, 'PROBABLY_BAD', 'code');
VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code'); VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code');
% intialisation % Intialisation
% ------------- % 01/09/2009 : intialisation to NaN
% ---------------------------------
if isempty( tsg.([PARA '_ADJUSTED']) ) if isempty( tsg.([PARA '_ADJUSTED']) )
tsg.([PARA '_ADJUSTED']) = tsg.(PARA); tsg.([PARA '_ADJUSTED']) = NaN*ones(size(tsg.(PARA)));
tsg.([PARA '_ADJUSTED_QC']) = tsg.([PARA '_QC']); tsg.([PARA '_ADJUSTED_QC']) = NaN*ones(size(tsg.([PARA '_QC'])));
end tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA)));
% If only calibration have been applied ERROR is empty
% ---------------------------------------------------
if isempty( tsg.([PARA '_ADJUSTED_ERROR']) )
tsg.([PARA '_ADJUSTED_ERROR']) = NaN* ones(size(tsg.(PARA)));
end end
if dateMax > dateMin if dateMax > dateMin
...@@ -96,8 +92,8 @@ if dateMax > dateMin ...@@ -96,8 +92,8 @@ if dateMax > dateMin
[p, S, mu] = polyfit( X, Y, 1); [p, S, mu] = polyfit( X, Y, 1);
% The correction is applied to the TSG between dateMin and dateMax using % The correction is applied to the TSG between dateMin and dateMax using
% a linear interpolation only on measurements better than % a linear interpolation only on measurements with keptCode Quality
% PROBABLY_BAD QC % Codes
% ---------------------------------------------------------------------- % ----------------------------------------------------------------------
for icode = 1 : length( keptCode ) for icode = 1 : length( keptCode )
dtTsg = find( tsg.DAYD >= dateMin & tsg.DAYD <= dateMax &... dtTsg = find( tsg.DAYD >= dateMin & tsg.DAYD <= dateMax &...
...@@ -109,6 +105,7 @@ if dateMax > dateMin ...@@ -109,6 +105,7 @@ if dateMax > dateMin
polyval( p, tsg.DAYD(dtTsg), S, mu); polyval( p, tsg.DAYD(dtTsg), S, mu);
tsg.([PARA '_ADJUSTED'])(dtTsg) = ... tsg.([PARA '_ADJUSTED'])(dtTsg) = ...
tsg.(PARA)(dtTsg) + tsg.([PARA '_ADJUSTED'])(dtTsg); tsg.(PARA)(dtTsg) + tsg.([PARA '_ADJUSTED'])(dtTsg);
tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
% The error is maximum, equal to 1, if the median is computed with % The error is maximum, equal to 1, if the median is computed with
% less than 4 samples % less than 4 samples
......
...@@ -66,13 +66,9 @@ VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code'); ...@@ -66,13 +66,9 @@ VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code');
% intialisation % intialisation
% ------------- % -------------
if isempty( tsg.([PARA '_ADJUSTED']) ) if isempty( tsg.([PARA '_ADJUSTED']) )
tsg.([PARA '_ADJUSTED']) = tsg.(PARA); tsg.([PARA '_ADJUSTED']) = NaN*ones(size(tsg.(PARA)));
tsg.([PARA '_ADJUSTED_QC']) = tsg.([PARA '_QC']); tsg.([PARA '_ADJUSTED_QC']) = NaN*ones(size(tsg.([PARA '_QC'])));
end tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA)));
% If only calibration have been applied ERROR is empty
% ---------------------------------------------------
if isempty( tsg.([PARA '_ADJUSTED_ERROR']) )
tsg.([PARA '_ADJUSTED_ERROR']) = NaN* ones(size(tsg.(PARA)));
end end
% Create a structure with an NaN % Create a structure with an NaN
...@@ -198,6 +194,7 @@ if dateMax > dateMin ...@@ -198,6 +194,7 @@ if dateMax > dateMin
interp1(cor.DAYD, cor.DIFF, tsg.DAYD(dtTsg)); interp1(cor.DAYD, cor.DIFF, tsg.DAYD(dtTsg));
tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg) = ... tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg) = ...
interp1(cor.DAYD, cor.ERROR, tsg.DAYD(dtTsg)); interp1(cor.DAYD, cor.ERROR, tsg.DAYD(dtTsg));
tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
end end
end end
......
...@@ -13,6 +13,7 @@ tsg = getappdata( hMainFig, 'tsg_data'); ...@@ -13,6 +13,7 @@ tsg = getappdata( hMainFig, 'tsg_data');
probablyGoodCode = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code'); probablyGoodCode = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code');
missingValueCode = get(tsg.qc.hash, 'MISSING_VALUE', 'code'); missingValueCode = get(tsg.qc.hash, 'MISSING_VALUE', 'code');
% For temperature :
% IF PARA = 'SSJT' use 'SSTP' to get the samples % IF PARA = 'SSJT' use 'SSTP' to get the samples
% ---------------------------------------------- % ----------------------------------------------
SAMPLE = PARA; SAMPLE = PARA;
......
...@@ -1547,8 +1547,7 @@ end ...@@ -1547,8 +1547,7 @@ end
set( hTimelimitToggletool, 'state', 'off', 'enable', 'off' ); set( hTimelimitToggletool, 'state', 'off', 'enable', 'off' );
set( hZoomInToggletool, 'state', 'off', 'enable', 'on' ); set( hZoomInToggletool, 'state', 'off', 'enable', 'on' );
set( hZoomOutToggletool, 'state', 'off', 'enable', 'on' ); set( hZoomOutToggletool, 'state', 'off', 'enable', 'on' );
% Get tsg application data % Get tsg application data
% ------------------------ % ------------------------
tsg = getappdata( hMainFig, 'tsg_data' ); tsg = getappdata( hMainFig, 'tsg_data' );
...@@ -1647,7 +1646,7 @@ end ...@@ -1647,7 +1646,7 @@ end
% Update the Adjusted variables (SSPS - SSJT) with calibrated records % Update the Adjusted variables (SSPS - SSJT) with calibrated records
% ------------------------------------------------------------------- % -------------------------------------------------------------------
updateAdjustedVariable( hMainFig ); % updateAdjustedVariable( hMainFig );
% Refresh plot #1 % Refresh plot #1
% --------------- % ---------------
...@@ -1682,7 +1681,7 @@ end ...@@ -1682,7 +1681,7 @@ end
% Update the Adjusted variables % Update the Adjusted variables
% ----------------------------- % -----------------------------
updateAdjustedVariable( hMainFig ); % updateAdjustedVariable( hMainFig );
% Refresh plot #1 % Refresh plot #1
% --------------- % ---------------
...@@ -2494,9 +2493,11 @@ end ...@@ -2494,9 +2493,11 @@ end
% -------------------------------------------------- % --------------------------------------------------
PARA = tsg.preference.parameter{1}; PARA = tsg.preference.parameter{1};
% To cancel the correction set the ERROR to [] then % To cancel the correction set the ADJUSTED variable
% call updateAdjustedVariable. % to []
% -------------------------------------------------- % --------------------------------------------------
tsg.([PARA '_ADJUSTED']) = [];
tsg.([PARA '_ADJUSTED_QC']) = [];
tsg.([PARA '_ADJUSTED_ERROR']) = []; tsg.([PARA '_ADJUSTED_ERROR']) = [];
% Save tsg data % Save tsg data
...@@ -2506,7 +2507,7 @@ end ...@@ -2506,7 +2507,7 @@ end
% Set the ADJUSTED variable either to the raw variable or to % Set the ADJUSTED variable either to the raw variable or to
% the calibrated variable % the calibrated variable
% ---------------------------------------------------------- % ----------------------------------------------------------
updateAdjustedVariable( hMainFig ); % updateAdjustedVariable( hMainFig );
% Plot in the 3 axes % Plot in the 3 axes
% ------------------ % ------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment