meeg_utils.qc.OutlierChannels#
- class meeg_utils.qc.OutlierChannels(*, n_neighbors=20, threshold=1.5, l_freq=1.0, min_channels=10)[source]#
Channels whose signal is unlike that of the other channels (LOF).
Uses
mne.preprocessing.find_bad_channels_lof()(Local Outlier Factor; Kumaravel et al., 2022) on each channel type separately, after a 1 Hz high-pass on a copy so that slow drifts do not dominate. It complements PREP and Maxwell detection and works for any system.- Parameters:
n_neighbors (int) – LOF neighbourhood size (MNE default 20); reduced to the number of channels minus one for small montages.
threshold (float) – LOF score above which a channel is an outlier (MNE default 1.5).
l_freq (float | None) – High-pass applied to the copy before scoring.
min_channels (int) – Channel types with fewer channels are skipped.
Notes
Figures:
"scores"(LOF score per channel with the threshold).Methods
__init__(*[, n_neighbors, threshold, ...])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.