Skip to content

Adding overlap keyword to make_fixed_length_epochs #8773

@adam2392

Description

@adam2392

Describe the new feature or enhancement

I am trying to use time-frequency analysis that is present in mne without converting to arrays first. There is no way to do this using the Raw object, and one must convert to Epochs, with each epoch "representing" the window that will have tfr methods applied. E.g. I want to compute the multitaper FFT, and/or morlet wavelet transform to get an AverageTfr object for multiple frequency bands, alpha, beta, gamma, etc.

Normally, one would like some overlap of these windows. For example, if you do multitpaer FFT, then you usually use a sliding window with some overlap (e.g. 1 sec window with 0.5 sec step).

In https://mne.tools/stable/generated/mne.make_fixed_length_events.html#mne.make_fixed_length_events
there is an overlap keyword.

However, in make_fixed_legnth_epochs there is not.
https://mne.tools/stable/generated/mne.make_fixed_length_epochs.html#mne.make_fixed_length_epochs

Describe your proposed implementation

Is it possible to add the overlap keyword argument here?

Describe possible alternatives

I'm still not quite sure what the optimal way to apply tfr analysis to a Raw object. Obviously one can always convert to arrays, but then they lose the structure present in the mne data structures. I would prefer staying with the data structures mne has (e.g. Epochs for TFR). If what I said up there is not the optimal way to construct TFR then please let me know.

Additional comments

I can update an existing example to show this functionality off if needed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions