API Reference#
Pipelines and steps#
|
A sequence of named processing steps. |
|
Base class for all processing steps. |
|
Process each recording with its own copy of a pipeline and save the results. |
|
The MEG/EEG recordings of a BIDS dataset, selected by entity. |
|
Process a whole dataset: each run, then the epochs of each session. |
|
Outcome of |
Processing steps (meeg_utils.steps)#
|
Band-pass, high-pass or low-pass filter the data. |
|
Resample the data. |
|
Remove power-line noise. |
|
Detect bad channels and mark them in |
|
Interpolate the channels marked bad. |
|
Set the EEG reference and, for CTF MEG, the gradient compensation grade. |
|
Decompose the data with ICA, label components and remove artifacts. |
|
Map MEG data to a common head position (device-to-head transform). |
|
Signal space separation (SSS) and its temporal extension (tSSS). |
|
Process channel types with separate steps, like scikit-learn's |
|
Remove environmental fields from OPM data by a homogeneous or harmonic field model. |
|
Remove what reference or artifact channels record from the data, by linear regression. |
|
Mark bad stretches of a recording with |
|
Artifact subspace reconstruction: repair high-amplitude bursts in continuous EEG. |
|
Sensor noise suppression: replace each channel by its projection on its neighbours. |
|
Detect bridged EEG electrodes and interpolate them. |
|
Remove channels, e.g. mastoid electrodes before re-referencing. |
|
Cut the recording into epochs around events. |
|
Cut a continuous recording into consecutive epochs of equal length (e.g. resting state). |
|
Baseline correction of epochs or evoked data. |
|
Reject or repair bad epochs with thresholds learned from the data. |
|
Concatenate the epochs of several runs of one session. |
Reading and writing (meeg_utils.io)#
|
Read a recording into memory, using BIDS metadata when available. |
|
Save processed data as a BIDS derivative, with a provenance sidecar. |
|
Return the derivative files already written for |
|
Detect the acquisition system of a recording. |
|
Return the modalities ( |
|
Average device-to-head transform of several MEG recordings. |
Quality control (meeg_utils.qc)#
|
Run acquisition-quality checks on a recording. |
|
Run the quality checks on every recording of a dataset. |
|
Return every MEG and EEG recording of a BIDS dataset. |
|
The results of several checks on one recording. |
|
Quality-check results of many recordings. |
|
One evaluated quality criterion. |
|
Base class of acquisition-quality checks. |
|
Flat signals, clipping (amplifier saturation) and missing samples. |
|
Electrode bridging: neighbouring electrodes shorted by gel or sweat. |
|
Electrode impedances measured before or during the recording. |
|
Channels whose signal is unlike that of the other channels (LOF). |
|
Power-line noise and other narrowband noise in the raw spectrum. |
|
Share of the recording contaminated by muscle activity. |
|
Blink rate from the EOG channel(s), a test that the EOG works. |
|
Heart rate from the ECG channel (or MEG magnetometers), a test of the ECG. |
|
Head movement during an MEG recording, from continuous head localization. |
Electrode positions, head digitization and head-to-sensor distance. |
|
|
Event counts and timing, compared with what the experiment should produce. |
|
Flux jumps of SQUID sensors: sudden, lasting steps in an MEG channel. |
|
Signal-to-noise ratio of the continuous head-position (cHPI) coils. |
|
The empty-room recording of the session: sensor noise and noisy sensors. |
Whether the BIDS sidecar describes the recording correctly. |
|
|
Delay and jitter between the triggers and what the screen showed. |
|
Build an |
|
Build a report of a derivative saved by |
|
Collect the QC metrics of every derivative under |
|
QC metrics of every derivative in a folder, with outlying files flagged. |
Presets (meeg_utils.presets)#
Return the preset names with the first line of their description. |
|
|
Build the pipeline of a preset. |
|
Return the options a preset accepts. |
Logging and testing#
|
Show meeg-utils log messages on the console and/or in a file. |
Remove the handlers added by |
|
|
Write meeg-utils log messages to a file for the duration of a |
|
Check that a step honours the meeg-utils step contract. |
|
Check that a quality check honours the meeg-utils check contract. |