comparison m-toolbox/classes/@ao/xspec.m @ 43:bc767aaa99a8

CVS Update
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 11:09:25 +0100
parents f0afece42f48
children
comparison
equal deleted inserted replaced
0:f0afece42f48 43:bc767aaa99a8
19 % iVER - VERSION from the calling higher level script 19 % iVER - VERSION from the calling higher level script
20 % invars - invars variable from the calling higher level script 20 % invars - invars variable from the calling higher level script
21 % 21 %
22 % OUTPUTS: b - output AO 22 % OUTPUTS: b - output AO
23 % 23 %
24 % VERSION: $Id: xspec.m,v 1.61 2011/05/22 22:09:44 mauro Exp $ 24 % VERSION: $Id: xspec.m,v 1.62 2011/12/01 08:51:11 hewitson Exp $
25 % 25 %
26 % HISTORY: 30-05-2007 M Hewitson 26 % HISTORY: 30-05-2007 M Hewitson
27 % Creation 27 % Creation
28 % 28 %
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 pl = varargin{2}; 37 pl = varargin{2};
38 method = varargin{3}; 38 method = varargin{3};
39 mi = varargin{4}; 39 mi = varargin{4};
40 invars = varargin{5}; 40 invars = varargin{5};
41 41
42 VERSION = '$Id: xspec.m,v 1.61 2011/05/22 22:09:44 mauro Exp $'; 42 VERSION = '$Id: xspec.m,v 1.62 2011/12/01 08:51:11 hewitson Exp $';
43 43
44 % Set the method version string in the minfo object 44 % Set the method version string in the minfo object
45 mi.setMversion([VERSION '-->' mi.mversion]); 45 mi.setMversion([VERSION '-->' mi.mversion]);
46 46
47 %----------------- Select all AOs with time-series data 47 %----------------- Select all AOs with time-series data
131 utils.helper.msg(msg.PROC1, 'computing %s(%s -> %s)', method, invars{1}, invars{2}); 131 utils.helper.msg(msg.PROC1, 'computing %s(%s -> %s)', method, invars{1}, invars{2});
132 132
133 % -------- Make Xspec estimate 133 % -------- Make Xspec estimate
134 134
135 % Compute xspec using welch and always scale to PSD 135 % Compute xspec using welch and always scale to PSD
136 [txy, f, info, dev] = welch(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD')); 136 if usepl.find('newmethod')
137 137 [txy, f, info, dev] = ao.wosa(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD'));
138 else
139 [txy, f, info, dev] = welch(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD'));
140 end
141
138 % Keep the data shape of the first input AO 142 % Keep the data shape of the first input AO
139 if size(tsao(1).data.y,1) == 1 143 if size(tsao(1).data.y,1) == 1
140 txy = txy.'; 144 txy = txy.';
141 f = f.'; 145 f = f.';
142 dev = dev.'; 146 dev = dev.';