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. When used to split the signal into a smooth branch and a residual (
data - smooth), fitting DSS on the residual and adding the smooth branch back follows ZapLine’s period-matched decomposition (de Cheveigné, 2020): withwindow = round(sfreq / f_line)the smoother has zeros atf_lineand its harmonics, so the residual concentrates the narrowband artifact.- Parameters:
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)
Methods
__init__([window, iterations])apply(data)Apply smoothing bias.