meeg_utils.qc.NarrowbandNoise#
- class meeg_utils.qc.NarrowbandNoise(*, fline=None, fmin=17.0, fmax=None, threshold_db=4.0, window=6.0, tolerance=0.5, outlier_z=5.0)[source]#
Power-line noise and other narrowband noise in the raw spectrum.
Narrowband peaks are found with the ZapLine-plus detector (Klug & Kloosterman, 2022;
mne_denoise.zapline.adaptive.find_noise_freqs()): a peak of the channel-averaged log spectrum more thanthreshold_dbabove the mean of the outer thirds of awindowHz neighbourhood. Peaks at the line frequency or its harmonics are line noise, which is reported but not flagged (it is removed in preprocessing); other peaks point to equipment in or near the recording room. Channels picking up much more line noise than the others usually have poor contact.- Parameters:
fline (float | None) – Power-line frequency;
Noneusesinfo["line_freq"].fmin (float | None) – Search range in Hz (ZapLine-plus default 17-99 Hz;
fmax=Nonesearches up to the low-pass or 95 % of the Nyquist frequency).fmax (float | None) – Search range in Hz (ZapLine-plus default 17-99 Hz;
fmax=Nonesearches up to the low-pass or 95 % of the Nyquist frequency).threshold_db (float) – Peak height above the local baseline (ZapLine-plus default 4 dB).
window (float) – Width of the local baseline in Hz (ZapLine-plus default 6 Hz).
tolerance (float) – Peaks within this distance (Hz) of a harmonic are line noise.
outlier_z (float) – Robust z-score (median / MAD) of a channel’s line-noise amplitude relative to its noise floor above which it is flagged (the threshold PREP uses for its noise criteria, 5).
- metrics_#
Per channel type:
line_db(median peak height of each harmonic),other_peaks(Hz) andline_outliers(channels).- Type:
Notes
Figures:
"psd"(spectra with line harmonics and other peaks marked) and"line_channels"(line-noise level of every channel).- __init__(*, fline=None, fmin=17.0, fmax=None, threshold_db=4.0, window=6.0, tolerance=0.5, outlier_z=5.0)[source]#
Methods
__init__(*[, fline, fmin, fmax, ...])compute(raw)Measure the recording.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
not_applicable(raw)Return why the check cannot run on
raw, orNoneif it can.plot([kind, inst])Draw quality-control figures.
set_params(**params)Set the parameters of this estimator.
Attributes
levelThe worst verdict of the findings (
"ok"if there are none).modalitiesData types the check needs at least one of ("meg", "eeg").
Key of the check in reports.
kind -> whether it needs data (
inst).systemsAcquisition systems the check applies to;
Nonemeans all.