meeg_utils.steps.BridgedElectrodes#
- class meeg_utils.steps.BridgedElectrodes(*, lm_cutoff=16.0, epoch_threshold=0.5, l_freq=0.5, h_freq=30.0, epoch_duration=2.0, min_correlation=0.98, confirm_band=(15.0, 30.0), bad_limit=4, large_groups='raise')[source]#
Detect bridged EEG electrodes and interpolate them.
Detection is
meeg_utils.qc.Bridging(MNE’scompute_bridged_electrodes()); repair ismne.preprocessing.interpolate_bridged_electrodes(), which places a virtual electrode at the centre of each bridged group, carrying the group’s average signal, and interpolates the bridged electrodes from it and their neighbours. Channel names and order are unchanged.- Parameters:
lm_cutoff (float) – Detection parameters (see
meeg_utils.qc.Bridging).epoch_threshold (float) – Detection parameters (see
meeg_utils.qc.Bridging).l_freq (float) – Detection parameters (see
meeg_utils.qc.Bridging).h_freq (float) – Detection parameters (see
meeg_utils.qc.Bridging).epoch_duration (float) – Detection parameters (see
meeg_utils.qc.Bridging).min_correlation (float | None) – Detection parameters (see
meeg_utils.qc.Bridging).confirm_band (tuple[float, float]) – Detection parameters (see
meeg_utils.qc.Bridging).bad_limit (int) – Groups of more bridged electrodes than this cannot be interpolated reliably (MNE default 4).
large_groups ({"raise", "bad"}) – What to do with such groups: raise (default), or mark their electrodes bad (
info["bads"]) and interpolate the other groups.
- check_#
The detection, with its metrics and figures.
- Type:
Notes
Needs electrode positions. Figures (
plot()): those of the detection,"topomap"and"distances".- __init__(*, lm_cutoff=16.0, epoch_threshold=0.5, l_freq=0.5, h_freq=30.0, epoch_duration=2.0, min_correlation=0.98, confirm_band=(15.0, 30.0), bad_limit=4, large_groups='raise')[source]#
Methods
__init__(*[, lm_cutoff, epoch_threshold, ...])fit(inst[, y, system])Learn the step's state from the data.
fit_transform(inst[, y, system, copy])Fit the step on the data and transform the same data.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
plot([kind, inst])Draw quality-control figures.
set_fit_request(*[, inst, system])Configure whether metadata should be requested to be passed to the
fitmethod.set_params(**params)Set the parameters of this estimator.
set_transform_request(*[, copy, inst])Configure whether metadata should be requested to be passed to the
transformmethod.transform(inst, *[, copy])Apply the fitted step to the data.
Attributes
Data types the step accepts.
adds_annotationsWhether the step may add
BAD_annotations (existing ones are kept).changes_channelsWhether the step may add, drop or reorder channels.
changes_timesWhether the step may change the time axis (e.g. resampling, cropping).
drops_epochsWhether the step may drop epochs (e.g. artifact rejection).
kind -> whether it needs data (
inst).returnsData type the step returns;
Nonemeans the same type as its input.Acquisition systems the step applies to;
Nonemeans all systems.- accepts: ClassVar[tuple[type, ...]] = (<class 'mne.io.base.BaseRaw'>, <class 'mne.epochs.BaseEpochs'>, <class 'mne.evoked.Evoked'>)#
Data types the step accepts.