You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
your minimum frequency is too low. 6 cycles at 1 Hz is longer than your
signal given the way the Morlet wavelet is clipped temporally.
Message ID: ***@***.***>
Ah, I was assuming that at lowest (1 Hz), 7 cycles equate to 7s of signal!
It appears that the minimum length, as obtained from len([mne.time_frequency.morlet(1000, np.arange(1, 50, 1), n_cycles=7.0)][0][0]) = 11141 Maybe, the error message can be a bit more suggestive in mentioning the maximum wave number feasible given the current choice of wave number, min freq, and time sample?
Activity
welcome commentedon Apr 23, 2023
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
agramfort commentedon Apr 23, 2023
RainyMeadows commentedon Apr 23, 2023
Ah, I was assuming that at lowest (1 Hz), 7 cycles equate to 7s of signal!
It appears that the minimum length, as obtained from
len([mne.time_frequency.morlet(1000, np.arange(1, 50, 1), n_cycles=7.0)][0][0])=11141Maybe, the error message can be a bit more suggestive in mentioning the maximum wave number feasible given the current choice of wave number, min freq, and time sample?agramfort commentedon Apr 24, 2023
RainyMeadows commentedon Apr 24, 2023
See my (edited) comment; l I did take a look!
agramfort commentedon Apr 25, 2023
@RainyMeadows would you be up for submitting a PR to update our doc? that would be much appreciated. thanks
drammock commentedon Apr 25, 2023
@RainyMeadows In the code there's a comment that I think would resolve your confusion:
mne-python/mne/time_frequency/tfr.py
Lines 153 to 155 in 57f5ce3
In other words, the wavelet will always be
10 * sigma - 1samples long (after convertingsigmainto a number of samples rather than seconds).(If
sigmaisn't specified it defaults ton_cycles / (2.0 * np.pi * f))Add note on Morlet wavelet length