mne_denoise.dss.denoisers.SmoothingBias#

class mne_denoise.dss.denoisers.SmoothingBias(window: int = 10, iterations: int = 1)[source]#

Unified temporal smoothing bias (Moving Average).

Uses a boxcar moving average filter to smooth the data.”

Parameters:
  • window (int) – Smoothing window size in samples. Note: If you want to cancel a specific frequency (e.g. 50Hz line noise), set window = int(sfreq / 50).

  • iterations (int) – Number of smoothing passes. Repeated smoothing approximates a Gaussian filter and provides sharper frequency cutoff. Default 1.

Examples

>>> bias = SmoothingBias(window=20)  # Simple smoothing
>>> biased = bias.apply(data)
>>> # To remove 50Hz line noise (Period smoothing)
>>> bias = SmoothingBias(window=int(1000 / 50), iterations=1)
__init__(window: int = 10, iterations: int = 1) None[source]#

Methods

__init__([window, iterations])

apply(data)

Apply smoothing bias.