braindecode.preprocessing.RemoveDrifts#
- class braindecode.preprocessing.RemoveDrifts(transition=(0.25, 0.75), *, attenuation=80.0, method='fft')[source]#
 Remove drifts from the EEG data using a forward-backward high-pass filter. See [Oppenheim1999].
Note that MNE has its own suite of filters for this that offers more choices; use this filter if you are specifically interested in matching the EEGLAB and EEGPrep behavior, for example if you’re building an EEGPrep-like pipeline from individual steps, e.g., to customize parts that are not exposed by the top-level EEGPrep preprocessor.
Note
If your method involves causal analysis, either with applications to real-time single-trial brain-computer interfacing or for example involving autoregressive modeling or other causal measures, consider using a strictly causal highpass filter instead.
- Parameters:
 transition (Sequence[float]) – The transition band in Hz, i.e. lower and upper edge of the transition as in (lo, hi). Defaults to (0.25, 0.75). Choosing this can be tricky when your data contains long-duration event-related potentials that your method exploits, in which case you may need to carefully lower this somewhat to avoid attenuating them.
attenuation (float) – The stop-band attenuation, in dB. Defaults to 80.0.
method (str) – The method to use for filtering (‘fft’ or ‘fir’). Defaults to ‘fft’ (uses more memory but is much faster than ‘fir’).
References
[Oppenheim1999]Oppenheim, A.V., 1999. Discrete-time signal processing. Pearson Education India.
Methods