mne_denoise.qa.geometric_mean_psd_ratio#
- mne_denoise.qa.geometric_mean_psd_ratio(freqs: ndarray, psd_before: ndarray, psd_after: ndarray, fmin: float = 1.0, fmax: float = 45.0) ndarray[source]#
Compute the geometric mean of psd_after / psd_before over a frequency range.
- 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.
- fmin, fmaxfloat, default=1.0, 45.0
Inclusive frequency bounds in Hz.
- Returns:
- float or ndarray
Scalar for 1-D input, otherwise one value per channel. Values below one indicate net attenuation; an empty mask returns one. PSDs are floored at 1e-30 before logarithms.