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 passingallow_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 likebids_path.subject = '01'
instead ofbids_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
tomne_bids.write_raw_bids()
. This can massively reduce the storage space requirements.
Authors¶
Jean-Rémi King (new contributor)
Julia Guiomar Niso Galán (new contributor)
Richard Köhler (new contributor)
Robert Luke (new contributor)
Sin Kim (new contributor)
Detailed list of changes¶
Enhancements¶
The fields “DigitizedLandmarks” and “DigitizedHeadPoints” in the json sidecar of Neuromag data are now set to
true
orfalse
depending on whether any landmarks (NAS, RPA, LPA) or extra points are found inraw.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 argumentt1_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 themne_bids.BIDSPath
object, by Richard Köhler (#774)mne_bids.write_raw_bids()
gained a new keyword argumentsymlink
, which allows to create symbolic links to the original data files instead of copying them over. Currently works forFIFF
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 likebids_path.subject = 'foo'
and don’t have to resort tobids_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 parameterempty_room
that allows to specify an associated empty-room recording when writing an MEG data file. This information will be stored in theAssociatedEmptyRoom
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 overwritedataset_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 passesallow_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 anAssociatedEmptyRoom
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 theSTI 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 tomne_bids.write_anat()
; this deprecates the argumentsraw
,trans
andt1w
ofmne_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 parameterallow_preload
is explicitly set toTrue
. 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¶
mne_bids.make_report()
now (1) detects male/female sex and left/right handedness irrespective of letter case, (2) will parse agender
column if nosex
column is found inparticipants.tsv
, and (3) reports sex as male/female instead of man/woman, by Alex Rockhill (#755)The
mne.Annotations
BAD_ACQ_SKIP
– added by the acquisition system toFIFF
files – will now be preserved when reading raw data, even if these time periods are not explicitly included in*_events.tsv
, by Richard Höchenberger and Alexandre Gramfort (#754 and #762)mne_bids.write_raw_bids()
will handle different cased extensions for EDF files, such as edf and EDF by Adam Li (#765)mne_bids.inspect_dataset()
didn’t handle certain filenames correctly on some systems, by Richard Höchenberger (#769)mne_bids.write_raw_bids()
now works across data types withoverwrite=True
, by Alexandre Gramfort (#791)mne_bids.read_raw_bids()
didn’t always replace all traces of the measurement date and time stored in the raw data with the date found in *_scans.tsv, by Richard Höchenberger (#812, #815)mne_bids.read_raw_bids()
crashed when the (optional)acq_time
column was missing in*_scans.tsv
, by Alexandre Gramfort (#814)mne_bids.write_raw_bids()
doesn’t crash anymore if the designated output directory contains the string"tsv"
, by Richard Höchenberger (#833)mne_bids.get_head_mri_trans()
gave incorrect results when the T1 image was not in LIA format, now all formats function properly, by Alex Rockhill and Alexandre Gramfort (#827)mne_bids.get_head_mri_trans()
andmne_bids.write_anat()
used a T1w image but depended specifically on the freesurfer T1w image. Now the FreeSurfer subjects directory is used, by Alex Rockhill and Alexandre Gramfort (#827)