Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mikech76/mne-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: mikech76/mne-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: regression-notch
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 30, 2026

  1. ENH: add 'regression' method to notch_filter

    Removes line-noise sinusoids by local least-squares regression in
    overlapping windows (offset, cosine and sine at the line frequency and
    its harmonics), fitted across all picked channels at once and subtracted
    before the overlap-add. Unlike a band-stop filter this leaves
    neighbouring frequencies untouched.
    
    Measured on 64 channels x 20 min at 250 Hz: ~7x faster than
    method='spectrum_fit' with a comparable residual line amplitude, and the
    window length is exposed as a trade-off between frequency resolution and
    tracking of line-frequency drift.
    mchechin
    mchechin committed Nov 30, 2026
    Configuration menu
    Copy the full SHA
    0587742 View commit details
    Browse the repository at this point in the history
  2. MAINT: default window 5 s; add benchmark_notch.py

    mchechin
    mchechin committed Nov 30, 2026
    Configuration menu
    Copy the full SHA
    5fc9203 View commit details
    Browse the repository at this point in the history
  3. FIX: fit the offset but do not subtract it

    Removing the fitted constant shifted each window by its mean (reported by
    cbrnr for mnextend in mne-tools#21). Only the sinusoids are subtracted now.
    mchechin
    mchechin committed Nov 30, 2026
    Configuration menu
    Copy the full SHA
    88b7d0a View commit details
    Browse the repository at this point in the history
Loading