Skip to content
Snippets Groups Projects
tsg_initialisation.m 1.98 KiB
Newer Older
function tsg_initialisation(hTsgGUI, hQcCmenu)
%
% Input
% -----
% hTsgGUI ............ Handel to the main user interface
% hQcCmenu ........... Handel to the QC code context menu
%

% *************************************************************************
%              Constants for the quality control procedure

% Quality Code and color

qc.Color.NO_CONTROL    = 'k';
qc.Color.GOOD          = 'b';
qc.Color.PROBABLY_GOOD = 'g';
qc.Color.PROBABLY_BAD  = 'm';
qc.Color.BAD           = 'r';

qc.Code.NO_CONTROL     = 1;
qc.Code.GOOD           = 2;
qc.Code.PROBABLY_GOOD  = 3;
qc.Code.PROBABLY_BAD   = 4;
qc.Code.BAD            = 5;

% Store default value 'quality' a application data
% ------------------------------------------------
quality.Code  = qc.Code.GOOD;
quality.Color = qc.Color.GOOD;
set( hQcCmenu, 'UserData', quality );

% Store the 'qc' structure as application data
% --------------------------------------------
setappdata( hTsgGUI, 'qcColor', qc);


% *************************************************************************
%              Constants for the Correction procedure

% Smoothing of tsg time series over 1 hour interval
% 1 hour interval expressed in MATLAB serial Number
% -------------------------------------------------
cst.TSG_DT_SMOOTH = datenum(0, 0, 0, 1, 0 , 0);

% Smoothing of tsg time series :
% Salinity, in one 1 hour interval, should not depart the average for more
% than SAL_STD_MAX standard deviation
% -----------------------------------------------------------------------

% Correction is estimated by computing the median value of X tsg-sample
% differences
% Amount of days used to compute the correction
% ---------------------------------------------------------------------

% store the 'const' structure as an application data
% --------------------------------------------------