Questions on freqanalysis
a.stolk@fcdonders.ru.nl
a.stolk at FCDONDERS.RU.NL
Sun Feb 14 12:16:24 CET 2010
Hi Feng,
ft_freqanalysis; method mtmconvol can be considered as a frequency estimation shifting over time (in your case: -0.15 til 1.35 seconds). More specifically, every 0.05 seconds it makes an estimation of the powerspectrum. In order to so, one needs a certain timewindow to base the estimation on. The larger the timewindow, the better the estimation as one then averages over more cycles.
You can either specify your timewindow with a steady length or let it be a function of the frequency. You chose the latter, which is fine. But when we consider timepoint "-0.15", frequency "5", and window "7 cycles"; the timewindow is 7 * 1/5 (5 hertz) = 1400 ms. At timepoint -0.15, this ranges from 700 ms before (-0.85 s) until 700 ms after. However, your data begins at -0.2 s and an estimation, therefore, can not be performed for this timepoint (-0.15 s) resulting in a NaN.
You'll need to adjust one or more of the parameter settings (according to what is written above), or export more data from eeglab (with offsets), or live with the NaN's (they're displayed in white in ft_singleplotTFR). Also check out the TFR section in fieldtrip's tutorial section.
Best,
Arjen
----- Original Message -----
From: "gao zai" <zaifengg at GMAIL.COM>
To: FIELDTRIP at NIC.SURFNET.NL
Sent: Sunday, February 14, 2010 11:16:31 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: [FIELDTRIP] Questions on freqanalysis
Dear all,
I am now trying to do the frequencyanalysis in Fieldtrip. Since the data is
analyzed in EEGlab before, thus I first convert the data from EEGlab to
Fieldtrip using eeglab2fieldtrip: *data = eeglab2fieldtrip(EEG,
'preprocessing' )*. The data was epoched from -200 ms to 1400ms time-locked
to the onset of the stimuli.
Then I run the following scripts:
cfg = [];
cfg.output = 'pow';
cfg.method = 'mtmconvol';
cfg.taper = 'hanning';
cfg.foi = 5:1:30;
cfg.t_ftimwin = 7./cfg.foi; % 7 cycles per time window
cfg.toi = -0.15:0.05:1.35; % to reduce boundary effects
TFRhann = freqanalysis(cfg, data);
However, part of the result in TFRhann.*powspctrm* is *NaN*. And I didn't
see any problem in the parameters I use. I wonder whether someone can give
me some suggestions to fix it? Many thanks.
Best,
Feng
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
More information about the fieldtrip
mailing list