mne_denoise.qa.overclean_proportion#
- mne_denoise.qa.overclean_proportion(freqs: ndarray, psd_before: ndarray, psd_after: ndarray, target_freq: float, bandwidth: float = 2.0, threshold_db: float = 3.0) float[source]#
Compute the fraction of channels whose surrounding floor is over-suppressed.
A channel is flagged when surrounding-band attenuation exceeds threshold_db.
- 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 used to define the target band.
- threshold_dbfloat, default=3.0
Surrounding-floor attenuation threshold in dB.
- Returns:
- float
Indicator for 1-D input or channel fraction in [0, 1] for 2-D input.
- No surrounding frequencies returns 0.0.