[FieldTrip] multitaper and NaN
Stan van Pelt
stan.vanpelt at fcdonders.ru.nl
Wed Jun 27 09:03:48 CEST 2012
Dear Sylvia,
If you want to keep the settings even more similar to Gould et al, you should set the cfg.foi to:
cfg.foi=2:0.5:30
which corresponds to the 0.5 Hz steps. You have to keep in mind though that since your frequency resolution is actually 2Hz (as follows from the 500ms time window you put in), smaller steps than that (such as the 0.5 Hz steps I put in here) gives you redundant information. See also the tutorial at http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis.
Best, Stan
----- Oorspronkelijk bericht -----
> Van: "Conrado Bosman" <conrado.bosman at gmail.com>
> Aan: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> Verzonden: Dinsdag 26 juni 2012 18:41:46
> Onderwerp: Re: [FieldTrip] multitaper and NaN
> Dear Silvia,
>
> The cfg.t_ftimwin parameter sets your current windows of analysis. In
> your actual configuration, you are using a pretty much similar wavelet
> approach in which your time window changes according to the frequency
> increase. Then your first time window is 5/2 = 2.5 sec which is bigger
> than your actual trial length (1.2 sec). Thats the reason why you get
> only NaNs in your low-frequency analyses and also a boundary of NaNs
> in the subsequent analyses.
> It is recommended to use in case of lower frequencies just one taper
> approach, unless you have several seconds of signal to analyze.
> Reading carefully, the Gould et al. suggestion goes in that direction.
> They said that they're using a .5 s window Ther (Rayleigh) frequency
> of resolution of this analysis is 1/0.5 = 2 Hz, which is precisely
> what they described. So,according to this, I suggest you to use the
> following parameters:
>
> cfg = [];
> cfg.output = 'pow';
> cfg.channel = 'EEG';
> cfg.method = 'mtmconvol';
> cfg.foi = 2:2:30;
> numfoi = length(cfg.foi)
> cfg.timwin = ones(1,numfoi).*0.5;
> cfg.tapsmofrq = ones(1,numfoi).*2;
> cfg.taper = 'hanning';
>
> Best,
> Conrado
>
>
> On Jun 26, 2012, at 6:04 PM, Silvia Pagano wrote:
>
> > Dear list subscribers,
> >
> > I am an ERPer looking for the first time into the world of
> > time-frequency analysis. I am trying to perform some multitaper
> > analysis on a data set. Ideally I would like to perform similar
> > analysis as described in a paper by Gould et al (2011) on Journal of
> > Neurophysiology. (i.e. in their own words "Time-frequency analysis
> > was performed on
> > all epochs using a multitaper approach (2–30 Hz, 0.5-Hz steps,
> > 500-ms temporal smoothing window, 2-Hz frequency resolution)" )
> >
> > I have epochs from -1100 ms to 100 time locked to the stimulus onset
> > and I am trying to replicate the analysis they did. The problem is
> > that I got boundary effects on all my conditions, namely I obtain
> > NaN in the extreme 100 ms of the time window for all frequencies and
> > for very low frequencies (e.g. 2-4Hz) I have no data in the whole
> > time window. I thought I had time windows large enough to avoid
> > boundary effects, however there must be something I am missing in my
> > code.
> >
> > Here's what I did following the tutorial:
> >
> > cfg = [];
> > cfg.output = 'pow';
> > cfg.channel = 'EEG';
> > cfg.method = 'mtmconvol';
> > cfg.foi = 2:2:30;
> > cfg.t_ftimwin = 5./cfg.foi;
> > cfg.tapsmofrq = 0.4*cfg.foi;
> > cfg.toi = -1.1:0.02:0.1;
> > cfg.pad = 'maxperlen';
> > TFRmult = ft_freqanalysis(cfg, data);
> >
> >
> > Does anyone have a clue on this?
> >
> >
> > Thank you very much
> >
> > Silvia
> > --
> > __________________________________
> >
> > Silvia Pagano PhD student
> > CIMeC - Center for Mind/Brain Science
> > Corso Bettini, 31 38068 Rovereto (TN)
> > Tel. +39 0464 808709
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Stan van Pelt
Donders Institute for Brain, Cognition and Behaviour, Radboud University Nijmegen
Kapittelweg 29, 6525 EN Nijmegen, Netherlands
E-mail: stan.vanpelt at donders.ru.nl
Website: www.ru.nl/donders/
Phone: (+31) (0)24 36 10981
Fax: (+31) (0)24 36 10989
More information about the fieldtrip
mailing list