[Mne_analysis] stft on epoched data

Alexandre Gramfort alexandre.gramfort at inria.fr
Thu Dec 7 10:44:05 EST 2017
Search archives:

hi Davide,

what you describe is very close to what tfr_morlet does:

https://martinos.org/mne/stable/generated/mne.time_frequency.tfr_morlet.html

see for example this:

https://martinos.org/mne/stable/auto_examples/time_frequency/plot_time_frequency_simulated.html

HTH
Alex


On Thu, Dec 7, 2017 at 8:35 AM, Davide - Impulse
<Davide at impulseresearch.be> wrote:
> Dear all,
>
> I am migrating my analysis pipelines from another software to mne and I would like to test the implementation of a STFT on mne. What I would like to do is the following:
> 1) segment the raw data into epochs of interest (e.g. say -1 to 6 seconds around trigger) for the different experimental conditions
> 2) for the epoched data, take shorter time windows of e.g. 500 ms (with 250 ms overlap for consecutive windows)
> 3) multiply the short epochs with a Hamming (or Hann) window function to reduce edge artefacts
> 4) apply the FFT to the short segments to obtain power of a certain frequency band
> 5) average across windows and across epochs to obtain mean power for each specific condition
>
> What is the best way to do that in mne? I thought of combining mne with scipy and use their signal.stft on the epoched object. However, I do not think that the signal.stft works well with the structure of an epoch object. Maybe I have to transform the epoch object into an array (so that the epochs for each channel are somehow merged or concatenated)? Or do you have any better idea?
>
> Thanks in advance,
>
> Davide
> ---
> Dr. Davide Rigoni, PhD
> Impulse Research BVBA
> www.impulseresearch.be
>
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>



More information about the Mne_analysis mailing list