Using MNE-BIDS#

Quickstart#

Python#

>>> import mne
>>> from mne_bids import BIDSPath, write_raw_bids
>>> raw = mne.io.read_raw_fif('my_old_file.fif')
>>> bids_path = BIDSPath(subject='01', session='01', run='05',
                         datatype='meg', root='./bids_dataset')
>>> write_raw_bids(raw, bids_path=bids_path)

Command Line Interface#

Simply type mne_bids in your command line and press enter to see a list of accepted commands. Then type mne_bids <command> --help, where <command> is one of the accepted commands, to get more information about it.

Example:

$ mne_bids raw_to_bids --subject_id sub01 --task rest --raw data.edf --bids_root new_path

Mastering BIDSPath#

To be able to effectively use MNE-BIDS, you need to understand how to work with the BIDSPath object. Follow our basic example on how to read a BIDS dataset, and have a look at this introduction to learn everything you need!

Examples#

The following examples demonstrate some common use-cases of MNE-BIDS.

The examples are loosely ordered from basic to more advanced use cases.

01. Read BIDS datasets

01. Read BIDS datasets

02. Convert MNE sample data to BIDS format

02. Convert MNE sample data to BIDS format

03. Interactive data inspection and bad channel selection

03. Interactive data inspection and bad channel selection

04. Convert EEG data to BIDS format

04. Convert EEG data to BIDS format

05. BIDS conversion for group studies

05. BIDS conversion for group studies

06. Rename BrainVision EEG data files

06. Rename BrainVision EEG data files

07. Save and load T1-weighted MRI scan along with anatomical landmarks in BIDS

07. Save and load T1-weighted MRI scan along with anatomical landmarks in BIDS

08. Convert iEEG data to BIDS format

08. Convert iEEG data to BIDS format

09. Manually storing empty room data

09. Manually storing empty room data

10. An introduction to BIDSPath

10. An introduction to BIDSPath

11. Creating BIDS-compatible folder names and filenames

11. Creating BIDS-compatible folder names and filenames

12. Updating BIDS datasets

12. Updating BIDS datasets

13. Anonymizing a BIDS dataset

13. Anonymizing a BIDS dataset

13. Convert NIRS data to BIDS format

13. Convert NIRS data to BIDS format

Gallery generated by Sphinx-Gallery