MNE-BIDS Command Line Interface (CLI)

Here we list the MNE-BIDS tools that you can use from the command line.

mne_bids calibration_to_bids

Write Elekta/Neuromag/MEGIN fine-calibration data to BIDS.

Usage: mne_bids calibration_to_bids options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--bids_root=BIDS_ROOT

The path of the folder containing the BIDS dataset

--subject_id=SUBJECT

Subject name

--session_id=SESSION

Session name

--file=FNAME

The path of the crosstalk file

--verbose

Whether do generate additional diagnostic output

example usage: $ mne_bids calibration_to_bids –subject_id=01 –session=test –bids_root=bids_root –file=sss_cal.dat

mne_bids count_events

Count events in BIDS dataset.

Usage: mne_bids count_events options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--bids_root=BIDS_ROOT

The path of the BIDS compatible folder.

--datatype=DATATYPE

The datatype to consider.

--describe

If set print the descriptive statistics (min, max, etc.).

example usage: $ mne_bids count_events –bids_root bids_root_path

mne_bids cp

Rename files (making a copy) and update their internal pointers.

Usage: mne_bids cp -i INPUT -o OUTPUT

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

-i INPUT, --input=INPUT

path to the input file. (accepted formats: BrainVision .vhdr, EEGLAB .set, CTF .ds)

-o OUTPUT, --output=OUTPUT

path to the output file (MUST be same format as input file)

-v, --verbose

set logging level to verbose

example usage: $ mne_bids cp –input myfile.vhdr –output sub-01_task-test.vhdr

mne_bids crosstalk_to_bids

Write Elekta/Neuromag/MEGIN crosstalk data to BIDS.

Usage: mne_bids crosstalk_to_bids options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--bids_root=BIDS_ROOT

The path of the folder containing the BIDS dataset

--subject_id=SUBJECT

Subject name

--session_id=SESSION

Session name

--file=FNAME

The path of the crosstalk file

--verbose

Whether do generate additional diagnostic output

example usage: $ mne_bids crosstalk_to_bids –subject_id=01 –session=test –bids_root=bids_root –file=ct_sparse.fif

mne_bids inspect

Inspect MEG and EEG raw data, and interactively mark channels as bad.

Usage: mne_bids inspect options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--bids_root=BIDS_ROOT

The path of the folder containing the BIDS dataset

--subject_id=SUBJECT

Subject name

--session_id=SESSION

Session name

--task=TASK

Task name

--acq=ACQUISITION

Acquisition parameter

--run=RUN

Run number

--proc=PROCESSING

Processing label.

--rec=RECORDING

Recording name

--type=DATATYPE

Recording data type, e.g. meg, ieeg or eeg

--suffix=SUFFIX

The filename suffix, i.e. the last part before the extension

--ext=EXTENSION

The filename extension, including the leading period, e.g. .fif

--find_flat=FIND_FLAT

Whether to auto-detect flat channels and time segments

--l_freq=L_FREQ

The high-pass filter cutoff frequency

--h_freq=H_FREQ

The low-pass filter cutoff frequency

--verbose

Whether do generate additional diagnostic output

example usage: $ mne_bids inspect –subject_id=01 –task=experiment –session=test –datatype=meg –suffix=meg –bids_root=bids_root

mne_bids mark_bad_channels

Mark channels in an existing BIDS dataset as “bad”.

Usage: mne_bids mark_bad_channels options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--ch_name=CH_NAMES

The names of the bad channels. If multiple channels are bad, pass the –ch_name parameter multiple times.

--description=DESCRIPTIONS

Descriptions as to why the channels are bad. Must match the number of bad channels provided. Pass multiple times to supply more than one value in that case.

--bids_root=BIDS_ROOT

The path of the folder containing the BIDS dataset

--subject_id=SUBJECT

Subject name

--session_id=SESSION

Session name

--task=TASK

Task name

--acq=ACQUISITION

Acquisition parameter

--run=RUN

Run number

--proc=PROCESSING

Processing label.

--rec=RECORDING

Recording name

--type=DATATYPE

Recording data type, e.g. meg, ieeg or eeg

--suffix=SUFFIX

The filename suffix, i.e. the last part before the extension

--ext=EXTENSION

The filename extension, including the leading period, e.g. .fif

--overwrite

Replace existing channel status entries

--verbose

Whether do generate additional diagnostic output

example usage: $ mne_bids mark_bad_channels –ch_name=”MEG 0112” –description=”noisy” –ch_name=”MEG 0131” –description=”flat” –subject_id=01 –task=experiment –session=test –bids_root=bids_root –overwrite

mne_bids raw_to_bids

Write raw files to BIDS format.

Usage: mne_bids raw_to_bids options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--subject_id=SUBJECT_ID

subject name in BIDS compatible format (01, 02, etc.)

--task=TASK

name of the task the data is based on

--raw=RAW_FNAME

path to the raw MEG file

--bids_root=BIDS_ROOT

The path of the BIDS compatible folder.

--session_id=SESSION_ID

session name in BIDS compatible format

--run=RUN

run number for this dataset

--acq=ACQ

acquisition parameter for this dataset

--events_data=EVENTS_DATA

events file (events.tsv)

--event_id=eid

event id dict

--hpi=HPI

path to the MEG marker points

--electrode=ELECTRODE

path to head-native digitizer points

--hsp=HSP

path to headshape points

--config=CONFIG

path to the configuration file

--overwrite=OVERWRITE

whether to overwrite existing data (BOOLEAN)

--line_freq=LINE_FREQ

The frequency of the line noise in Hz (e.g. 50 or 60). If unknown, pass None

example usage: $ mne_bids raw_to_bids –subject_id sub01 –task rest –raw data.edf –bids_root new_path

mne_bids report

Write raw files to BIDS format.

Usage: mne_bids report options args

Options

--version

show program’s version number and exit

-h, --help

show this help message and exit

--bids_root=BIDS_ROOT

The path of the BIDS compatible folder.

example usage: $ mne_bids report –bids_root bids_root_path