mne-tools / mne-tools/mne-python

Incorporate Moving Window Average for mne.time_frequency.EpochsTFR

Open
#11,319 5 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

I wish MNE to incorporate a method of taking a moving window average of spectral power wrt time.

A methodology of choice, used by multiple researchers, goes roughly:

  1. Sample frequencies either linearly or logarithmically at finite intervals between a range.
  2. Add a buffer on both sides of the data to prevent edge effects.
  3. Use the Morlet wavelet transform to find spectral power as a function of time.
  4. Down-sample power values by taking a moving average across small-time windows and slide the window at a particular rate.

Current MNE functions allow (1), (2), and (3) but not (4).

Describe your proposed implementation

This averaging method can be added to the mne.time_frequency.EpochsTFR class.

Describe possible alternatives

None.

Additional context

No response

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 at the mne.time_frequency.EpochsTFR class and read its existing time-frequency and spectral-power methods. Define how frequency sampling, edge buffers, moving-window size, and slide rate should interact; done means EpochsTFR supports the requested moving average and down-samples power over time as described.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.