meeg_utils.qc.Impedance#

class meeg_utils.qc.Impedance(*, impedances=None, warn_kohm=None)[source]#

Electrode impedances measured before or during the recording.

Read from the BrainVision header (raw.impedances) or given explicitly (e.g. from mne.io.read_impedances_curry()). High impedance increases line-noise pickup and low-frequency noise (Kappenman & Luck, 2010, Psychophysiology 47:888).

Parameters:
  • impedances (dict | None) – Channel name mapped to impedance in kΩ; None reads raw.impedances.

  • warn_kohm (float | None) – Impedance above which an electrode is flagged. The acceptable value depends on the amplifier’s input impedance and the electrode type: Brain Products recommends at most 25 kΩ for active electrodes, 5-10 kΩ is usual for passive ones. None (default) reports the impedances without a verdict; set the value for your system.

metrics_#

impedances (kΩ per channel), median_kohm, max_kohm and high (channels above warn_kohm; empty without a threshold).

Type:

dict

Notes

Figures: "channels" (impedance per electrode with the threshold).

__init__(*, impedances=None, warn_kohm=None)[source]#

Methods

__init__(*[, impedances, warn_kohm])

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, or None if it can.

plot([kind, inst])

Draw quality-control figures.

set_params(**params)

Set the parameters of this estimator.

Attributes

level

The worst verdict of the findings ("ok" if there are none).

modalities

Data types the check needs at least one of ("meg", "eeg").

name

Key of the check in reports.

plot_kinds

kind -> whether it needs data (inst).

systems

Acquisition systems the check applies to; None means all.

name: ClassVar[str] = 'impedance'#

Key of the check in reports.

modalities: ClassVar[frozenset[str]] = frozenset({'eeg'})#

Data types the check needs at least one of (“meg”, “eeg”).

plot_kinds: ClassVar[dict[str, bool]] = {'channels': False}#

kind -> whether it needs data (inst). Each kind is drawn by a _plot_<kind>(inst, **kwargs) method.

Type:

Figures the object can draw once fitted

not_applicable(raw)[source]#

Return why the check cannot run on raw, or None if it can.

Parameters:

raw (Raw) – The recording.

Returns:

The reason, or None.

Return type:

str | None