mne-tools / mne-tools/mne-python

mne.filter.notch_filter default notch_widths too low?

Open
#13,103 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello,
when applying a notch filter to EEG data without setting the notch width (stop band width), the default is frequencies / 200. For typical 50 Hz line noise, this results in 0.25 Hz, which appears very narrow. The attached plot shows that the result is not satisfactory.
I think it would be better to set a fixed band width, e.g. 1 Hz for all frequencies.
What do you think?
Sophie

Image

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.filter.notch_filter entry point and inspect how the default notch_widths value is derived when no width is supplied. Compare the current 50 Hz behavior with a fixed 1 Hz stop-band width, then establish the accepted default and add coverage for the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.