[FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix

Belluscio, Beth (NIH/NINDS) [E] BelluscB at ninds.nih.gov
Thu Sep 29 22:54:55 CEST 2011


Hi group-
  When I follow the instructions of the tutorial for localizing oscillatory sources using beamforming, I run into a problem calculating the cross spectral density matrix.  The tutorial does not indicate specifying the taper, and therefore ft_freqanalysis defaults to dpss.  Then I get an error message as below.  I confess ignorance that I do not understand what the code means when it says "ensure that the input arguments are double precision" so I don't know if my data structure conforms to this requirement.  My data are time segments of 100 msec in length (each for pre and post) sampled at 1200 Hz, with 73 trials.  Here are the commands I used and the error I got:


cfg = [];

cfg.method = 'mtmfft';

cfg.output = 'powandcsd';

cfg.tapsmofrq = 4;

cfg.foilim = [20 20];

test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data with 273 channels and 73 trials processing trials ??? Undefined function or method 'dpss' for input arguments of type 'double'.



Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), double(b), varargin{:});



Error in ==> ft_specest_mtmfft at 87

    tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))';



Error in ==> ft_freqanalysis at 492

        [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:},

        'feedback', fbopt);

This is specific to the dpss taper (obviously) and when I specify cfg.taper = 'hanning' the function runs fine.  I can create the CSD matrix this way, but I'd like to understand why dpss isn't working and what the requirement for double precision means.
Thanks for your help,
Beth.




Beth Belluscio MD-PhD
Clinical Fellow
Human Motor Control Section
NINDS, NIH
301-402-3495

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110929/ae4521ae/attachment.html>


More information about the fieldtrip mailing list