[FieldTrip] integer frequencies in TFR
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Fri May 6 20:50:52 CEST 2016
Hi José,
The frequencies that are returned are constrained by the intrinsic frequency resolution of your epochs. Since your epochs are 3.3 seconds long, FT will round to the nearest attainable frequencies, quantized at 1./3.3. You can use cfg.pad for spectral interpolation. This parameter is the length (in s) until which the data are padded with 0’s, prior to the FFT.
In this case, I suggest to use cfg.pad = 4.
Best,
Jan-Mathijs
On 04 May 2016, at 19:30, Jose <joseluisblues at gmail.com<mailto:joseluisblues at gmail.com>> wrote:
dear list,
I'm analysing CTF MEG data (sampling rate 1250 Hz).
I'm epoching my data from -0.5 sec to 2.8 sec relative my marker of interest.
% define the trial matrix
trlFile = zeros(length(markers3), 3);
for i_trial = 1:length(markers3)
trlFile(i_trial,1) = markers3(i_trial,2) -625; % 0.5*1250 % SR = 1250,
trlFile(i_trial,2) = markers3(i_trial,2) +3500; % 2.8*1250 % SR = 1250,
trlFile(i_trial,3) = -625;
trlFile(i_trial,4) = markers3(i_trial,1);
end
Once I pre-process the data, I run TF analyses with the wavelet method
cfg = [ ];
cfg.trials = find(data2.trialinfo(:,1) == i_condition);
cfg.channel = 'MEG';
cfg.method = 'wavelet';
cfg.width = 5;
cfg.output = 'pow';
cfg.foi = 1:1:30;
cfg.toi = -0.5:0.05:2.8;
TFdata = ft_freqanalysis(cfg, data1);
In the .freq field I realize that my frequency are not exact integers
0.907801418439716 2.11820330969267 3.02600472813239 3.93380614657210 5.14420803782506 6.05200945626478 6.95981087470449 7.86761229314421 9.07801418439716 9.98581560283688 ...
I checked:
http://www.fieldtriptoolbox.org/faq/why_am_i_not_getting_exact_integer_frequencies
So, I decide to reduce one sample in my trial definition (so trlFile(i_trial,2) = markers3(i_trial,2) +3500-1; % 2.8*1250 % SR = 1250,)
But, still I'm not having integers,
0.909090909090909 2.12121212121212 3.03030303030303 3.93939393939394 5.15151515151515 6.06060606060606 6.96969696969697 7.87878787878788 9.09090909090909 10 ...
I suspect I can't obtain integer frequencies in my TFR due to my frequency sampling,
Is there any recommendation regarding the frequencies used to compute the TFRs?
Would that pose some issues for subsequent processing steps?
thanks
Jose
<https://sites.google.com/site/joseluisulloafulgeri/>
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160506/84e0bd80/attachment.html>
More information about the fieldtrip
mailing list