Marks bad channels and time segments in MNE raw MEG/EEG data using raw.info['bads'] and mne.Annotations. Channels marked as bad are excluded from analysis, and annotations describe segments of data to be discarded (e.g., movement artifacts, signal dropout).
The app generates:
- The raw data with updated
info['bads']and annotations - A power spectral density (PSD) plot (bad channels excluded)
- A
product.jsonsummarizing the marked channels and annotations
raw(neuro/meeg/mne/raw): continuous raw MEG/EEG data to mark bad channels and segments in (required)channels(neuro/meg/fif-override,channels.tsvfile): optional BIDSchannels.tsvfile; rows whosestatuscolumn isbadare added toraw.info['bads'](optional)
out_dir/raw.fif(neuro/meeg/mne/raw, tagbads_marked): raw data with marked bad channels and annotationsout_figs/psd.png: power spectral density plot computed with bad channels excludedproduct.json: summary of marked channels and annotations, with the PSD plot embedded
| key | type | default | description |
|---|---|---|---|
bads |
string | "" |
Comma-separated list of channel names to mark as bad (e.g., "MEG2423,MEG2422,EEG001"). Names not present in the data are ignored. |
annotations |
string (multiline) | "" |
Bad data segments, one per line: onset, duration, description[, channels]. If channels is omitted the annotation applies to all channels. |
reset_bads |
boolean | false |
If true, clears any bad channels already marked in the input file before adding the new ones from bads/channels. |
Example annotations value:
2, 2, bad_segment
5, 2, movement_artifact, MEG2121, MEG2122
- Select your raw MEG/EEG dataset as the
rawinput. - Optionally provide a
channels.tsvfile as thechannelsinput to mark channels whosestatuscolumn isbad. - Optionally set
bads,annotations, and/orreset_badsin the configuration form. - Submit the process.
# Edit config.json to point "raw" (and optionally "channels") at real data, then:
python main.py- Bad Channels: Marked in
raw.info['bads']and excluded from analysis in downstream apps - Annotations: Stored in
raw.annotationsand can be used for segment-level quality control - Channel Validation: Invalid channel names in both
badsandannotationsare validated against the input file - Preload: Data is loaded and saved efficiently without full preload unless needed
- Maximilien Chaumon, Paris Brain Institute
We kindly ask that you cite the following articles when publishing papers and code using this app:
Hayashi, S., Caron, B.A., Heinsfeld, A.S. et al. brainlife.io: a decentralized and open-source cloud platform to support neuroscience research. Nat Methods 21, 809–813 (2024). https://doi.org/10.1038/s41592-024-02237-2
Gramfort A, et al. & Hämäläinen MS. MEG and EEG data analysis with MNE-Python. Frontiers in Neuroscience, 7(267):1–13 (2013). https://doi.org/10.3389/fnins.2013.00267
brainlife.io is publicly funded and for the sustainability of the project we kindly ask that you acknowledge the following funding sources:
Copyright (c) 2026 MEEG Brainlife team. Licensed under AGPL-3.0, see license.txt.