mne-tools / mne-tools/mne-python

Implementation of stft() function as stft_array and tfr_stft

Open
#8,880 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ENH
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Describe the new feature or enhancement

Currently stft operates on arrays, but is not the same API as wavelet, stockwell and multitaper. In addition, it does not have a tfr_stft analog , which operates on mne-python data structures.

The proposed PR would refactor stft to be named stft_array and have similar API to the tfr_array functions, and also implement an analogous tfr_stft function.

See discourse discussion with @drammock: https://mne.discourse.group/t/is-there-a-way-to-obtain-the-time-points-from-time-frequency-stft/2682

The stft is a nice function since it is super fast, and can operate on Raw object data within seconds.

Describe your proposed implementation

Tbd

Additional comments

related: https://github.com/mne-tools/mne-python/pull/8781. If this is accepted, then one can use tfr_stft to compute spectrograms of the data for certain frequency bands (e.g. gamma power shown as channels X time over a whole Raw dataset).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing stft implementation and the tfr_array APIs, then compare the related pull request #8781 and the linked Discourse discussion. Define the scope for renaming stft to stft_array and adding tfr_stft for MNE-Python data structures; done means both APIs are implemented consistently and the requested Raw-data spectrogram use case is supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.