mne_denoise.qa.suppression_ratio#

mne_denoise.qa.suppression_ratio(freqs: ndarray, psd_before: ndarray, psd_after: ndarray, target_freq: float, bandwidth: float = 2.0) float[source]#

Compute the dB ratio of mean band power before and after cleaning.

The metric is 10 * log10(mean_before / mean_after); positive values indicate suppression.

Parameters:
freqsndarray, shape (n_freqs,)

Frequency vector in Hz.

psd_before, psd_afterndarray, shape (n_freqs,) or (n_channels, n_freqs)

PSDs before and after cleaning.

target_freqfloat

Center frequency in Hz.

bandwidthfloat, default=2.0

Half-width of the band in Hz.

Returns:
float

Scalar ratio after averaging channels when input is 2-D. Empty bands return NaN; non-positive after-power returns positive infinity.