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
f3956747
Commit
f3956747
authored
17 years ago
by
Yves Gouriou
Browse files
Options
Downloads
Patches
Plain Diff
Gestion des valeurs Calibrées et Corrigées
parent
509980ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tsg_util/automaticQC.m
+1
-1
1 addition, 1 deletion
tsg_util/automaticQC.m
tsg_util/plot_Correction.m
+54
-32
54 additions, 32 deletions
tsg_util/plot_Correction.m
with
55 additions
and
33 deletions
tsg_util/automaticQC.m
+
1
−
1
View file @
f3956747
...
...
@@ -32,7 +32,7 @@ difDate = diff( tsg.DAYD );
ind
=
find
(
difDate
<
0
)
+
1
;
while
~
isempty
(
ind
)
if
~
isempty
(
tsg
.
DAYD
);
tsg
.
DAYD
(
ind
)
=
[];
end
;
if
~
isempty
(
tsg
.
DATE
);
tsg
.
DATE
(
ind
,
:)
=
[];
end
;
if
~
isempty
(
tsg
.
DATE
);
tsg
.
DATE
(
ind
,
:)
=
[];
end
;
if
~
isempty
(
tsg
.
LATX
);
tsg
.
LATX
(
ind
)
=
[];
end
;
if
~
isempty
(
tsg
.
LONX
);
tsg
.
LONX
(
ind
)
=
[];
end
;
if
~
isempty
(
tsg
.
SSPS
);
tsg
.
SSPS
(
ind
)
=
[];
end
;
...
...
This diff is collapsed.
Click to expand it.
tsg_util/plot_Correction.m
+
54
−
32
View file @
f3956747
...
...
@@ -9,41 +9,62 @@ erase_Line( hPlotAxes, 3 );
% Get tsg application data
% ------------------------
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
% Get the code for VALUE_CHANGED
% ------------------------------
VALUE_CHANGED
=
get
(
tsg
.
qc
.
hash
,
'VALUE_CHANGED'
,
'code'
);
% **************************** AXE 1 ***********************************
% Plot the samples
% ----------------
if
~
isempty
(
tsg
.
SSPS_SPL
)
ind
=
find
(
tsg
.
SSPS_SPL_TYPE
==
1
);
if
~
isempty
(
ind
)
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
tsg
.
DAYD_SPL
(
ind
),
...
tsg
.
SSPS_SPL_DIF
(
ind
),
tsg
.
SSPS_SPL_QC
(
ind
),
...
% Plot bucket samples
% -------------------
iWS
=
find
(
tsg
.
SSPS_SPL_TYPE
==
1
);
if
~
isempty
(
iWS
)
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
tsg
.
DAYD_SPL
(
iWS
),
...
tsg
.
SSPS_SPL_DIF
(
iWS
),
tsg
.
SSPS_SPL_QC
(
iWS
),
...
'SSPS_SPL_1'
,
''
,
'none'
,
'square'
,
5
);
end
ind
=
find
(
tsg
.
SSPS_SPL_TYPE
>
1
);
if
~
isempty
(
ind
)
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
tsg
.
DAYD_SPL
(
ind
),
...
tsg
.
SSPS_SPL_DIF
(
ind
),
tsg
.
SSPS_SPL_QC
(
ind
),
...
% Plot other (external) samples
% -----------------------------
iEXT
=
find
(
tsg
.
SSPS_SPL_TYPE
>
1
);
if
~
isempty
(
iEXT
)
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
tsg
.
DAYD_SPL
(
iEXT
),
...
tsg
.
SSPS_SPL_DIF
(
iEXT
),
tsg
.
SSPS_SPL_QC
(
iEXT
),
...
'SSPS_SPL_2'
,
''
,
'none'
,
'o'
,
5
);
end
end
% Get the code for VALUE_CHANGED
% ------------------------------
VALUE_CHANGED
=
get
(
tsg
.
qc
.
hash
,
'VALUE_CHANGED'
,
'code'
);
% Select the record with VALUE_CHANGED code
% -----------------------------------------
indVC
=
find
(
tsg
.
SSPS_ADJUSTED_QC
==
VALUE_CHANGED
);
iVC
=
find
(
tsg
.
SSPS_ADJUSTED_QC
==
VALUE_CHANGED
);
% Select only records corrected but not calibrated.
% Records corrected and calibrated have the same QC code.
% Records corrected have an error value
% ------------------------------------------------------
iERR
=
[];
if
iVC
~=
0
iERR
=
find
(
isnan
(
tsg
.
SSPS_ADJUSTED_ERROR
(
iVC
)
)
==
0
);
end
% Plot the difference tsg.SSPS_ADJUSTED-tsg.SSPS on axe 1
% but only for records that were corrected using Water Sample
% and not corrected with the calibration coefficients
% -------------------------------------------------------
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
...
tsg
.
DAYD
(
indVC
),
tsg
.
SSPS_ADJUSTED
(
indVC
)
-
tsg
.
SSPS
(
indVC
),
...
[],
'SSPS_ADJUSTED'
,
'b'
,
'none'
,
'.'
,
1
);
% and but not corrected with the calibration coefficients.
% -----------------------------------------------------------
if
iERR
~=
0
plot_Tsg
(
hMainFig
,
hPlotAxes
,
1
,
...
tsg
.
DAYD
(
iVC
(
iERR
)),
...
tsg
.
SSPS_ADJUSTED
(
iVC
(
iERR
))
-
tsg
.
SSPS
(
iVC
(
iERR
)),
...
[],
'SSPS_ADJUSTED'
,
'b'
,
'none'
,
'.'
,
1
);
end
% **************************** AXE 2 ***********************************
% Plot SSPS and SAMPLE, with code color, on axe 2
% ------------------------------------------------
plot_Tsg
(
hMainFig
,
hPlotAxes
,
2
,
tsg
.
DAYD
,
tsg
.
SSPS
,
tsg
.
SSPS_QC
,
...
...
...
@@ -64,24 +85,25 @@ if ~isempty( tsg.SSPS_SPL )
end
end
% **************************** AXE 3 ***********************************
% Plot SSPS, with no code, on axe3
% --------------------------------
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
,
tsg
.
SSPS_ADJUSTED
,
[],
...
'SSPS_ADJUSTED'
,
'r'
,
'none'
,
'*'
,
1
);
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
,
tsg
.
SSPS
,
...
[],
'SSPS'
,
'k'
,
'none'
,
'
.
'
,
1
);
[],
'SSPS'
,
'k'
,
'none'
,
'
*
'
,
1
);
% Plot TSG_ADJUSTED + ERROR on axe 3
% -----------------------------------
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
(
indVC
),
...
tsg
.
SSPS_ADJUSTED
(
indVC
)
+
tsg
.
SSPS_ADJUSTED_ERROR
(
indVC
),
...
[],
'SSPS_ADJUSTED'
,
'g'
,
'none'
,
'.'
,
1
);
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
(
indVC
),
...
tsg
.
SSPS_ADJUSTED
(
indVC
)
-
tsg
.
SSPS_ADJUSTED_ERROR
(
indVC
),
...
[],
'SSPS_ADJUSTED'
,
'g'
,
'none'
,
'.'
,
1
);
% Plot SSPS_ADJUSTED on axe 3
% ---------------------------
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
...
tsg
.
DAYD
(
indVC
),
tsg
.
SSPS_ADJUSTED
(
indVC
),
[],
...
'SSPS_ADJUSTED'
,
'r'
,
'none'
,
'.'
,
3
);
if
iERR
~=
0
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
(
iVC
(
iERR
)),
...
tsg
.
SSPS_ADJUSTED
(
iVC
(
iERR
))
+
tsg
.
SSPS_ADJUSTED_ERROR
(
iVC
(
iERR
)),
...
[],
'SSPS_ADJUSTED'
,
'g'
,
'none'
,
'*'
,
1
);
plot_Tsg
(
hMainFig
,
hPlotAxes
,
3
,
tsg
.
DAYD
(
iVC
(
iERR
)),
...
tsg
.
SSPS_ADJUSTED
(
iVC
(
iERR
))
-
tsg
.
SSPS_ADJUSTED_ERROR
(
iVC
(
iERR
)),
...
[],
'SSPS_ADJUSTED'
,
'g'
,
'none'
,
'*'
,
1
);
end
end
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