Quality Control Metrics#
MEGPrep writes quality control sidecars during processing and packages them into a portable static HTML report. The current report uses measured values and static thresholds. It does not yet provide calibrated normative quality scores.
Subject-Level Metrics#
Metric |
Source |
Interpretation |
|---|---|---|
Sampling rate |
Preprocessed raw file metadata |
Confirms that filtering and resampling produced the expected output sampling frequency. |
Channel count |
Preprocessed raw file metadata |
Used to contextualize bad-channel counts and ratios. |
Recording duration |
Preprocessed raw file metadata |
Used to calculate bad-segment duration ratio. |
Bad channel count |
|
Number of channels marked bad by the configured bad-channel detectors. |
Bad channel ratio |
Bad channel count divided by total channel count |
Helps compare systems or recordings with different channel counts. |
Bad segment count |
|
Number of MNE annotations created by bad-segment detectors. |
Bad segment duration |
Sum of annotation durations |
Total time marked as bad in the continuous recording. |
Bad segment ratio |
Bad duration divided by raw recording duration |
Fraction of continuous time marked as bad. |
ICA marked components |
|
Components selected for exclusion before ICA is applied. |
ECG and EOG candidates |
|
Candidate artifact components detected by ECG/EOG scoring. |
ICA component review views |
|
Topographic and time-series evidence for component review. If
|
Coregistration mean, max, and min distance |
|
Distances in mm between fitted head-shape points and the head surface. High mean or max distances indicate poor MEG-MRI alignment. |
Epoch rejection rate |
|
Rejected epochs divided by estimated total epochs. Rejections can come from bad annotations, MNE reject thresholds, or optional autoreject. |
Step completion |
Presence of expected output files |
Shows whether artifact, ICA, coregistration, head model, epochs, covariance, and source outputs exist for each recording. |
Static Report Alarms#
The static report classifies each subject as PASS, WARN, or FAIL
using simple alarm rules:
Alarm |
Default threshold |
Severity and meaning |
|---|---|---|
Bad channels above threshold |
|
Warning. Review sensor quality and detector settings. |
Bad segments above threshold |
|
Warning. Review raw trace plots and bad-segment annotations. |
Missing expected ICA outputs |
Stage dependent |
Warning when the selected |
Missing expected coregistration outputs |
Stage dependent |
Warning when the selected |
Mean coregistration distance above threshold |
|
Danger. Usually requires reviewing fiducials, head-shape points, or MRI subject matching. |
Max coregistration distance above threshold |
|
Danger. Often indicates outlier head-shape points or poor alignment. |
Epoch rejection rate above threshold |
|
Warning. Check event definitions, reject thresholds, and bad annotations. |
FAIL is assigned when a subject has at least one danger alarm or three or
more alarms. WARN is assigned when there is at least one warning alarm.
PASS means no alarms under the current static thresholds.
Dataset-Level Outputs#
The static report writes a dataset dashboard and machine-readable summaries:
File |
Contents |
|---|---|
|
Dataset-level dashboard with subject table, workflow diagram, aggregate metrics, alarms, and links to subject pages. |
|
Per-recording report with artifacts, ICA, coregistration, epochs, covariance, head model, source figures, task trace details, and packaged sidecars. |
|
Artifact mask heatmap showing bad-channel rows and bad-segment time spans when artifact image generation is enabled. |
|
Searchable list of report alarms. |
|
Dataset-level metrics, thresholds, workflow metadata, and subject summaries. |
|
Spreadsheet-friendly subject table. |
|
Full subject summary used to render the subject page. |
|
Snapshot of the effective Nextflow config when available. |
|
Workflow mode and run metadata used to render the report workflow diagram. |
|
Failed or ignored task |
|
Optional successful-task |
Practical Review Guidance#
Start with index.html and sort the subject table by alarms, bad channels,
bad segments, coregistration distance, or epoch rejection rate. Open subject
pages for high-alarm or high-outlier recordings. For artifact-heavy recordings,
inspect the waveform images and the bad-segment table before changing detector
thresholds. For source reconstruction failures or high coregistration alarms,
inspect the final ICP figures and verify that the MEG recording was matched to
the correct FreeSurfer subject.