mne_denoise.dss.denoisers.DCTDenoiser#

class mne_denoise.dss.denoisers.DCTDenoiser(mask: ndarray | None = None, cutoff_fraction: float = 0.5)[source]#

DCT domain denoiser (MATLAB denoise_dct.m).

Applies a mask in the DCT (Discrete Cosine Transform) domain. Useful for temporal smoothness without explicit bandpass.

Parameters:
  • mask (ndarray or None) – DCT domain mask. Must have same length as signal, or will be expanded/truncated. If None, creates lowpass mask. If mask is None, this fraction of DCT coefficients are kept. Default 0.5 (lowpass, keep first 50% of coefficients).

  • cutoff_fraction (float) – Fraction of DCT coefficients to keep. If mask is None, this fraction of DCT coefficients are kept. Default 0.5 (lowpass, keep first 50% of coefficients).

Examples

>>> from mne_denoise.dss.denoisers import DCTDenoiser
>>> # Keep only the lowest 20% of DCT coefficients (smooth signal)
>>> denoiser = DCTDenoiser(cutoff_fraction=0.2)
>>> smooth_source = denoiser.denoise(source)

References

Särelä & Valpola (2005). Section 4.1.2 “DENOISING BASED ON FREQUENCY CONTENT”

__init__(mask: ndarray | None = None, cutoff_fraction: float = 0.5) None[source]#

Methods

__init__([mask, cutoff_fraction])

denoise(source)

Apply DCT filtering.