mne_denoise.dss.SmoothTanhDenoiser#

class mne_denoise.dss.SmoothTanhDenoiser(alpha: float = 1.0, window: int = 10)[source]#

Uniformly smoothed hyperbolic-tangent nonlinearity.

Parameters:
alphafloat, default=1.0

Tanh scale.

windowint, default=10

Uniform-filter size; values below 3 are set to 3.

Notes

The implementation applies scipy.ndimage.uniform_filter1d() with its default last-axis behavior before applying tanh.

denoise(source: ndarray) ndarray[source]#

Smooth a source and apply the scaled tanh nonlinearity.

Parameters:
sourcendarray, shape (n_times,) or (n_times, n_epochs)

Source time series. Smoothing is applied along the time axis.

Returns:
denoisedndarray, same shape as source

Smoothed and nonlinearly transformed source.