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 % % $Id$ % Get the tsg structure % --------------------- tsg = getappdata( hMainFig, 'tsg_data'); % Initialisation du popup n�1 % --------------------------- if isfield( tsg, 'SSPS' ) pop1 = { 'SSPS' }; end if isfield( tsg, 'SSJT' ) pop1 = [ pop1 {'SSJT'} ]; end if isfield( tsg, 'SSTP' ) pop1 = [ pop1 {'SSTP'} ]; end if isfield( tsg, 'LATX' ) pop1 = [ pop1 {'LATX'} ]; end if isfield( tsg, 'LONX' ) pop1 = [ pop1 {'LONX'} ]; end set( pmhPara(1), 'String', pop1, 'Value', 1 ); % Initialisation du popup n�2 - Same as pop1 % ------------------------------------------ pop2 = pop1; set( pmhPara(2), 'String', pop2, 'Value', 2 ); % Initialisation du popup n�3 % --------------------------- if isfield( tsg, 'SPDC' ) pop3 = { 'SPDC' }; end if isfield( tsg, 'CNDC' ) pop3 = [ pop3 {'CNDC'} ]; end if isfield( tsg, 'SSPS_STD' ) pop3 = [ pop3 {'SSPS_STD'} ]; end if isfield( tsg, 'FLOW' ) pop3 = [ pop3 {'FLOW' } ]; end if isfield( tsg, 'PRES' ) pop3 = [ pop3 {'PRES' } ]; 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 if isfield( tsg, 'FLU2' ) pop3 = [ pop3 {'FLU2'} ]; end set( pmhPara(3), 'String', pop3, 'Value', 1 ); % Initialise tsg.plot.parameter % ----------------------------------- if ~isempty( pop1{1} ) tsg.plot.parameter{1} = pop1{1}; else tsg.plot.parameter{1} = 'NONE'; end if ~isempty( pop2{2} ) tsg.plot.parameter{2} = pop2{2}; else tsg.plot.parameter{2} = 'NONE'; end if ~isempty( pop3{1} ) tsg.plot.parameter{3} = pop3{1}; else tsg.plot.parameter{3} = 'NONE'; end % Initialise tsg.plot.sample % 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'; end % Save the tsg structure % --------------------- setappdata( hMainFig, 'tsg_data', tsg); end