Newer
Older
function error = initParameterChoice( hMainFig, pmhPara )
%
% Initialise the 3 popup menu used to choose the parameters that will be
% plot on figure 1, 2 and 3
% Get the tsg structure
% ---------------------
tsg = getappdata( hMainFig, 'tsg_data');
% Initialisation du popup n1
% ---------------------------
if isfield( tsg, 'SSPS' )
pop1 = { 'SSPS' };
end
if isfield( tsg, 'SSJT' )
pop1 = [ pop1 {'SSJT'} ];
end
if isfield( tsg, 'SSTP' )
pop1 = [ pop1 {'SSTP'} ];
end
set( pmhPara(1), 'String', pop1, 'Value', 1 );
% Initialisation du popup n2 - Same as pop1
% ------------------------------------------
pop2 = pop1;
set( pmhPara(2), 'String', pop2, 'Value', 2 );
% Initialisation du popup n3
% ---------------------------
if isfield( tsg, 'SPDC' )
pop3 = { 'SPDC' };
end
if isfield( tsg, 'CNDC' )
pop3 = [ pop3 {'CNDC'} ];
end
if isfield( tsg, 'LATX' )
pop3 = [ pop3 {'LATX'} ];
end
if isfield( tsg, 'LONX' )
pop3 = [ pop3 {'LONX'} ];
end
if isfield( tsg, 'SSPS' )
pop3 = [ pop3 {'SSPS'} ];
end
if isfield( tsg, 'SSJT' )
pop3 = [ pop3 {'SSJT'} ];
end
if isfield( tsg, 'SSTP' )
pop3 = [ pop3 {'SSTP'} ];
end
set( pmhPara(3), 'String', pop3, 'Value', 1 );
% -----------------------------------
if ~isempty( pop1{1} )
end
if ~isempty( pop2{2} )
if ~isempty( pop3{1} )
% We need this variable because the validation of SSJT can only be
% made with SSTP sample.
% ----------------------------------------------------------------
tsg.plot.sample = pop1{1};
if strcmp( tsg.plot.sample, 'SSJT' )
tsg.plot.sample = 'SSTP';
% Save the tsg structure
% ---------------------
setappdata( hMainFig, 'tsg_data', tsg);
end