diff 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
line wrap: on
line diff
--- a/m-toolbox/classes/@ao/xspec.m	Wed Nov 23 19:22:13 2011 +0100
+++ b/m-toolbox/classes/@ao/xspec.m	Tue Dec 06 11:09:25 2011 +0100
@@ -21,7 +21,7 @@
 %
 % OUTPUTS:     b  - output AO
 %
-% VERSION:     $Id: xspec.m,v 1.61 2011/05/22 22:09:44 mauro Exp $
+% VERSION:     $Id: xspec.m,v 1.62 2011/12/01 08:51:11 hewitson Exp $
 %
 % HISTORY:     30-05-2007 M Hewitson
 %                 Creation
@@ -39,7 +39,7 @@
   mi     = varargin{4};
   invars = varargin{5};
 
-  VERSION  = '$Id: xspec.m,v 1.61 2011/05/22 22:09:44 mauro Exp $';
+  VERSION  = '$Id: xspec.m,v 1.62 2011/12/01 08:51:11 hewitson Exp $';
 
   % Set the method version string in the minfo object
   mi.setMversion([VERSION '-->' mi.mversion]);
@@ -133,8 +133,12 @@
   % -------- Make Xspec estimate
 
   % Compute xspec using welch and always scale to PSD
-  [txy, f, info, dev] = welch(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD'));
-
+  if usepl.find('newmethod')
+    [txy, f, info, dev] = ao.wosa(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD'));
+  else
+    [txy, f, info, dev] = welch(tsao(1), tsao(2), method, usepl.pset('Scale', 'PSD'));
+  end
+  
   % Keep the data shape of the first input AO
   if size(tsao(1).data.y,1) == 1
     txy = txy.';