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.
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.