What’s new?

Version 0.8 (2021-07-15)

This release brings numerous improvements and fixes based on feedback from our users, including those working with very large datasets. MNE-BIDS now handles previously-overlooked edge cases, offers a much more efficient way to store data on macOS and Linux (using symbolic links), and lays the groundwork for supporting BIDS derivatives, i.e., storing modified data.

Notable changes

  • You can now write preloaded and potentially modified data with mne_bids.write_raw_bids() by passing allow_preload=True. This is a first step towards supporting derivative files.

  • mne_bids.BIDSPath now has property getters and setters for all BIDS entities. What this means is that you can now do things like bids_path.subject = '01' instead of bids_path.update(subject='01').

  • We now support Deep Brain Stimulation (DBS) data.

  • The way we handle anatomical landmarks was greatly revamped to ensure we’re always using the correct coordinate systems. A new function, mne_bids.get_anat_landmarks, helps with extracting fiducial points from anatomical scans.

  • When creating a BIDS dataset from FIFF files on macOS and Linux, MNE-BIDS can now optionally generate symbolic links to the original files instead of copies. Simply pass symlink=True to mne_bids.write_raw_bids(). This can massively reduce the storage space requirements.

Detailed list of changes

Enhancements

  • The fields “DigitizedLandmarks” and “DigitizedHeadPoints” in the json sidecar of Neuromag data are now set to true or false depending on whether any landmarks (NAS, RPA, LPA) or extra points are found in raw.info['dig'], by Eduard Ort (#772)

  • Updated the “Read BIDS datasets” example to use data from OpenNeuro, by Alex Rockhill (#753)

  • mne_bids.get_head_mri_trans() is now more lenient when looking for the fiducial points (LPA, RPA, and nasion) in the MRI JSON sidecar file, and accepts a larger variety of landmark names (upper- and lowercase letters; 'nasion' instead of only 'NAS'), by Richard Höchenberger (#769)

  • mne_bids.get_head_mri_trans() gained a new keyword argument t1_bids_path, allowing for the MR scan to be stored in a different session or even in a different BIDS dataset than the electrophysiological recording, by Richard Höchenberger (#771)

  • Add writing simultaneous EEG-iEEG recordings via mne_bids.write_raw_bids(). The desired output datatype must be specified in the mne_bids.BIDSPath object, by Richard Köhler (#774)

  • mne_bids.write_raw_bids() gained a new keyword argument symlink, which allows to create symbolic links to the original data files instead of copying them over. Currently works for FIFF files on macOS and Linux, by Richard Höchenberger (#778)

  • mne_bids.BIDSPath now has property getter and setter methods for all BIDS entities, i.e., you can now do things like bids_path.subject = 'foo' and don’t have to resort to bids_path.update(). This also ensures you’ll get proper completion suggestions from your favorite Python IDE, by Richard Höchenberger (#786)

  • mne_bids.write_raw_bids() now stores information about continuous head localization measurements (e.g., Elekta/Neuromag cHPI) in the MEG sidecar file, by Richard Höchenberger (#794)

  • mne_bids.write_raw_bids() gained a new parameter empty_room that allows to specify an associated empty-room recording when writing an MEG data file. This information will be stored in the AssociatedEmptyRoom field of the MEG JSON sidecar file, by Richard Höchenberger (#795)

  • Added support for the new channel type 'dbs' (Deep Brain Stimulation), which was introduced in MNE-Python 0.23, by Richard Köhler (#800)

  • mne_bids.read_raw_bids() now warns in many situations when it encounters a mismatch between the channels in *_channels.tsv and the raw data, by Richard Höchenberger (#823)

  • MNE BIDS now accepts .mrk head digitization files used in the KIT/Yokogawa/Ricoh MEG system, by Jean-Rémi King and Stefan Appelhoff (#842)

API and behavior changes

  • Writing datasets via write_raw_bids(), will now never overwrite dataset_description.json file, by Adam Li (#765)

  • When writing BIDS datasets, MNE-BIDS now tags them as BIDS 1.6.0 (we previously tagged them as BIDS 1.4.0), by Richard Höchenberger (#782)

  • mne_bids.read_raw_bids() now passes allow_maxshield=True to the MNE-Python reader function by default when reading FIFF files. Previously, extra_params=dict(allow_maxshield=True) had to be passed explicitly, by Richard Höchenberger (#787)

  • The raw_to_bids command has lost its --allow_maxshield parameter. If writing a FIFF file, we will now always assume that writing data before applying a Maxwell filter is fine, by Richard Höchenberger (#787)

  • mne_bids.BIDSPath.find_empty_room() now first looks for an AssociatedEmptyRoom field in the MEG JSON sidecar file to retrieve the empty-room recording; only if this information is missing, it will proceed to try and find the best-matching empty-room recording based on measurement date (i.e., fall back to the previous behavior), by Richard Höchenberger (#795)

  • If mne_bids.read_raw_bids() encounters raw data with the STI 014 stimulus channel and this channel is not explicitly listed in *_channels.tsv, it is now automatically removed upon reading, by Richard Höchenberger (#823)

  • mne_bids.get_anat_landmarks() was added to clarify and simplify the process of generating landmarks that now need to be passed to mne_bids.write_anat(); this deprecates the arguments raw, trans and t1w of mne_bids.write_anat(), by Alex Rockhill and Alexandre Gramfort (#827)

  • write_raw_bids() now accepts preloaded raws as input with some caveats if the new parameter allow_preload is explicitly set to True. This enables some preliminary support for items such as uncommon file formats, generated data, and processed derivatives, by Sin Kim (#819)

  • MNE-BIDS now writes all TSV data files with a newline character at the end of the file, complying with UNIX/POSIX standards, by Stefan Appelhoff (#831)

Requirements

  • For downloading OpenNeuro datasets, openneuro-py is now required to run the examples and build the documentation, by Alex Rockhill (#753)

  • MNE-BIDS now depends on setuptools. This package is normally installed by your Python distribution automatically, so we don’t expect any users to be affected by this change, by Richard Höchenberger (#794)

  • MNE-BIDS now requires Python 3.7 or higher, because Python 3.6 is soon reaching its end of life.

Bug fixes

Find out what was new in previous releases