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

Permet d'entrer l'errezur que l'on associe au biais

parent 7921d9ba
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,11 @@ end
% Enter the bias that will be applied to PARA{1}
% ----------------------------------------------
prompt = ['Constant value to be applied to the ' PARA{1} ' time series'];
defaultValue = {'0'};
prompt = ['Constant value to be applied to the ' PARA{1} ' time series'];
a = inputdlg(prompt,'Bias Correction',1,defaultValue);
prompt = ['Error value to be applied to the ' PARA{1} ' time series'];
b = inputdlg(prompt,'Bias Error',1,defaultValue);
% everything OK
% -------------
......@@ -82,16 +84,18 @@ if ~isempty( a )
% If necessary replace a comma by a point
% ---------------------------------------
bias = regexprep(a, ',', '.');
biasError = regexprep(b, ',', '.');
% If bias not a numeric, str2doublereturn a NaN
% ------------------------------------
bias = str2double( bias );
biasError = str2double( biasError );
if isnumeric( bias ) && ~isnan( bias)
if dateMax > dateMin
if bias ~= 0
% if bias ~= 0
% The correction is applied to the TSG between dateMin and dateMax
% only to measurements with keptCode Quality Codes
......@@ -109,9 +113,9 @@ if ~isempty( a )
% --------------------------------------------------------
tsg.([PARA{1} '_ADJUSTED'])(dtTsg) = tsg.(PARA{2})(dtTsg) + bias;
% The error is put to -2
% ----------------------
tsg.([PARA{1} '_ADJUSTED_ERROR'])(dtTsg) = -1;
% Attribute an error
% ------------------
tsg.([PARA{1} '_ADJUSTED_ERROR'])(dtTsg) = biasError;
% Transfer the QC
% ---------------
......@@ -119,7 +123,7 @@ if ~isempty( a )
end
end
end
% end
% Update tsg application data
% ---------------------------
......
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