meeg_utils.qc.Amplitude#
- class meeg_utils.qc.Amplitude(*, min_flat_duration=0.05, min_clip_duration=0.01, bad_percent=5.0)[source]#
Flat signals, clipping (amplifier saturation) and missing samples.
Flat: a channel repeats exactly the same value for at least
min_flat_duration; channels flat for more thanbad_percentof the recording are flat channels (disconnected, broken), the rest are flat segments (dropouts).Clipped: the signal stays at its own maximum or minimum for at least
min_clip_duration, which is what an amplifier or SQUID at the end of its range produces.Missing: NaN samples (
mne.preprocessing.annotate_nan()).
Exact repetition is used instead of an amplitude threshold, so no unit- or system-specific threshold is needed.
- Parameters:
min_flat_duration (float) – Shortest run of identical samples counted as flat, in seconds. The default (50 ms) is far longer than chance repetitions of quantized noise.
min_clip_duration (float) – Shortest run at the extreme value counted as clipping, in seconds (and at least 4 samples). Quantized data repeat their extreme value by chance for a few samples: up to 3 samples (5 ms) in MNE’s sample recording, where a 3-sample threshold flagged a clean channel.
bad_percent (float) – Percentage of time above which a channel is a flat channel (the default of
mne.preprocessing.annotate_amplitude(), 5 %).
- metrics_#
flat_channels,clipped_channelsandnan_channels;flat_segments_s(flat time in the other channels) and, per channel type, the percentage of time each affected channel is flat, clipped or NaN.- Type:
Notes
Figures:
"channels"(percentage of time flat / clipped / NaN for every affected channel).Methods
__init__(*[, min_flat_duration, ...])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, orNoneif it can.plot([kind, inst])Draw quality-control figures.
set_params(**params)Set the parameters of this estimator.
Attributes
levelThe worst verdict of the findings (
"ok"if there are none).modalitiesData types the check needs at least one of ("meg", "eeg").
Key of the check in reports.
kind -> whether it needs data (
inst).systemsAcquisition systems the check applies to;
Nonemeans all.