meeg_utils.qc.BidsMetadata#

class meeg_utils.qc.BidsMetadata[source]#

Whether the BIDS sidecar describes the recording correctly.

Compares the BIDS *_meg.json / *_eeg.json sidecar with the data file (sampling rate, duration) and with channels.tsv (channel counts per type), checks that channels.tsv lists the file’s channels, and that the line frequency is given. A wrong sidecar silently breaks analyses that rely on it (e.g. the line frequency used to remove line noise). Only applies to recordings in a BIDS dataset.

metrics_#

mismatches (field -> {"sidecar": ..., "data": ...}) and missing (recommended fields absent from the sidecar).

Type:

dict

__init__()#

Methods

__init__()

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

Key of the check in reports.

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