Skip to content
Snippets Groups Projects
Commit 53412c4d authored by gael.alory_legos.obs-mip.fr's avatar gael.alory_legos.obs-mip.fr
Browse files

fix issue #1, Samples do not display with harbor code

parent 2221df7c
No related branches found
No related tags found
No related merge requests found
......@@ -26,10 +26,12 @@ errDif = 0;
% ------------------------------------------------------
tsg = getappdata( hMainFig, 'tsg_data');
% Get PROBABLY_GOOD code
% ----------------------
% Get QC codes
% ------------
probablyGoodCode = tsg.qc.hash.PROBABLY_GOOD.code;
defaultValueCode = tsg.qc.hash.MISSING_VALUE.code;
GoodCode = tsg.qc.hash.GOOD.code;
harbourCode = tsg.qc.hash.HARBOUR.code;
noControlCode = tsg.qc.hash.NO_CONTROL.code;
% For temperature :
% IF PARA = 'SSJT' use 'SSTP' to get the samples
......@@ -39,9 +41,12 @@ if strcmp( SAMPLE, 'SSJT')
SAMPLE = 'SSTP';
end
% Consider only tsg data with NO_CONTROL, GOOD and PROBABLY_GOOD code
% -------------------------------------------------------------------
indTsg = find( tsg.([PARA{1} '_QC']) <= probablyGoodCode );
% Consider only tsg data with NO_CONTROL, HARBOUR, GOOD or PROBABLY_GOOD code
% ---------------------------------------------------------------------------
indTsg = find( tsg.([PARA{1} '_QC']) == probablyGoodCode | ...
tsg.([PARA{1} '_QC']) == GoodCode | ...
tsg.([PARA{1} '_QC']) == harbourCode | ...
tsg.([PARA{1} '_QC']) == noControlCode);
if ~isempty( indTsg )
......
......@@ -22,9 +22,12 @@ function [smooth] = tsg_average(hMainFig, PARA, iTsg)
% ------------------------------------------
tsg = getappdata( hMainFig, 'tsg_data');
% Get PROBABLY_GOOD code
% ----------------------
% Get QC codes
% ------------
probablyGoodCode = tsg.qc.hash.PROBABLY_GOOD.code;
GoodCode = tsg.qc.hash.GOOD.code;
harbourCode = tsg.qc.hash.HARBOUR.code;
noControlCode = tsg.qc.hash.NO_CONTROL.code;
% Select the param data over 'tsg.cst.TSG_DT_SMOOTH' time interval
% taking into account the TSG quality code
......@@ -33,7 +36,10 @@ probablyGoodCode = tsg.qc.hash.PROBABLY_GOOD.code;
% -----------------------------------------------------------------------
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.([PARA{1} '_QC']) <= probablyGoodCode);
(tsg.([PARA{1} '_QC']) == probablyGoodCode | ...
tsg.([PARA{1} '_QC']) == GoodCode | ...
tsg.([PARA{1} '_QC']) == harbourCode | ...
tsg.([PARA{1} '_QC']) == noControlCode));
ind2 = ind1;
if ~isempty(ind2)
......
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