[Mne_analysis] n_fft option for tfr_array_stockwell {Disarmed}
Alexandre Gramfort
alexandre.gramfort at inria.fr
Sun Dec 20 12:06:20 EST 2020
External Email - Use Caution
hi Paul,
can you share a full code snippet?
Nt and time_length not defined
Alex
On Sat, Dec 19, 2020 at 9:42 PM Paul Fishback <fishbacp at mail.gvsu.edu>
wrote:
> External Email - Use Caution
>
> Hello,
>
> I'm interested in computing the Stockwell Transform of a simple univariate
> time series. Because I already use MNE, I thought I'd perform this task
> with the aid of the
> tfr_array_stockwell command. However, I'm having a problem changing the
> window length, n_fft.
>
> As a simple "toy example," here's a chirp signal, where the frequency
> decreases linearly from 12.5 to 2.5 Hz over a 10 second period:
>
> from scipy.signal import chirp
> from mne.time_frequency import tfr_array_stockwell
>
> t = np.linspace(0, 10, 5001)
> w = chirp(t, f0=12.5, f1=2.5, t1=10, method='linear')
> y = np.expand_dims(w, axis=[0,1]) # Add dimensions to signal in order to
> make a valid input for tfr_array_stockwell
>
> fmin = 0
> fmax = 25
> Fs = int(np.ceil(Nt/time_length))
> st_power, itc, freqs=tfr_array_stockwell(y,sfreq=Fs,fmin=fmin,fmax=fmax)
>
> This works fine and the plotted results look great, but I do receive a
> warning message indicating zero padding is being used. This is because the
> signal length (5001)
> is less than the default n_fft, which is 8192 in my case. (Since
> 2^(12)=4096 < 5001 < 2^(13)=8192 )
>
> However, if I change the default n_fft to something else, e.g. insert
> n_fft=500 above, I still receive the same warning message.
>
> Perhaps I'm missing something simple?
>
> Thanks
>
> Paul Fishback
> --
> Professor of Mathematics, Grand Valley State University
> Past-President, Pi Mu Epsilon National Honorary Mathematics Society, Inc.
>
> Department of Mathematics (MAK C-2-408)
> Grand Valley State University
> 1 Campus Dr.
> Allendale, MI 49401
> fishbacp at mail.gvsu.edu
> 616.331.2040
> 616.331.3120 (fax)
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1M4CbzTtCaJem1lx1U0buS9f1c2izKtbTjVFnrbjB0yPGi90XuU1Z5zbH7fAswJDcFljz4nDFhhWdKbqEcuR5SoCem1UyfXaKE-shx-JV4-lWrS1HL6eh8opMdufAMu0eO3z895xxr9vmgvNQClV-Rsi0DHYSf5fpW22GZbfJLPXPzfJjpHZB0JXycCZwjO4lHoIoqa-TwctE2IbhjzWXmpQZpxM2Yq3Ur1j_cifW1UHMNXxoIbVqgFtXv07-6Nd2_shMG3tHtbjFhbzfyYuLxA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201220/76cc63be/attachment.html
More information about the Mne_analysis
mailing list