meeg_utils.qc.EmptyRoom#

class meeg_utils.qc.EmptyRoom(*, empty_room='auto', band=(20.0, 100.0), max_days=None)[source]#

The empty-room recording of the session: sensor noise and noisy sensors.

The empty-room recording (no subject) shows the noise of the sensors and the room on the day. It is found in the BIDS dataset (mne_bids.BIDSPath.find_empty_room(), the one closest in date) or given. Reported per channel type: the median noise floor (amplitude spectral density, 20-100 Hz without line harmonics) and how much the recording exceeds it; flagged: sensors that are outliers in the empty room (noisy or dead sensors to mark bad). The days between the empty room and the recording are reported.

Parameters:
  • empty_room ("auto" | str | Path | Raw) – "auto" searches the BIDS dataset of the recording.

  • band (tuple of float) – Band of the noise floor (Hz).

  • max_days (float | None) – An empty room more than this many days from the recording is flagged. Same-day empty rooms are usual (MNE-BIDS-Pipeline picks the closest in date), but how fast the room’s noise changes depends on the site, so None (default) reports the gap without a verdict.

metrics_#

empty_room (file), days_apart, per channel type noise_floor (fT/√Hz or fT/cm/√Hz), recording_above_db (recording minus empty room, median over channels) and outlier_channels.

Type:

dict

Notes

Figures: "psd" (median spectra of the recording and the empty room, per channel type).

__init__(*, empty_room='auto', band=(20.0, 100.0), max_days=None)[source]#

Methods

__init__(*[, empty_room, band, max_days])

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] = 'empty_room'#

Key of the check in reports.

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

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

systems: ClassVar[frozenset[str] | None] = frozenset({'artemis123', 'bti', 'ctf', 'kit', 'meg-other', 'neuromag'})#

Acquisition systems the check applies to; None means all.

plot_kinds: ClassVar[dict[str, bool]] = {'psd': 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