Home > classes > @ao > mdc1_input_noises.m

mdc1_input_noises

PURPOSE ^

LTPDA_MDC1_IFO_NOISE returns a model spectrum of the IFO sensing noise for MDC1.

SYNOPSIS ^

function varargout = mdc1_input_noises(varargin)

DESCRIPTION ^

 LTPDA_MDC1_IFO_NOISE returns a model spectrum of the IFO sensing noise for MDC1.

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

 DESCRIPTION: LTPDA_MDC1_IFO_NOISE returns a model spectrum of the IFO
              sensing noise for MDC1.

 CALL:        b = ltpda_mdc1_ifo_noise(pl)

 PARAMETERS:
 
           'source'   - Choose source of noise [default: 'ifo']
                        'ifo' - IFO sensing noise [m^2/Hz]
                        'sc'  - Spacecraft force noise [m^4s^{-2}/Hz]
                        'tm'  - Test-mass force noise [m^4s^{-2}/Hz]
           'f'        - a vector of frequencies [default: 1]
    or
           'f1'       - start frequency [default: 1e-6]
           'f2'       - stop frequency  [default: 5]
           'nf'       - number of frequency points [default: 1000]
           'scale'    - frequency spacing, 'lin' or 'log' [default: 'log']
 
 VERSION:     $Id: mdc1_input_noises.m,v 1.3 2008/09/05 11:05:29 ingo Exp $

 The following call returns a parameter list object that contains the
 default parameter values:

 >> pl = ltpda_mdc1_ifo_noise(ao, 'Params')

 The following call returns a string that contains the routine CVS version:

 >> version = ltpda_mdc1_ifo_noise(ao,'Version')

 The following call returns a string that contains the routine category:

 >> category = ltpda_mdc1_ifo_noise(ao,'Category')

 HISTORY: 11-04-08 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Check if this is a call for parameters

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001     % LTPDA_MDC1_IFO_NOISE returns a model spectrum of the IFO sensing noise for MDC1.
0002     %
0003     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004     %
0005     % DESCRIPTION: LTPDA_MDC1_IFO_NOISE returns a model spectrum of the IFO
0006     %              sensing noise for MDC1.
0007     %
0008     % CALL:        b = ltpda_mdc1_ifo_noise(pl)
0009     %
0010     % PARAMETERS:
0011     %
0012     %           'source'   - Choose source of noise [default: 'ifo']
0013     %                        'ifo' - IFO sensing noise [m^2/Hz]
0014     %                        'sc'  - Spacecraft force noise [m^4s^{-2}/Hz]
0015     %                        'tm'  - Test-mass force noise [m^4s^{-2}/Hz]
0016     %           'f'        - a vector of frequencies [default: 1]
0017     %    or
0018     %           'f1'       - start frequency [default: 1e-6]
0019     %           'f2'       - stop frequency  [default: 5]
0020     %           'nf'       - number of frequency points [default: 1000]
0021     %           'scale'    - frequency spacing, 'lin' or 'log' [default: 'log']
0022     %
0023     % VERSION:     $Id: mdc1_input_noises.m,v 1.3 2008/09/05 11:05:29 ingo Exp $
0024     %
0025     % The following call returns a parameter list object that contains the
0026     % default parameter values:
0027     %
0028     % >> pl = ltpda_mdc1_ifo_noise(ao, 'Params')
0029     %
0030     % The following call returns a string that contains the routine CVS version:
0031     %
0032     % >> version = ltpda_mdc1_ifo_noise(ao,'Version')
0033     %
0034     % The following call returns a string that contains the routine category:
0035     %
0036     % >> category = ltpda_mdc1_ifo_noise(ao,'Category')
0037     %
0038     % HISTORY: 11-04-08 M Hewitson
0039     %             Creation
0040     %
0041     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0042     function varargout = mdc1_input_noises(varargin)
0043     %%% Check if this is a call for parameters
0044       if utils.helper.isinfocall(varargin{:})
0045         varargout{1} = getInfo(varargin{3});
0046         return
0047       end
0048 
0049       %%% Collect input variable names
0050       in_names = cell(size(varargin));
0051       for ii = 1:nargin,in_names{ii} = inputname(ii);end
0052 
0053       pli             = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0054 
0055       %%% Decide on a deep copy or a modify
0056       %%% REMARK: If you create a new AO (call the constructor) then
0057       %%%         it is not necessay to copy the input-AOs !!!!!!!!!!!!!!!!!!!!!!!!!
0058 
0059 
0060       %%% Combine plists
0061       pl = combine(pli, getDefaultPlist('Range'));
0062 
0063 
0064 
0065     %% Extract parameters from plist
0066 
0067     f = find(pl, 'f');
0068     if isempty(f)
0069       f1    = find(pl, 'f1');
0070       f2    = find(pl, 'f2');
0071       nf    = find(pl, 'nf');
0072       scale = find(pl, 'scale');
0073 
0074       switch scale
0075         case 'lin'
0076           f   = linspace(f1, f2, nf);
0077         case 'log'
0078           f = logspace(log10(f1), log10(f2), nf);
0079       end
0080     end
0081 
0082     source = find(pl, 'source');
0083 
0084     %% Compute response for frequencies f
0085 
0086     switch source
0087       case 'ifo'
0088         a = getIfoNoise(f);
0089       case 'tm'
0090         a = getTMNoise(f);
0091       case 'sc'
0092         a = getSCNoise(f);
0093       otherwise
0094         error('### Unknown noise source requested.');
0095     end
0096 
0097     varargout{1} = a;
0098     end
0099     %--------------------------------------------------------------------------
0100     % Get IFO noise for each frequency
0101     function o = getIfoNoise(f)
0102 
0103       % Description of the noise
0104       fcn = '0.5*(5e-12)^2 * ( 1 + (1+1e8)./(1+f.^2/1e-12) .* (1 + (1+9e6)./(1+f.^2/1e-14) ))';
0105       % Pack in a plist
0106       pl  = plist('fsfcn', fcn, 'f', f);
0107 
0108       % Build AO from plist
0109       o = ao(pl);
0110       o.setName('o_nxx', 'internal');
0111       o.setXunits('Hz', 'internal');
0112       o.setYunits('m^2/Hz', 'internal');
0113     end
0114     %--------------------------------------------------------------------------
0115     % Get SC noise for each frequency
0116     function o = getSCNoise(f)
0117 
0118       % Zeros as constant factors
0119       z1 = 1 + (10e-3/1e-6)^2;
0120       z2 = 1 + (0.1e-3/0.1e-6)^2;
0121       % AOs for frequency-dependent parts
0122       p1 = ao(plist('fsfcn', '1 + (f./100).^2', 'f', f));
0123       p2 = ao(plist('fsfcn', '1 + (f/1e-6).^2', 'f', f));
0124       p3 = ao(plist('fsfcn', '1 + (f/0.1e-6).^2', 'f', f));
0125 
0126       % Combine the parts
0127       G = (0.1e-6/436)^2;
0128       o = G .* (1./p1 + (z1./p2).*(1 + z2./p3 ));
0129 
0130       % Set properties of final AO
0131       o.setName('A_nxx', 'internal');
0132       o.setXunits('Hz', 'internal');
0133       o.setYunits('m^2s^{-4}/ Hz', 'internal');
0134 
0135     end
0136     %--------------------------------------------------------------------------
0137     % Get TM noise for each frequency
0138     function o = getTMNoise(f)
0139 
0140       % Construct the various parts of the spectrum
0141 
0142       % zeros
0143       z1 = ao(plist('fsfcn', '(1 + (f./100).^2)', 'f', f));
0144       z2 = (1 + (3e-3/1e-6).^2);
0145       z3 = ao(plist('fsfcn', '(1 + (f./1e-6).^2)', 'f', f));
0146       z4 = (1 + (0.1e-3./0.1e-6).^2);
0147       z5 = ao(plist('fsfcn', '(1 + (f./0.1e-6).^2)', 'f', f));
0148 
0149       % poles
0150       p1 = (1 + (1e-3./100).^2);
0151       p2 = (1 + (3e-3./1e-6).^2);
0152       p3 = (1 + (1e-3./1e-6).^2);
0153       p4 = (1 + (0.1e-3./0.1e-6).^2);
0154       p5 = (1 + (1e-3./0.1e-6).^2);
0155 
0156       % Combine the parts
0157       o = (30e-15)^2 .* ( (1./z1 + z2./z3.*(1 + z4./z5))  ./ (1./p1 + p2./p3.*(1 + p4./p5)));
0158 
0159       % Set properties of final AO
0160       o.setName('A_1xx', 'internal');
0161       o.setXunits('Hz', 'internal');
0162       o.setYunits('m^2s^{-4}/ Hz', 'internal');
0163 
0164     end
0165     %% Default parameters
0166     function plo = getDefaultPlist(varargin)
0167       % List of available parameter sets
0168       sets = {'List', 'Range'};
0169       if nargin == 0
0170         plo = sets;
0171         return
0172       end
0173       set = varargin{1};
0174       switch set
0175         case 'List'
0176           plo = plist('source', 'ifo', 'f', [1]);
0177         case 'Range'
0178           plo = plist('source', 'ifo', ...
0179                       'f1', 1e-6,...
0180                       'f2', 5,...
0181                       'nf', 1000,...                
0182                       'scale', 'log');
0183         otherwise
0184           plo = plist();
0185         end
0186     end
0187 
0188     %--------------------------------------------------------------------------
0189     function ii = getInfo(varargin)
0190       if nargin == 1 && strcmpi(varargin{1}, 'None')
0191         sets = {};
0192         pl   = [];
0193       else
0194         sets = {'Default'};
0195         pl   = getDefaultPlist;
0196       end
0197       % Build info object
0198       ii = minfo(mfilename, 'ao', '', utils.const.categories.mdc01, '$Id: mdc1_input_noises.m,v 1.3 2008/09/05 11:05:29 ingo Exp $', sets, pl);
0199     end

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003