Skip to content

MEG Artifact Detector — specifics

Menu Process → Signal → MEG Artifact Detector 1.0.0. See the shared methodology for the five criteria and the common parameters — this page only covers what's specific to MEG.

Neighbors: 3D nearest sensors

Criteria 2 and 3 need a notion of "neighbor". For MEG this is a plain 3D nearest-neighbor search using each sensor's position (neighbor_count sensors, default 5). MEG sensor arrays are a single rigid, densely and evenly sampled surface, so Euclidean-nearest is a simple and meaningful choice.

If channel positions are unset (e.g. a raw file opened without its sensor layout), criteria 2 and 3 are skipped entirely with a warning — "nearest neighbor" has no meaning without positions.

PSD frequency bands — fixed, validated

Unlike its EEG/sEEG siblings, the broadband range (criterion 3) and the peak-search range (criterion 4) are not exposed as parameters for MEG:

Criterion Range Notes
3 — broadband power vs. neighbors 100 – 500 Hz
4 — own-baseline peak 20 – 800 Hz 8 Hz baseline-smoothing window

These were fixed once validated against a real recording (see below); there is currently no parameter to change them.

Validation

MEG Artifact Detector was validated end-to-end against a real 4D/BTi (248-magnetometer) recording with a known set of bad channels:

  • every channel in that file's own bad-channel list was correctly flagged;
  • the detector correctly avoided flagging channels the ground truth considered healthy;
  • one additional flagged channel was confirmed, on visual review of the raw trace, to be a genuine — if previously unlisted — artifact.

The default thresholds described on the shared methodology page and the fixed bands above reflect that validation.

Command line

--run "MEG Artifact Detector" — see using these plugins from the command line.