mne_denoise.qa.noise_surround_ratio#

mne_denoise.qa.noise_surround_ratio(freqs: ndarray, psd_after: ndarray, target_freq: float, peak_bw: float = 2.0, surround_bw: float = 5.0) ndarray[source]#

Compute target-band power divided by surrounding power.

Parameters:
freqsndarray, shape (n_freqs,)

Frequency vector in Hz.

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

PSD after cleaning.

target_freqfloat

Center frequency in Hz.

peak_bwfloat, default=2.0

Half-width of the target band in Hz.

surround_bwfloat, default=5.0

Half-width of each surrounding region in Hz.

Returns:
float or ndarray

Scalar for 1-D input, otherwise one value per channel. Values near one indicate a flat target region; larger values indicate a residual peak. Missing surrounding power uses a 1e-30 denominator.