What’s new?#
Version 0.19 (unreleased)#
Detailed list of changes#
🚀 Enhancements#
Add support for reading and writing MEF3 (Multiscale Electrophysiology Format) iEEG data with the
.mefdextension. Requires MNE-Python 1.12 or later, by Bruno Aristimunha (#1511)Save
Annotations.extrasfields in events.tsv files when writing events, by Pierre Guetschel (#1502)Added support for
EEGLABandEEGLAB-HJcoordinate systems as defined in the BIDS specification. Both use ALS orientation (identical to CTF) and map to MNE’sctf_headcoordinate frame, by Bruno Aristimunha (#1514)mne_bids.read_raw_bids()now reads channel units fromchannels.tsvand sets them on the raw object. This includes support for units likerad(radians),V,µV,mV,T,T/m,S,oC,M, andpx. The write path was also updated to correctly writeradunits tochannels.tsv, by Alexandre Gramfort (#1509)Added support for hashing
BIDSPathobjects so they can be used in caching and other contexts that require hashable objects, by Eric Larson (#1563)Speed up
mne_bids.get_datatypes()by restricting filesystem traversal tobids_root/sub-*/(ses-*/)<datatype>directories, by Eric Larson (#1563)Speed up
mne_bids.BIDSPath.find_matching_sidecar()by searching most likely file locations first, by Eric Larson (#1565)Add support for CHPI channels and gracefully handle incorrect channel definition
MEGGRAD, by Eric Larson (#1578)
🧐 API and behavior changes#
Expected format conversions notices are now logged at
infoinstead ofwarnlevel, by Bruno Aristimunha (#1589)Add
readmeparameter tomne_bids.write_raw_bids(); passreadme=Falseto leave any existingREADMEuntouched and skip creating one, by Bruno Aristimunha (#1550)mne_bids.make_dataset_description()preserves BIDS-spec keys it does not model when merging with an existingdataset_description.json, by Bruno Aristimunha (#1548)
🛠 Requirements#
MEF3 (
.mefd) file format support requires MNE-Python 1.12 or later, by Bruno Aristimunha (#1511)
🪲 Bug fixes#
Fix
mne_bids.BIDSPath.find_matching_sidecar()to search for sidecar files at the dataset root level per the BIDS inheritance principle, by Bruno Aristimunha (#1508)Reinstate the requirement for
coordsystem.jsonwheneverelectrodes.tsvis present (including EMG), by Bruno Aristimunha (#1508)Fix
read_raw_bids()ignoringelectrodes.tsvwhenEEGCoordinateUnitsis"n/a"by inferring the unit from coordinate magnitudes, and synthesize approximate fiducials forctf_headmontages to enable the coordinate transform toheadframe, by Bruno Aristimunha (#1506)Improve
mne_bids.read_raw_bids()handling whenelectrodes.tsvexists withoutcoordsystem.json: keep strict failure for iEEG, and for EEG/MEG emit a warning and continue without applying a montage, by Bruno AristimunhaAllow
task=Noneinmne_bids.read_raw_bids()for BIDS paths without a task entity (e.g. datasets that omit task in the path), by Aman JaiswalFix
mne_bids.read_raw_bids()and related read paths failing withPermissionErroron datalad/git-annex datasets by keeping the file lock next to the symlink instead of its (read-only) target, and gracefully continuing without a lock when one cannot be created, by Bruno Aristimunha (#1569)Avoid modifying calibration files by making
mne_bids.write_meg_calibration()copy instead of parsing and rewriting, by Marijn van Vliet (#1576)Fix bug with
mne_bids.BIDSPath.find_matching_sidecar()not searching parent directories properly, by Eric Larson (#1565)Fix
mne_bids.events_file_to_annotation_kwargs()to drop rows with invalidonsetvalues (n/a,nan,NaN, empty string) before float conversion. This makes reading real-world OpenNeuro datasets (e.g.ds004841,ds004842,ds004843) succeed instead of either raising or returningNaNonsets, by Bruno Aristimunha (#1547)Fix
mne_bids.events_file_to_annotation_kwargs()to fall back to thevaluecolumn whentrial_typeis entirelyn/abutvaluecontains trigger codes, instead of dropping all events, by Bruno Aristimunha (#947)mne_bids.read_raw_bids()now tolerates malformedscans.tsventries and ISO 8601acq_timevariants, by Bruno Aristimunha (#1591)
⚕️ Code health#
None yet