Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TSG QC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
TSG QC
Commits
31f706a8
Commit
31f706a8
authored
11 years ago
by
Yves Gouriou
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsg_util/corTsgBias.m
+10
-6
10 additions, 6 deletions
tsg_util/corTsgBias.m
with
10 additions
and
6 deletions
tsg_util/corTsgBias.m
+
10
−
6
View file @
31f706a8
...
...
@@ -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
% ---------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment