Home > classes > @ssm > ssmFromBuiltinSystem.m

ssmFromBuiltinSystem

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function ss = ssmFromBuiltinSystem(pli) %#ok

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 FUNCTION:    ssmFromBuiltinSystem

 DESCRIPTION: Construct a statespace model from one of the built-in
              systems.

 CALL:        see ssm

 PARAMETER:

 VERSION:     $Id: ssmFromBuiltinSystem.m,v 1.30 2008/08/19 17:35:20 adrien Exp $

 HISTORY:     15-04-2008 Hewitson
              Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %
0003 % FUNCTION:    ssmFromBuiltinSystem
0004 %
0005 % DESCRIPTION: Construct a statespace model from one of the built-in
0006 %              systems.
0007 %
0008 % CALL:        see ssm
0009 %
0010 % PARAMETER:
0011 %
0012 % VERSION:     $Id: ssmFromBuiltinSystem.m,v 1.30 2008/08/19 17:35:20 adrien Exp $
0013 %
0014 % HISTORY:     15-04-2008 Hewitson
0015 %              Creation
0016 %
0017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0018 function ss = ssmFromBuiltinSystem(pli) %#ok<INUSL>
0019 utils.helper.msg(utils.const.msg.MNAME, ['running ', mfilename]);
0020 
0021 % Get default params
0022 pl = combine(pli, ssm.getDefaultPlist('From Built-in Model'));
0023 
0024 % Check the filename and extension
0025 system = find(pl, 'Built-in');
0026 
0027 
0028 modelNames = {...
0029     'LPF Dynamics' ...
0030     'LPF Dynamics no params'...
0031     'MPS' ...
0032     'TM Actuation' ...
0033     'TM Actuation cross-coupled' ...
0034     'Star Tracker Readout' ...
0035     'Inertial Sensor Readout' ...
0036     'Inertial Sensor Readout cross-coupled' ...
0037     'Interferometer Readout'...
0038     'Interferometer Readout cross-coupled'...
0039     'NSF Solar Pressure' ...
0040     'NSF Infrared Disturbance' ...
0041     'NSF TM Actuation Disturbance' ...
0042     'NSF TM Disturbance' ...
0043     'NSF TM-SC Disturbance' ...
0044     'NSF Interferometer Disturbance' ...
0045     'NSF Star Tracker Disturbance' ...
0046     'NSF Inertial Sensor Disturbance' ...
0047     'Delay Star Tracker Readout' ...
0048     'Delay Inertial Sensor Readout' ...
0049     'Delay Interferometer Readout' ...
0050     'Testcase No Params'...
0051     'Testcase Params'...
0052     'DFACS 1 Normal Mode' ...
0053     'DFACS 2 Science Mode 1 M3' ...
0054     'DFACS 3 Science Mode 2 M1 Transition' ...
0055     'DFACS 4 Science Mode 2 M1 Performance' ...
0056     'DFACS 5 Science Mode 1 All Optical Readouts' ...
0057    };
0058 functionNames = {...
0059     'model_LPF_Dynamics' ...
0060     'model_LPF_Dynamics_noparams'...
0061     'model_MPS' ...
0062     'model_TMActuation' ...
0063     'model_TMActuation_xcpl' ...
0064     'model_ST_readout' ...
0065     'model_IS_readout' ...
0066     'model_IS_readout_xcpl' ...
0067     'model_Interferometer_readout'...
0068     'model_Interferometer_readout_xcpl'...
0069     'model_NSF_solar' ...
0070     'model_NSF_infrared' ...
0071     'model_NSF_TMActuation' ...
0072     'model_NSF_TM' ...
0073     'model_NSF_TM_SC' ...
0074     'model_NSF_Interferometer_readout' ...
0075     'model_NSF_ST_readout' ...
0076     'model_NSF_IS_readout' ...
0077     'model_delay_ST_readout' ...
0078     'model_delay_IS_readout' ...
0079     'model_delay_Ifo_readout' ...
0080     'model_standard_system_noparams'...
0081     'model_standard_system_params'...
0082     'model_DFACS_1_Normal_Mode'  ...
0083     'model_DFACS_2_Science_Mode_1_M3' ...
0084     'model_DFACS_3_Science_Mode_2_M1_Transition' ...
0085     'model_DFACS_4_Science_Mode_2_M1_Performance' ...
0086     'model_DFACS_5_Science_Mode_1_All_Optical_Readouts' ...
0087    };
0088 isFound = 0;
0089 for Names = [modelNames ; functionNames]
0090     if isequal(Names{1},system)
0091         utils.helper.msg(utils.const.msg.MNAME, ...
0092           ['building system ',Names{1},' from function ',Names{2}, '.m']);
0093         [ss,VERSIONss] = eval(['ssm.' Names{2}]);
0094         isFound = 1;
0095     end
0096 end
0097 if ~isFound
0098     display(['###    error : unknown system name in field ''Built-in''     ###' ]);
0099     display(['       Building option : ''', system,'''' ]);
0100     display(['### does not belong to the possibilities in the list below ###' ]);
0101     display(char(modelNames));
0102     error('(see above message ^^)');
0103 end
0104 
0105 % set the plist and history
0106 ss.addHistory(ssm.getInfo('ssm', 'From Built-in Model'), pli, {''}, []);
0107 
0108 
0109 
0110 
0111 end

Generated on Mon 25-Aug-2008 22:39:29 by m2html © 2003