Gitter Travis Appveyor codecov CircleCi Downloads


This is a repository for creating BIDS-compatible datasets with MNE.

The documentation can be found under the following links:


We recommend the Anaconda Python distribution. We require that you use Python 3. Besides numpy and scipy (which are included in the standard Anaconda installation), you will need to install the most recent version of MNE using the pip tool:

$ pip install -U mne

Then install mne-bids:

$ pip install -U mne-bids

These pip commands also work if you want to upgrade if a newer version of mne-bids is available. If you do not have administrator privileges on the computer, use the --user flag with pip.

To check if everything worked fine, the following command should not give any error messages:

$ python -c 'import mne_bids'

For full functionality of mne-bids, you will also need to pip install the following packages:

  • nibabel, for interacting with MRI data

If you want to use the latest development version of mne-bids, use the following command:

$ pip install


Currently, we support writing of BIDS datasets for MEG and EEG. Support for iEEG is experimental at the moment.

>>> from mne import io
>>> from mne_bids import write_raw_bids
>>> raw = io.read_raw_fif('my_old_file.fif')
>>> write_raw_bids(raw, 'sub-01_ses-01_run-05', output_path='./bids_dataset')

Command Line Interface

In addition to import mne_bids, you can use the command line interface. Simply type mne_bids in your command line and press enter, to see the accepted commands. Then type mne_bids <command> --help, where <command> is one of the accepted commands, to get more information about that <command>.


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

Bug reports

Use the github issue tracker to report bugs.


If you use mne-bids in your work, please cite one of the following papers, depending on which modality you used:


Niso, G., Gorgolewski, K. J., Bock, E., Brooks, T. L., Flandin, G., Gramfort, A.,
Henson, R. N., Jas, M., Litvak, V., Moreau, J., Oostenveld, R., Schoffelen, J.,
Tadel, F., Wexler, J., Baillet, S. (2018). MEG-BIDS, the brain imaging data
structure extended to magnetoencephalography. Scientific Data, 5, 180110.


Pernet, C. R., Appelhoff, S., Gorgolewski, K. J., Flandin, G.,
Phillips, C., Delorme, A., Oostenveld, R. (2019). EEG-BIDS, an extension
to the brain imaging data structure for electroencephalography. Scientific
Data, 6, 103.


Holdgraf, C., Appelhoff, S., Bickel, S., Bouchard, K., D'Ambrosio, S.,
David, O., … Hermes, D. (2019). iEEG-BIDS, extending the Brain Imaging Data
Structure specification to human intracranial electrophysiology. Scientific
Data, 6, 102.