[Mne_analysis] sampling rate and time frequency analysis

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Sat Nov 24 05:33:38 EST 2018
Search archives:

        External Email - Use Caution        

Hi!

Can you share the full code that starts with the raw data (or a minimal working example)? Note that you also set decim=3 in tfr_morlet, which should also influence the length of the result.

Clemens


From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> On Behalf Of Veda Hung
Sent: Wednesday, 21 November 2018 09:55
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Subject: [Mne_analysis] sampling rate and time frequency analysis


        External Email - Use Caution
Hi MNE experts,

I conducted time frequency analysis on resampled MEG data (from 1000Hz to 500 Hz) with the following parameters. the length of epoch is between -2s to 12s.
n_cycles = 6
freqs = np.arange(4., 100., 1.)
power= tfr_morlet(epoch, freqs=freqs, n_cycles=n_cycles, use_fft=True, decim=3,n_jobs=1,average=False,return_itc=False)

The length of the resulting power is  2334. However, I expect that the length should be 14*500/6, which is 1667, where 14 is the total length of epoch, 500 is sampling rate and 6 is the number of cycle. It seems that the sampling rate is still 1000, rather than the new sampling rate (500). I am pretty sure that I resampled the data before time frequency analysis. Anyone has a clue why the length of the power from tfr_morlet does not respect the length of the epoch. Thanks.

Best,
Veda




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181124/ab5cdbad/attachment-0001.html 


More information about the Mne_analysis mailing list