What was new in previous releases?#
Version 0.16 (2024-11-16)#
Detailed list of changes#
🚀 Enhancements#
- mne_bids.BIDSPath.match()and- mne_bids.find_matching_paths()now have additional parameters- ignore_jsonand- ignore_nosub, to give users more control over which type of files are matched, by Kaare Mikkelsen (#1281)
- mne_bids.write_raw_bids()can now handle event metadata as a pandas DataFrame, by Thomas Hartmann (#1285)
🧐 API and behavior changes#
- mne_bids.read_raw_bids()no longer warns about unit changes in channels upon reading, as that information is taken from- channels.tsvand judged authorative, by Stefan Appelhoff (#1282)
- MEG OPM channels are now experimentally included, by Amaia Benitez (#1222) 
- mne_bids.mark_channels()will no longer create a- status_descriptioncolumn filled with- n/ain the- channels.tsvfile, by Stefan Appelhoff (#1293)
- mark_channels(..., ch_names=[])now raises a deprecation warning, and in future its behavior will change from marking all channels to marking no channels; to avoid the warning use- mark_channels(..., ch_names="all"), by Daniel McCloy (#1307)
🛠 Requirements#
- MNE-BIDS now requires Python 3.10 or higher. 
- MNE-BIDS now requires - mne1.7 or higher.
🪲 Bug fixes#
- Writing MEGIN data with MNE channel types chpi will now map to BIDS type HLU by Simon Kern (#1325) 
- When anonymizing the date of a recording, MNE-BIDS will no longer error during - write_raw_bidsif passing a- Rawinstance to- empty_room, by Daniel McCloy (#1270)
- Dealing with alphanumeric - subentity labels is now fixed for- write_raw_bids(), by Aaron Earle-Richardson (#1291)
- When processing subject_info data that MNE Python imports as numpy arrays with only one item, MNE-BIDS now unpacks these, resulting in a correct participants.tsv, by Thomas Hartmann (#1310) 
- Fixed broken links in examples 7 and 8, by William Turner (#1316) 
- All valid extensions for - READMEfiles are now accepted. This prevents an extra- READMEfile being created, when one with a- .txt,- .md, or- .rstextension is already present. By Thomas Hartmann (#1318)
- A warning was given if no events were provided but the task was starting with ‘rest’ as recommended by Simon Kern (#1327) 
⚕️ Code health#
- Keep MNE-BIDS up to date with recent changes on participant birthday date handling in MNE-Python, by Eric Larson (#1278) 
- Make rules for linting more strict, make quality assessment exceptions less permissive, by Stefan Appelhoff (#1283) 
- Updates to use - intersphinx_registryand sorting TOML files, by Mathieu Scheltienne (#1314)
- Fix dropdown menu in website, by Scott Huberty (#1298) 
Version 0.15 (2024-06-04)#
👩🏽💻 Authors#
The following authors contributed for the first time. Thank you so much! 🤩
The following authors had contributed before. Thank you for sticking around! 🤘
Detailed list of changes#
🚀 Enhancements#
- Including a description for - onsetand- durationin the- events.jsonfile, by Julius Welzel (#1255)
🧐 API and behavior changes#
- The experimental support for running MNE-BIDS examples from your browser using Binder has been removed, by Stefan Appelhoff (#1202) 
- MNE-BIDS will no longer zero-pad (“zfill”) entity indices passed to - BIDSPath. For example, If- run=1is passed to MNE-BIDS, it will no longer be silently auto-converted to- run-01, by Alex Rockhill (#1215)
- MNE-BIDS will no longer warn about missing leading punctuation marks for extensions passed - BIDSPath. For example, MNE-BIDS will now silently auto-convert- edfto- `.edf, by Alex Rockhill (#1215)
- MNE-BIDS will no longer error during - write_raw_bidsif there are- BAD_ACQ_SKIPannotations in the raw file and no corresponding key in- event_id. Instead, it will automatically add the necessary key and assign an unused integer event code to it. By Daniel McCloy (#1258)
🛠 Requirements#
- MNE-BIDS now requires Python 3.9 or higher. 
- MNE-BIDS now requires MNE-Python 1.6.0 or higher. 
- edfioreplaces- EDFlib-Pythonfor export to EDF with MNE-Python >= 1.7.0.
- Installing - mne-bids[full]will now also install- defusedxmlon all platforms.
- Version requirements for optional dependency packages have been bumped up, see installation instructions. 
🪲 Bug fixes#
- The datatype in the dataframe returned by - mne_bids.stats.count_events()is now- pandas.Int64Dtypeinstead of- float64, by Eric Larson (#1227)
- The - mne_bids.copyfiles.copyfile_ctf()now accounts for files with- .{integer}_meg4extension, instead of only .meg4, when renaming the files of a .ds folder, by Mara Wolter (#1230)
- We fixed handling of time zones when reading - *_scans.tsvfiles; specifically, non-UTC timestamps are now processed correctly, by Stefan Appelhoff and Richard Höchenberger (#1240)
⚕️ Code health#
- The configuration of MNE-BIDS has been consolidated from several files (e.g., - setup.cfg,- setup.py,- requirements.txt) and is now specified in a standard- pyproject.tomlfile, by Stefan Appelhoff (#1202)
- Linting and code formatting is now done entirely using - ruff. Previously used tools (e.g.,- flake8,- black) have been fully replaced, by Stefan Appelhoff (#1203)
- The package build backend has been switched from - setuptoolsto- hatchling. This only affects users who build and install MNE-BIDS from source, and should not lead to changed runtime behavior, by Richard Höchenberger (#1204)
- Display of the version number on the website is now truncated for over-long version strings, by Daniel McCloy (#1206) 
- The long deprecated - events_dataparameter has been fully removed from- write_raw_bids()in favor of- events, by Stefan Appelhoff (#1229)
Version 0.14 (2023-11-16)#
👩🏽💻 Authors#
The following authors contributed:
Detailed list of changes#
🚀 Enhancements#
- Enable exporting to the EEGLAB data format ( - .set), by Laetitia Fesselier and Stefan Appelhoff (#1187)
🪲 Bug fixes#
- Fix reading when the channel order differs between - *_channels.tsvand the raw data file, which would previously throw an error, by Richard Höchenberger (#1171)
- Fix bug with writing crosstalk and calibration files when subject is - "emptyroom", by Eric Larson (#1189)
- Make - recordingentity available for- mne_bids.get_entity_vals(), by Stefan Appelhoff (#1182)
Version 0.13 (2023-08-21)#
👩🏽💻 Authors#
The following authors contributed for the first time. Thank you so much! 🤩
The following authors had contributed before. Thank you for sticking around! 🤘
Detailed list of changes#
🚀 Enhancements#
- BIDSPathnow supports the new- "sessions"suffix, by Jonathan Vanhoecke and Richard Höchenberger (#1137)
- The - rm()method will safely delete all the files compatible with that path and update the- scans.tsvand- participants.tsvfiles accordingly, by Pierre Guetschel and Adam Li (#1149)
🧐 API and behavior changes#
- When writing events, we now also create an - *_events.jsonfile in addition to- *_events.tsv. This ensures compatibility with the upcoming release of BIDS 1.9, by Richard Höchenberger (#1132)
- We silenced warnings about missing - events.tsvfiles when reading empty-room or resting-state data, by Richard Höchenberger (#1133)
- BTi ‘processed data files’ (pdf) will no longer be renamed to - c,rf*by default. Instead, they will be copied over without name changes. When reading BTi data via- mne-bids, more informative log and error messages will help choosing the right course of action, by Stefan Appelhoff (#1160)
🛠 Requirements#
- MNE-BIDS now requires MNE-Python 1.4 or newer. 
🪲 Bug fixes#
- Amending a dataset now works in cases where the newly-written data contains additional participant properties (new columns in - participants.tsv) not found in the existing dataset, by Richard Höchenberger (#1113)
- Fix - raw_to_bidsCLI tool to properly recognize boolean and numeric values for the- line_freqand- overwriteparameters, by Stefan Appelhoff (#1125)
- Fix - copyfile_eeglab()to prevent data type conversion leading to an- eeg_checksetfailure when trying to load the file in EEGLAB, by Laetitia Fesselier (#1126)
- Improve compatibility with latest MNE-Python, by Eric Larson (#1128) 
- Working with - BIDSPathwould sometimes inadvertently create new directories, contaminating the BIDS dataset, by Richard Höchenberger (#1139)
- Fix thrown error if the - BIDSVersiondefined in- dataset_description.jsonfile does not match the MNE-BIDS compliant- BIDSVersion, ensuring backwards compatibility across BIDS complient tools, by Ford McDonald (#1147)
- Copying BTi files without a headshape file will no longer raise an error, the file will simply be copied, and the missing headshape file will be ignored, by Stefan Appelhoff (#1158) 
Version 0.12 (2022-12-18)#
This release includes a number of bug fixes as well as several smaller enhancements. Please note some updated requirements, as listed in the details below.
📝 Notable changes#
- Nothing out of the ordinary, see below. 
👩🏽💻 Authors#
The following authors contributed for the first time. Thank you so much! 🤩
The following authors had contributed before. Thank you for sticking around! 🤘
Detailed list of changes#
🚀 Enhancements#
- Speed up - mne_bids.read_raw_bids()when lots of events are present by Alexandre Gramfort (#1079)
- Add - mne_bids.BIDSPath.get_empty_room_candidates()to get the candidate empty-room files that could be used by- mne_bids.BIDSPath.find_empty_room()by Eric Larson (#1083, #1093)
- Add - mne_bids.BIDSPath.find_matching_sidecar()to find the sidecar file associated with a given file path by Eric Larson (#1093)
- When writing data via - write_raw_bids(), it is now possible to specify a custom mapping of- mne.Annotationsdescriptions to event codes via the- event_idparameter. Previously, passing this parameter would always require to also pass- events, and using a custom event code mapping for annotations was impossible, by Richard Höchenberger (#1084)
- Improve error message when - fpathcannot be uniquely resolved by Eric Larson (#1097)
- Add - mne_bids.find_matching_paths()to retrieve all BIDSPaths matching user-specified entities. The functionality partially overlaps with what’s offered through- mne_bids.BIDSPath.match(), but is more versatile, by Moritz Gerster (#1103)
🧐 API and behavior changes#
- nothing new! 
🛠 Requirements#
- MNE-BIDS now requires Python 3.8 or higher, because Python 3.7 is soon reaching its end of life. 
- MNE-BIDS now requires MNE-Python 1.2.0 or higher. 
🪲 Bug fixes#
- When writing data containing - mne.Annotationsand passing events to- write_raw_bids(), previously, annotations whose description did not appear in- event_idwere silently dropped. We now raise an exception and request users to specify mappings between descriptions and event codes in this case. It is still possible to omit- event_idif no- eventsare passed, by Richard Höchenberger (#1084)
- When working with NIRS data, raise the correct error message when a faulty - formatargument is passed to- write_raw_bids(), by Stefan Appelhoff (#1092)
- Fixed writing data preloaded from a format that’s not supported by BIDS, by Richard Höchenberger (#1101) 
- Fixed writing data from neuromag system having 122 sensors, by Alexandre Gramfort (#1109) 
Version 0.11 (2022-10-08)#
This release includes a number of bug fixes as well as several smaller enhancements. Please note some behavior changes and updated requirements, as listed in the details below.
📝 Notable changes#
- Support for new channel types is available: temperature and galvanic skin response 
- MNE-BIDS now supports the BIDS “description” entity ( - desc)
- It’s now possible to store Curry (CDT) files and EGI files with MNE-BIDS. 
👩🏽💻 Authors#
The following authors contributed for the first time. Thank you so much! 🤩
The following authors had contributed before. Thank you for sticking around! 🤘
Detailed list of changes#
🚀 Enhancements#
- You can now write raw data and an associated empty-room recording with just a single call to - mne_bids.write_raw_bids(): the- empty_roomparameter now also accepts an- mne.io.Rawdata object. The empty-room session name will be derived from the recording date automatically, by Richard Höchenberger (#998)
- write_raw_bids()now stores participant weight and height in- participants.tsv, by Richard Höchenberger (#1031)
- write_raw_bids()now supports EGI format, by Anand Saini, Scott Huberty and Mathieu Scheltienne (#1006)
- When a given subject cannot be found, valid suggestions are now printed, by Eric Larson (#1066) 
- TSV files that are empty (i.e., only a header row is present) are now handled more robustly and a warning is issued, by Stefan Appelhoff (#1038) 
- BIDSPathnow supports the BIDS “description” entity- desc, used in derivative data, by Richard Höchenberger (#1049)
- Added support for - GSR(galvanic skin response / electrodermal activity, EDA) and- TEMP(temperature) channel types, by Richard Höchenberger (#1059)
- Added support for reading EEG files in Curry 8 format (‘.cdt’ extension) by Denis Engemann (#1072) 
🧐 API and behavior changes#
- write_raw_bids()now expects all but the first four parameters to be passed as keyword arguments, by Richard Höchenberger (#1054)
- The - events_dataparameter of- write_raw_bids()has been deprecated in favor of a new parameter named- events. This ensures more consistency between the MNE-BIDS and MNE-Python APIs. You may continue using the- events_dataparameter for now, but a- FutureWarningwill be raised.- events_datawill be removed in MNE-BIDS 0.14, by Richard Höchenberger (#1054)
- In many places, we used to infer the - datatypeof a- BIDSPathfrom the- suffix, if not explicitly provided. However, this has lead to trouble in certain edge cases. In an effort to reduce the amount of implicit behavior in MNE-BIDS, we now require users to explicitly specify a- datatypewhenever the invoked functions or methods expect one, by Richard Höchenberger (#1030)
- mne_bids.make_dataset_description()now accepts keyword arguments only, and can now also write the following metadata:- HEDVersion,- EthicsApprovals,- GeneratedBy, and- SourceDatasets, by Stefan Appelhoff (#406)
- The deprecated function - mne_bids.mark_bad_channelshas been removed in favor of- mne_bids.mark_channels(), by Richard Höchenberger (#1009)
- mne_bids.print_dir_tree()now raises a- FileNotFoundErrorinstead of a- ValueErrorif the directory does not exist, by Richard Höchenberger (#1013)
- Passing only one of - eventsand- event_idto- write_raw_bids()now raises a- ValueErrorinstead of a- RuntimeError, by Richard Höchenberger (#1054)
- Until now, - mne_bids.BIDSPathprepends extensions with a period “.” automatically. We intend to remove this undocumented side-effect and now emit a- FutureWarningif an- extensionthat does not start with a- .is provided. Starting with MNE-BIDS 0.12, an exception will be raised in this case, by Richard Höchenberger (#1061)
- Provide a more helpful error message when trying to write non-preloaded concatenated data, by Richard Höchenberger (#1075) 
🛠 Requirements#
- MNE-BIDS now requires MNE-Python 1.0 or newer. 
- Writing BrainVision files now requires - pybvversion- 0.7.3, by Stefan Appelhoff (#1011)
🪲 Bug fixes#
- Fix ACPC in - surface RASinstead of- scanner RASin Convert iEEG data to BIDS format and add convenience functions- mne_bids.convert_montage_to_ras()and- mne_bids.convert_montage_to_mri()to help, by Alex Rockhill (#990)
- Suppress superfluous warnings about MaxShield in many functions when handling Elekta/Neuromag/MEGIN data, by Richard Höchenberger (#1000) 
- The MNE-BIDS Inspector didn’t work if - mne-qt-browserwas installed and used as the default plotting backend, as the Inspector currently only supports the Matplotlib backend, by Richard Höchenberger (#1007)
- copyfile_brainvision()can now deal with- .datfile extension, by Dominik Welke (#1008)
- print_dir_tree()now correctly expands- ~to the user’s home directory, by Richard Höchenberger (#1013)
- write_raw_bids()now correctly excludes stim channels when writing to electrodes.tsv, by Scott Huberty (#1023)
- read_raw_bids()doesn’t populate- raw.info['subject_info']with invalid values anymore, preventing users from writing the data to disk again, by Richard Höchenberger (#1031)
- Writing EEGLAB files was sometimes broken when - .setand- .fdtpairs were supplied. This is now fixed in- copyfile_eeglab(), by Stefan Appelhoff (#1039)
- Writing and copying CTF files now works on Windows when files already exist ( - overwrite=True), by Stefan Appelhoff (#1035)
- Instead of deleting files and raising cryptic errors, an intentional error message is now sent when calling - write_raw_bids()with the source file identical to the destination file, unless- formatis specified, by Adam Li and Stefan Appelhoff (#889)
- Internal helper function to - read_raw_bids()would reject BrainVision data if- _scans.tsvlisted a- .eegfile instead of- .vhdr, by Teon Brooks (#1034)
- Whenever - read_raw_bids()encounters a channel type that currently doesn’t translate into an appropriate MNE channel type, the channel type will now be set to- 'misc. Previously, seemingly arbitrary channel types would be applied, e.g.- 'eeg'for GSR and temperature channels, by Richard Höchenberger (#1052)
- Fix the incorrect setting of the fields - ContinuousHeadLocalizationand- HeadCoilFrequencyfor Neuromag MEG recordings, by Eduard Ort (#1067)
Version 0.10 (2022-03-14)#
This release brings experimental fNIRS suppot, improvements in coordinate frame handling, and various enhancements regarding MRI fiducials.
📝 Notable changes#
- We now have experimental support for fNIRS data (SNIRF format). This is still super fresh, and the respective BIDS enhancement proposal (BEP) has not yet been finalized & accepted into the standard. However, we’re excitied to be able to do this first step towards fNIRS support! 
- Numerous improvements have been added to enhance our support for various coordinate frames, including those that are not yet supported by MNE-BIDS. These changes are mostly relevant to iEEG users. Please see the detailed list of changes below. 
- We have added support for storing and reading multiple anatomical landmarks (“fiducials”) for the same participant. This makes it possible, for example, to store different sets of landmarks for each recording session. 
- It’s now possible to store Neuroscan (CNT) files with MNE-BIDS. 
👩🏽💻 Authors#
The following authors contributed for the first time. Thank you so much! 🤩
The following authors had contributed before. Thank you for sticking around! 🤘
Detailed list of changes#
🚀 Enhancements#
- Add experimental support for fNIRS (SNIRF) files in - mne_bids.write_raw_bids(), by Robert Luke (#406)
- Add support for CNT (Neuroscan) files in - mne_bids.write_raw_bids(), by Yorguin Mantilla (#924)
- Add the ability to write multiple landmarks with - mne_bids.write_anat()(e.g. to have separate landmarks for different sessions) via the new- kindparameter, by Alexandre Gramfort (#955)
- Similarly, - mne_bids.get_head_mri_trans()and- mne_bids.update_anat_landmarks()gained a new- kindparameter to specify which of multiple landmark sets to operate on, by Alexandre Gramfort and Richard Höchenberger (#955, #957)
- Add support for iEEG data in the coordinate frame - Pixels; although MNE-Python does not recognize this coordinate frame and so it will be set to- unknownin the montage, MNE-Python can still be used to analyze this kind of data, by Alex Rockhill (#976)
- Add an explanation in Convert iEEG data to BIDS format of why it is better to have intracranial data in individual rather than template coordinates, by Alex Rockhill (#975) 
- mne_bids.update_anat_landmarks()can now directly work with fiducials saved from the MNE-Python coregistration GUI or- mne.io.write_fiducials(), by Richard Höchenberger (#977)
- All non-MNE-Python BIDS coordinate frames are now set to - 'unknown'on reading, by Alex Rockhill (#979)
- mne_bids.write_raw_bids()can now write to template coordinates by Alex Rockhill (#980)
- Add - mne_bids.template_to_head()to transform channel locations in BIDS standard template coordinate systems to- headand also provides a- trans, by Alex Rockhill (#983)
🧐 API and behavior changes#
- mne_bids.update_anat_landmarks()will now by default raise an exception if the requested MRI landmarks do not already exist. Use the new- on_missingparameter to control this behavior, by Richard Höchenberger (#957)
- mne_bids.get_head_mri_trans()now raises a warning if- datatypeor- suffixof the provided electrophysiological- mne_bids.BIDSPathare not set. In the future, this will raise an exception, by Richard Höchenberger`_(:gh:`969)
- Passing - fs_subject=Noneto- get_head_mri_trans()has been deprecated. Please pass the FreeSurfer subject name explicitly, by Richard Höchenberger`_ (#977)
- Corrupted or missing fiducials in - headcoordinates now raise an error instead of warning in- mne_bids.write_raw_bids()by Alex Rockhill (#980)
🛠 Requirements#
- MNE-BIDS now requires Jinja2 to work with MNE-Python 0.24. 
🪲 Bug fixes#
- Forcing EDF conversion in - mne_bids.write_raw_bids()properly uses the- overwriteparameter now, by Adam Li (#930)
- mne_bids.make_report()now correctly handles- participant.tsvfiles that only contain a- participant_idcolumn, by Simon Kern (#912)
- mne_bids.write_raw_bids()doesn’t store age, handedness, and sex in- participants.tsvanymore for empty-room recordings, by Richard Höchenberger (#935)
- When - mne_bids.read_raw_bids()automatically creates new hierarchical event names based on event values (in cases where the same- trial_typewas assigned to different- value``s in ``*_events.tsv),- 'n/a'values will now be converted to- 'na', by Richard Höchenberger (#937)
- Avoid - DeprecationWarningin- mne_bids.inspect_dataset()with the upcoming MNE-Python 1.0 release, by Richard Höchenberger (#942)
- Avoid modifying the instance of - mne_bids.BIDSPathif validation fails when calling- mne_bids.BIDSPath.update(), by Alexandre Gramfort (#950)
- mne_bids.get_head_mri_trans()now respects- datatypeand- suffixof the provided electrophysiological- mne_bids.BIDSPath, simplifying e.g. reading of derivaties, by Richard Höchenberger (#969)
- Do not convert unknown coordinate frames to - head, by Alex Rockhill (#976)
Version 0.9 (2021-11-23)#
This release brings compatibility with MNE-Python 0.24 and some new convenience functions and speedups of existing code to help you be more productive! 👩🏽💻 And, of course, plenty of bug fixes. 🐞
Notable changes#
- 🧠 Compatibility with MNE-Python 0.24! 
- 👻 Anonymize an entire BIDS dataset via - mne_bids.anonymize_dataset()!
- 🏝 Conveniently turn a path into a - BIDSPathvia- get_bids_path_from_fname()!
- 🏎 - mne_bids.stats.count_events()and- mne_bids.BIDSPath.match()are operating much faster now!
- 🔍 - write_raw_bids()now stores the names of the input files in the- sourcecolumn of- *_scans.tsv, making it easier for you to go back to the source should you ever need to!
Authors#
People who contributed to this release (in alphabetical order):
Detailed list of changes#
Enhancements#
- mne_bids.get_anat_landmarks()now accepts a- mne_bids.BIDSPathas- imageparameter, by Alex Rockhill (#852)
- mne_bids.write_raw_bids()now accepts- 'EDF'as a- 'format'value to force conversion to EDF files, by Adam Li (#866)
- mne_bids.write_raw_bids()now adds- SpatialCompensationinformation to the JSON sidecar for MEG data, by Julia Guiomar Niso Galán (#885)
- Modify iEEG tutorial to use MNE - rawobject, by Alex Rockhill (#859)
- Add - mne_bids.search_folder_for_text()to find specific metadata entries (e.g. all- "n/a"sidecar data fields, or to check that “60 Hz” was written properly as the power line frequency), by Alex Rockhill (#870)
- Add - mne_bids.get_bids_path_from_fname()to return a- mne_bids.BIDSPathfrom a file path, by Adam Li (#883)
- Great performance improvements in - mne_bids.stats.count_events()and- mne_bids.BIDSPath.match(), significantly reducing processing time, by Richard Höchenberger (#888)
- The command - mne_bids count_eventsgained new parameters:- --outputto direct the output into a CSV file;- --overwriteto overwrite an existing file; and- --silentto suppress output of the event counts to the console, by Richard Höchenberger (#888)
- The new function - mne_bids.anonymize_dataset()can be used to anonymize an entire BIDS dataset, by Richard Höchenberger (#893, #914, #917)
- mne_bids.BIDSPath.find_empty_room()gained a new parameter- use_sidecar_onlyto limit empty-room search to the metadata stored in the sidecar files, by Richard Höchenberger (#893)
- mne_bids.BIDSPath.find_empty_room()gained a new parameter- verboseto limit verbosity of the output, by Richard Höchenberger (#893)
- mne_bids.write_raw_bids()can now write the source filename to- scans.tsvin a new column,- source, by Adam Li (#890)
API and behavior changes#
- mne_bids.mark_bad_channelsdeprecated in favor of- mne_bids.mark_channels(), which allows specifying the status to change channels to by Adam Li (#882)
- mne_bids.get_entities_from_fname()does not return- suffixanymore as that is not considered a BIDS entity, by Adam Li (#883)
- Reading BIDS data with - "HeadCoilFrequency"and- "PowerLineFrequency"data specified in JSON sidecars will only “warn” in case of mismatches between Raw and JSON data, by Franziska von Albedyll (#855)
- Accessing - mne_bids.BIDSPath.fpathemit a warning anymore if the path does not exist. This behavior was unreliable and yielded confusing error messages in certain use cases. Use- mne_bids.BIDSPath.fpath.exists()to check whether the path exists in the file system, by Richard Höchenberger (#904)
- mne_bids.get_entity_vals()gained a new parameter,- ignore_dirs, to exclude directories from the search, by Adam Li and Richard Höchenberger (#899, #908)
- In - mne_bids.write_anat(), the deprecated parameters- raw,- trans, and- t1whave been removed, by Richard Höchenberger (#909)
- In - mne_bids.write_raw_bids(), any EDF output is always stored with lower-case extension (- .edf), by Adam Li (#906)
Requirements#
- MNE-BIDS now requires MNE-Python 0.24 or newer. 
- Writing BrainVision files now requires - pybvversion 0.6, by Stefan Appelhoff (#880)
Bug fixes#
- Fix writing Ricoh/KIT data that comes without an associated - .mrk,- .elp, or- .hspfile using- mne_bids.write_raw_bids(), by Richard Höchenberger (#850)
- Properly support CTF MEG data with 2nd-order gradient compensation, by Mainak Jas (#858) 
- Fix writing and reading EDF files with upper-case extension ( - .EDF), by Adam Li (#868)
- Fix reading of TSV files with only a single column, by Marijn van Vliet (#886) 
- Fix erroneous measurement date check in - mne_bids.write_raw_bids()when requesting to anonymize empty-room data, by Richard Höchenberger (#893)
- mne_bids.write_raw_bids()now raises an exception if the provided- mne_bids.BIDSPathdoesn’t contain- subjectand- taskentities, which are required for neurophysiological data, by Richard Höchenberger (#903)
- mne_bids.read_raw_bids()now handles datasets with multiple electrophysiological data types correctly, by Richard Höchenberger (#910, #916)
- More robust handling of situations where - mne_bids.read_raw_bids()tries to read a file that does not exist, by Richard Höchenberger (#904)
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=Trueto- mne_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 - trueor- falsedepending 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.BIDSPathobject, 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- FIFFfiles on macOS and Linux, by Richard Höchenberger (#778)
- mne_bids.BIDSPathnow 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_roomthat allows to specify an associated empty-room recording when writing an MEG data file. This information will be stored in the- AssociatedEmptyRoomfield 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.tsvand the raw data, by Richard Höchenberger (#823)
- MNE BIDS now accepts - .mrkhead 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.jsonfile, 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=Trueto 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_bidscommand has lost its- --allow_maxshieldparameter. 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- AssociatedEmptyRoomfield 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 014stimulus 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,- transand- t1wof- 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_preloadis 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-pyis 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 a- gendercolumn if no- sexcolumn is found in- participants.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 to- FIFFfiles – 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 with- overwrite=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_timecolumn 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()and- mne_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)
Version 0.7 (2021-03-22)#
This release brings numerous enhancements and bug fixes that enhance reading and writing BIDS data, and improve compatibility with the latest BIDS specifications.
Notable changes#
- Channel names in - *_channels.tsvand- *_electrodes.tsvfiles now always take precedence over the names stored in the raw files.
- When reading data where the same trial type refers to different trigger values, we will now automatically create hierarchical event names in the form of - trial_type/value1, trial_type/value2` etc.
- mne_bids.write_raw_bids()now allows users to specify a format conversion via the new- formatparameter.
- Various improvements to data reading and - mne_bids.BIDSPathmake working with real-life data easier.
- Many bug fixes in - mne_bids.write_raw_bids()and in the MNE-BIDS Inspector.
Authors#
Detailed list of changes#
Enhancements#
- Some datasets out in the real world have a non-standard - stim_typeinstead of a- trial_typecolumn in- *_events.tsv.- mne_bids.read_raw_bids()now makes use of this column, and emits a warning, encouraging users to rename it, by Richard Höchenberger (#680)
- When reading data where the same event name or trial type refers to different event or trigger values, we will now create a hierarchical event name in the form of - trial_type/value, e.g.- stimulus/110, by Richard Höchenberger (#688)
- When reading data via - mne_bids.read_raw_bids(), the channel names specified in the BIDS- *_channels.tsvand- *_electrodes.tsvfiles now always take precedence over (and do not need to match) the channel names stored in the raw files anymore, by Adam Li and Richard Höchenberger (#691, #704)
- Improve the - Convert iEEG data to BIDStutorial to include a note on how BIDS and MNE-Python coordinate frames are handled, by Adam Li (#717)
- More detailed error messages when trying to write modified data via - mne_bids.write_raw_bids(), by Richard Höchenberger (#719)
- If - check=True,- mne_bids.BIDSPathnow checks the- spaceentity to be valid according to BIDS specification Appendix VIII, by Stefan Appelhoff (#724)
- Data types that are currently unsupported by MNE-BIDS (e.g. - dwi,- func) can now be used in- mne_bids.BIDSPathby setting- check=False, by Adam Li (#744)
- Arbitrary file names can now be represented as a BIDSPath` by passing the entire name as - suffixand setting- check=False, by Adam Li (#729)
- Add support for MNE’s flux excitation channel ( - exci), by Maximilien Chaumon (#728)
- mne_bids.BIDSPath.match()gained a new parameter- check; when setting- check=True,- match()will only return paths that conform to BIDS, by Richard Höchenberger (#726)
- BIDSPath.rootnow automatically expands- ~to the user’s home directory, by Richard Höchenberger (#725)
API and behavior changes#
- Add - formatkwarg to- mne_bids.write_raw_bids()that allows users to specify if they want to force conversion to- BrainVisionor- FIFfile format, by Adam Li (#672)
- mne_bids.read_raw_bids()now stores the- participant_idvalue from- participants.tsvin- raw.info['subject_info']['his_id'], not in- raw.info['subject_info']['participant_id']anymore, by Richard Höchenberger (#745)
Requirements#
Bug fixes#
- Fix writing MEGIN Triux files, by Alexandre Gramfort (#674) 
- Anonymization of EDF files in - write_raw_bids()will now convert recording date to- 01-01-1985 00:00:00if anonymization takes place, while setting the recording date in the- scans.tsvfile to the anonymized date, thus making the file EDF/EDFBrowser compliant, by Adam Li (#669)
- mne_bids.write_raw_bids()will not overwrite an existing- coordsystem.jsonanymore, unless explicitly requested, by Adam Li (#675)
- mne_bids.read_raw_bids()now properly handles datasets without event descriptions, by Richard Höchenberger (#680)
- mne_bids.stats.count_events()now handles files without a- trial_typeor- stim_typecolumn gracefully, by Richard Höchenberger (#682)
- mne_bids.read_raw_bids()now correctly treats- coordsystem.jsonas optional for EEG and MEG data, by Diego Lozano-Soldevilla (#691)
- mne_bids.read_raw_bids()now ignores- excludeparameters passed via- extra_params, by Richard Höchenberger (#703)
- mne_bids.write_raw_bids()now retains original event IDs in the- valuecolumn of- *_events.tsv, by Richard Höchenberger (#708)
- Fix writing correct - iEEGCoordinateSystemDescription, by Stefan Appelhoff (#706)
- FIF files that were split due to filesize limitations (using the - _split-<label>entity), are now all listed in- scans.tsv, as recommended by BIDS, by Eduard Ort (#710)
- The - mne_bids inspectcommand now automatically tries to discover flat channels by default; this should have been the case all along, but the default parameter was set incorrectly, by Richard Höchenberger (#726)
- mne_bids.inspect_dataset()would sometimes open the same file multiple times, by Richard Höchenberger (#726)
- mne_bids.inspect_dataset()would try to open the SSP projector selection window for non-MEG data, by Richard Höchenberger (#726)
Version 0.6 🎄 (2020-12-16)#
These are challenging days for many of us, and to make your lives ever so slightly easier, we’ve been working hard to deliver this early Christmas present 🎁 And even if you do not celebrate Christmas, we are quite certain you will like what we got for you! So – what are you waiting for? It’s time to unwrap!
Notable changes#
- The new Inspector, which can be invoked via - mne_bids.inspect_dataset(), allows you to interactively explore your raw data, change the bad channels selection, and edit- mne.Annotations. It also performs automated detection of flat data segments or channels, to assist you during visual inspection. The capabilities of the inspector will be further expanded in upcoming releases of MNE-BIDS.
- To further assist you during data inspection, we have added a function to summarize all events present in a dataset, - mne_bids.stats.count_events().
- Sidecar JSON files can now be updated using a template via - mne_bids.update_sidecar_json().
- You can now read and write FLASH MRI images using - mne_bids.write_anat(). We also fixed some issues with MRI defacing along the way.
- Event durations are now preserved upon reading and writing data (we used to set all event durations to zero before). 
Authors#
Detailed list of changes#
Enhancements#
- The function - mne_bids.print_dir_tree()has a new parameter- return_strwhich allows it to return a str of the dir tree instead of printing it, by Stefan Appelhoff (#600)
- The function - mne_bids.print_dir_tree()has a new parameter- return_strwhich allows it to return a str of the dir tree instead of printing it, by Stefan Appelhoff (#600)
- mne_bids.write_raw_bids()now preserves event durations when writing- mne.Annotationsto- *_events.tsvfiles, and- mne_bids.read_raw_bids()restores these durations upon reading, by Richard Höchenberger (#603)
- Writing BrainVision data via - mne_bids.write_raw_bids()will now set the unit of EEG channels to µV for enhanced interoperability with other software, by Alexandre Gramfort, Stefan Appelhoff, and Richard Höchenberger (#610)
- New function - mne_bids.stats.count_events()to easily summarize all the events present in a dataset, by Alexandre Gramfort (#629)
- Add - mne_bids.update_sidecar_json()to allow updating sidecar JSON files with a template, by Adam Li and Austin Hurst (#601)
- Add support for anonymizing EDF and BDF files without converting to BrainVision format, by Austin Hurst (#636) 
- Add support for writing FLASH MRI data with - mne_bids.write_anat(), by Alexandre Gramfort (#641)
- Add interactive data inspector - mne_bids.inspect_dataset(), by Richard Höchenberger (#561)
- Do not complain about missing events if it’s likely we’re dealing with resting-state data in - mne_bids.write_raw_bids(), by new contributor Ethan Knights (#631)
API changes#
- When passing event IDs to - mne_bids.write_raw_bids()via- events_datawithout an accompanying event description in- event_id, we will now raise a ValueError. This ensures that accidentally un-described events won’t get written unnoticed, by Richard Höchenberger (#603)
- The - mne_bids.get_head_mri_trans()now has a parameter- extra_paramsto allow passing arguments specific to a file format, by Mainak Jas (#638)
- The first parameter of - mne_bids.write_anat()is now called- imageand not- t1w, by Alexandre Gramfort (#641)
Requirements#
- Writing BrainVision data now requires - pybv0.4 or later.
Bug fixes#
- Make sure large FIF files with splits are handled transparently on read and write, by Alexandre Gramfort (#612) 
- The function - mne_bids.write_raw_bids()now outputs- *_electrodes.tsvand- *_coordsystem.jsonfiles for EEG/iEEG data that are BIDS-compliant (only contain subject, session, acquisition, and space entities), by Adam Li (#601)
- Make sure writing empty-room data with anonymization shifts the session back in time, by Alexandre Gramfort (#611) 
- Fix a bug in - mne_bids.write_raw_bids(), where passing raw data with- mne.Annotationsset and the- event_iddictionary not containing the- mne.Annotationsdescriptions as keys would raise an error, by Richard Höchenberger (#603)
- Fix a bug in - mne_bids.write_raw_bids()when passing raw MEG data with Internal Active Shielding (IAS) from Triux system, by Alexandre Gramfort (#616)
- Fix a bug in - mne_bids.write_raw_bids(), where original format of data was not kept when writing to FIFF, by Alexandre Gramfort, Stefan Appelhoff, and Richard Höchenberger (#610)
- Fix a bug where conversion to BrainVision format was done even when non-Volt channel types were present in the data (BrainVision conversion is done by - pybv, which currently only supports Volt channel types), by Stefan Appelhoff (#619)
- Ensure sidecar files (tsv and - json) are always read and written in UTF-8, by Richard Höchenberger (#625)
- Fix a bug where - participants.tsvwas not being appended to correctly when it contained a subset of- hand,- ageand- sex, by Adam Li (#648)
- mne_bids.copyfiles.copyfile_eeglab()didn’t handle certain EEGLAB files correctly, by Richard Höchenberger (#653)
- Fix bug where images with different orientations than the T1 used to define the landmarks were defaced improperly, by Alex Rockhill (#651) 
Version 0.5 (2020-10-22)#
This is a big release with lots of changes, many of them breaking existing code. But do not fear: migration is easy, and you will love what we have been cooking for you!
Notable changes#
- We introduce - mne_bids.BIDSPath(), a new class for all BIDS file and folder operations. All functions in MNE-BIDS that previously accepted filenames and folder locations (e.g.- bids_root) have been updated to work with- BIDSPath. Others have been removed. Consequently, you will need to update your existing code, too. See the- API changessection for an overview of which functions have changed or have been removed, and follow this introduction and our to learn about the basics of- BIDSPath. Don’t worry – it’s going to be a breeze! 🤗
- MNE-BIDS now requires MNE-Python 0.21. 
- The new function - mne_bids.make_report()can help you populate a paragraph of your next paper’s methods section!
- You can now interactively mark channels as bad using - mne_bids.mark_bad_channels.
- Elekta/Neuromag/MEGIN fine-calibration and crosstalk files can now be stored in your BIDS dataset via - mne_bids.write_meg_calibration()and- mne_bids.write_meg_crosstalk().
- When writing a raw file that contains annotations, these will now be converted to and stored as events by - mne_bids.write_raw_bids().
Authors#
The following people have contributed to this release of MNE-BIDS:
Detailed list of changes#
Enhancements#
- Introduce - mne_bids.BIDSPath, the new universal MNE-BIDS working horse for file operations, by Adam Li, Alex Rockhill, and Richard Höchenberger (#496, #507, #511, #514, #542)
- The new function - mne_bids.make_report()and its corresponding CLI function,- make_report, produce human-readable summary of the BIDS dataset, by Adam Li (#457)
- read_raw_bids()now reads- participants.tsvdata, by Adam Li (#392)
- mne_bids.get_entity_vals()has gained- ignore_*keyword arguments to exclude specific values from the list of results, e.g. the entities for a particular subject or task, by Richard Höchenberger (#409)
- mne_bids.write_raw_bids()now uses the- spaceBIDS entity when writing iEEG electrodes and coordinate frames, by Adam Li (#390)
- convert_ieeg_to_bidsto now use sample ECoG EDF data, by Adam Li (#390)
- mne_bids.write_raw_bids()now writes- CoordinateSystemDescriptionas specified in BIDS Specification if CoordinateSystem is MNE-compatible, by Adam Li (#416)
- mne_bids.write_raw_bids()and- mne_bids.read_raw_bids()now handle scalp EEG if Captrak coordinate system and NAS/LPA/RPA landmarks are present, by Adam Li (#416)
- write_raw_bids()now adds citations to the- README, by Alex Rockhill (#463)
- make_dataset_description()now has an additional parameter- dataset_typeto set the recommended field- DatasetType(defaults to- "raw"), by Stefan Appelhoff (#472)
- mne_bids.copyfiles.copyfile_brainvision()now has an- anonymizeparameter to control anonymization, by Stefan Appelhoff (#475)
- mne_bids.read_raw_bids()and- mne_bids.write_raw_bids()now map respiratory (- RESP) channel types, by Richard Höchenberger (#482)
- When impedance values are available from a - raw.impedancesattribute, MNE-BIDS will now write an- impedancecolumn to- *_electrodes.tsvfiles, by Stefan Appelhoff (#484)
- mne_bids.write_raw_bids()writes out status_description with- 'n/a'values into the channels.tsv sidecar file, by Adam Li (#489)
- Added a new function - mne_bids.mark_bad_channelsand command line interface- mark_bad_channelswhich allows updating of the channel status (bad, good) and description of an existing BIDS dataset, by Richard Höchenberger (#491)
- mne_bids.read_raw_bids()correctly maps all specified- handednessand- sexoptions to MNE-Python, instead of only an incomplete subset, by Richard Höchenberger (#550)
- mne_bids.write_raw_bids()only writes a- READMEif it does not already exist, by Adam Li (#489)
- Allow - mne_bids.write_raw_bids()to write EEG/iEEG files from Persyst using- mne.io.read_raw_persystfunction, by Adam Li (#546)
- mne_bids.print_dir_tree()now works if a- pathlib.Pathobject is passed, by Adam Li (#555)
- Allow writing of Elekta/Neuromag/MEGIN fine-calibration and crosstalk data via the new functions - mne_bids.write_meg_calibration()and- mne_bids.write_meg_crosstalk(), and retrieval of the file locations via- BIDSPath.meg_calibration_fpathand- BIDSPath.meg_crosstalk_fpath, by Richard Höchenberger (#562)
- Allow - mne_bids.write_raw_bids()to write EEG/iEEG files from Nihon Kohden using- mne.io.read_raw_nihonfunction, by Adam Li (#567)
- Allow - mne_bids.get_entity_vals()to ignore datatypes using- ignore_datatypeskwarg, by Adam Li (#578)
- Add - with_keykeyword argument to- mne_bids.get_entity_vals()to allow returning the full entity strings, by Adam Li (#578)
- mne_bids.write_raw_bids()now also writes- mne.io.Raw.annotationsto- *_events.tsv, by Adam Li and Richard Höchenberger (#582)
- BIDS conformity: The - _part-%dentity is now called- _split-throughout BIDS, MNE, and MNE-BIDS, by Stefan Appelhoff (#417)
Bug fixes#
- Fix bug in - write_raw_bids()where raw.info[‘subject_info’] can be- None, by Adam Li (#392)
- read_raw_bids()will now read all channels from- electrodes.tsv. Channels with coordinates- 'n/a'will also be included but their location set to- np.nanin the- rawobject, by Adam Li (#393)
- Do not change an events array passed to - write_raw_bids()via the- events_datakeyword argument, by Alexandre Gramfort (#402)
- Fix - mne_bids.read_raw_bids()to correctly scale coordinate to meters in- electrodes.tsv, and also read possible iEEG coordinate frames via the ‘space’ BIDs-entity, by Adam Li (#390)
- Fix coordystem reading in - mne_bids.read_raw_bids()for cases where the- acqis undefined, by Stefan Appelhoff (#440)
- Calling - write_raw_bids()with- overwrite==Truewill preserve existing entries in- participants.tsvand- participants.jsonif the new dataset does not contain these entries, by Adam Li (#442)
- BIDS entity - recordingshould be represented as- recin filenames, by Adam Li (#446)
- Fix - write_raw_bids()when- info['dig']is- None, by Alexandre Gramfort (#452)
- mne_bids.write_raw_bids()now applies- verboseto the functions that read events, by Evgenii Kalenkovich (#453)
- Fix - raw_to_bidsCLI tool to work with non-FIFF files, by Austin Hurst (#456)
- Fix - mne_bids.write_raw_bids()to output BTi and CTF data in the- scans.tsvaccording to the BIDS specification, by Adam Li (#465)
- mne_bids.read_raw_bids()now populates the list of bad channels based on- *_channels.tsvif (and only if) a- statuscolumn is present, ignoring similar metadata stored in raw file (which will still be used if no- statuscolumn is present in- *_channels.tsv), by Richard Höchenberger (#499)
- Ensure that - Raw.info['bads']returned by- mne_bids.read_raw_bids()is always a list, by Richard Höchenberger (#501)
- mne_bids.write_raw_bids()now ensures that all parts of the- mne.io.Rawinstance stay in sync when using anonymization to shift dates, e.g.- raw.annotations, by Richard Höchenberger (#504)
- Fix - mne_bids.write_raw_bids()failed BIDS validator for- raw.info['dig'] = [], by Alex Rockhill (#505)
- Ensure - mne_bids.print_dir_tree()prints files and directories in alphabetical order, by Richard Höchenberger (#563)
- mne_bids.write_raw_bids()now writes the correct coordinate system names to the JSON sidecars, by Richard Höchenberger (#585)
API changes#
In the transition to using mne_bids.BIDSPath(), the following functions have been updated:
- mne_bids.write_anat()now accepts a- mne_bids.BIDSPathinstead of entities as keyword arguments, by Adam Li (#575)
- In - mne_bids.write_raw_bids(),- mne_bids.read_raw_bids(), and- mne_bids.get_head_mri_trans(), the- bids_basenameand- bids_rootkeyword arguments have been removed. The functions now expect- bids_path, an instance of- mne_bids.BIDSPath, by Adam Li (#525)
The following functions have been removed:
- mne_bids.make_bids_basenamehas been removed. Use- mne_bids.BIDSPathdirectly, by Adam Li (#511)
- mne_bids.get_matched_empty_roomhas been removed. Use- mne_bids.BIDSPath.find_empty_room()instead, by Richard Höchenberger (#421, #535)
- mne_bids.make_bids_foldershas been removed. Use- mne_bids.BIDSPath.mkdir()instead, by Adam Li (#543)
Further API changes:
- The functions - mne_bids.write_anat(),- mne_bids.make_report(),- mne_bids.get_entity_vals()and- mne_bids.get_datatypes()use now expect a- rootkeyword argument instead of- bids_root, Adam Li (#556)
- Added namespace - mne_bids.pathwhich hosts path-like functionality for MNE-BIDS, by Adam Li (#483)
- The - datasets.pymodule was removed from- MNE-BIDSand its utility was replaced by- mne.datasets, by Stefan Appelhoff (#471)
- mne_bids.make_dataset_description()now accepts the argument- overwrite, which will reset all fields if- True. If- False, user-provided fields will no longer be overwritten by- mne_bids.write_raw_bids()when its- overwriteargument is- True, unless new values are supplied, by Alex Rockhill (#478)
- A function for retrieval of BIDS entity values from a filename, - mne_bids.get_entities_from_fname(), is now part of the public API (it used to be a private function called- mne_bids.path._parse_bids_filename), by Richard Höchenberger and Adam Li (#487, #496)
- Entity names passed to - mne_bids.get_entity_vals()must now be in the “long” format, e.g.- subjectinstead of- subetc., by Richard Höchenberger (#501)
- It is now required to specify the Power Line Frequency to use - write_raw_bids(), while in 0.4 it could be estimated, by Alexandre Gramfort and Alex Rockhill (#506)
- Rename - mne_bids.get_modalitiesto- mne_bids.get_datatypes()for getting data types from a BIDS dataset, by Alexandre Gramfort (#253)
Version 0.4 (2020-04-04)#
Changelog#
- Added automatic conversion of FIF to BrainVision format with warning for EEG only data and conversion to FIF for meg non-FIF data, by Alex Rockhill (#237) 
- Add possibility to pass raw readers parameters (e.g. allow_maxshield) to - read_raw_bids()to allow reading BIDS-formatted data before applying maxfilter, by Sophie Herbst
- New feature in - mne_bids.write.write_anatfor shear deface of mri, by Alex Rockhill (#271)
- Added option to anonymize by shifting measurement date with anonymize parameter, in accordance with BIDS specifications, by Alex Rockhill (#280) 
- Added - mne_bids.get_matched_empty_roomto get empty room filename matching a data file, by Mainak Jas (#290)
- Add ability for - mne_bids.get_head_mri_trans()to read fiducial points from fif data without applying maxfilter, by Maximilien Chaumon (#291)
- Added landmark argument to - write_anat()to pass landmark location directly for deface, by Alex Rockhill (#292)
- Standardized bids_root and output_path arguments in - read_raw_bids(),- write_raw_bids(), and- make_bids_foldersto just bids_root, by Adam Li (#303)
- Add existence check for - write_raw_bids()before- make_dataset_description()is called, by Adam Li (#331)
- Update scans.tsv writer to adhere to MNE-Python v0.20+ where meas_date is stored as a - datetimeobject, by Adam Li (#344)
- read_raw_bids()now reads in sidecar json files to set, or estimate Power Line Frequency, by Adam Li (#341)
- Allow FIF files with multiple parts to be read using - read_raw_bids(), by Teon Brooks (#346)
- Added handedness to participant files, by Dominik Welke (#354) 
- MNE-BIDS can now handle a paths that are - pathlib.Pathobjects (in addition to strings), by Richard Höchenberger (#362)
- The documentation is now available for all MNE-BIDS versions via a dropdown menu, by Stefan Appelhoff (#370) 
Bug#
- Fixed broken event timing broken by conversion to BV in - write_raw_bids(), by Alex Rockhill (#294)
- Support KIT related files .elp and .hsp BIDS conversion in - write_raw_bids(), by Fu-Te Wong (#323)
- Enforce that the name arg is a required field for - mne_bids.make_dataset_description(), by Teon Brooks and Stefan Appelhoff (#342)
- Fix writing to scans.tsv file when anonymization is turned on, by Adam Li (#352) 
- Fix - read_raw_bids()to properly read in sidecar json even if a similarly named copy lives inside “derivatives/” sub-folder, by Adam Li (#350)
- Fix - read_raw_bids()to properly read in events.tsv sidecar if the ‘trial_type’ description has a “#” character in it, by Adam Li (#355)
- Avoid cases in which NumPy would raise a FutureWarning when populating TSV files, by Richard Höchenberger (#372) 
- Remove events with an unknown onset, and assume unknown event durations to be zero, when reading BIDS data via - read_raw_bids(), by Richard Höchenberger (#375)
Authors#
People who contributed to this release (in alphabetical order):
Version 0.3 (2019-12-17)#
Changelog#
- New function - mne_bids.get_modalitiesfor getting data types from a BIDS dataset, by Stefan Appelhoff (#253)
- New function - mne_bids.get_entity_vals()allows to get a list of instances of a certain entity in a BIDS directory, by Mainak Jas and Stefan Appelhoff (#252)
- mne_bids.print_dir_tree()now accepts an argument- max_depthwhich can limit the depth until which the directory tree is printed, by Stefan Appelhoff (#245)
- New command line function exposed - cpfor renaming/copying files including automatic doc generation “CLI”, by Stefan Appelhoff (#225)
- read_raw_bids()now also reads channels.tsv files accompanying a raw BIDS file and sets the channel types accordingly, by Stefan Appelhoff (#219)
- Add example - convert_mri_and_transfor using- get_head_mri_trans()and- write_anat(), by Stefan Appelhoff (#211)
- get_head_mri_trans()allows retrieving a- transobject from a BIDS dataset that contains MEG and T1 weighted MRI data, by Stefan Appelhoff (#211)
- write_anat()allows writing T1 weighted MRI scans for subjects and optionally creating a T1w.json sidecar from a supplied- transobject, by Stefan Appelhoff (#211)
- read_raw_bids()will return the the raw object with- raw.info['bads']already populated, whenever a- channels.tsvfile is present, by Stefan Appelhoff (#209)
- read_raw_bids()is now more likely to find event and channel sidecar json files, by Marijn van Vliet (#233)
- Enhanced - read_raw_bids()and- write_raw_bids()for iEEG coordinates along with example and unit test, by Adam Li (#335)
Bug#
- Fixed bug in - mne_bids.datasets.fetch_faces_datawhere downloading multiple subjects was impossible, by Stefan Appelhoff (#262)
- Fixed bug where - read_raw_bids()would throw a ValueError upon encountering strings in the “onset” or “duration” column of events.tsv files, by Stefan Appelhoff (#234)
- Allow raw data from KIT systems to have two marker files specified, by Matt Sanderson (#173) 
API#
- read_raw_bids()no longer optionally returns- eventsand- event_idbut returns the raw object with- mne.Annotations, whenever an- events.tsvfile is present, by Stefan Appelhoff (#209)
Authors#
People who contributed to this release (in alphabetical order):
Version 0.2 (2019-04-26)#
Changelog#
- Add a reader for BIDS compatible raw files, by Mainak Jas (#135) 
Bug#
- Normalize the length of the branches in - mne_bids.print_dir_tree()by the length of the root path, leading to more adequate visual display, by Stefan Appelhoff (#192)
- Assert a minimum required MNE-version, by Dominik Welke (#166) 
- Add function in mne_bids.utils to copy and rename CTF files - mne_bids.utils.copyfile_ctf, by Romain Quentin (#162)
- Encoding of BrainVision .vhdr/.vmrk files is checked to prevent encoding/decoding errors when modifying, by Dominik Welke (#155) 
- The original units present in the raw data will now correctly be written to channels.tsv files for BrainVision, EEGLAB, and EDF, by Stefan Appelhoff (#125) 
- Fix logic with inferring unknown channel types for CTF data, by Mainak Jas (#129) 
- Fix the file naming for FIF files to only expose the part key-value pair when files are split, by Teon Brooks (#137) 
- Allow files with no stim channel, which could be the case for example in resting state data, by Mainak Jas (#167) 
- Better handling of unicode strings in TSV files, by Mainak Jas (#172) 
- Fix separator in scans.tsv to always be /, by Matt Sanderson (#176) 
- Add seeg to - mne_bids.utils._handle_datatypewhen determining the kind of ieeg data, by Ezequiel Mikulan (#180)
- Fix problem in copying CTF files on Network File System due to a bug upstream in Python, by Mainak Jas (#174) 
- Fix problem in copying BTi files. Now, a utility function ensures that all the related files such as config and headshape are copied correctly, by Mainak Jas (#135) 
- Fix name of “sample” and “value” columns on events.tsv files, by Ezequiel Mikulan (#185) 
- Update function to copy KIT files to the meg directory, by Matt Sanderson (#187) 
API#
- make_dataset_description()is now available from- mne_bidsmain namespace, all copyfile functions are available from- mne_bids.copyfiles()namespace, by Stefan Appelhoff (#196)
- Add support for non maxfiltered .fif files, by Maximilien Chaumon (#171) 
- Remove support for Neuroscan - .cntdata because its support is no longer planned in BIDS, by Stefan Appelhoff (#142)
- Remove support for Python 2 because it is no longer supported in MNE-Python, by Teon Brooks (#141) 
- Remove Pandas requirement to reduce number of dependencies, by Matt Sanderson (#122) 
- Use more modern API of event_from_annotations in MNE for extracting events in .vhdr and .set files, by Mainak Jas (#167) 
Authors#
People who contributed to this release (in alphabetical order):
Version 0.1 (2018-11-05)#
Changelog#
- Add example for how to rename BrainVision file triplets: rename_brainvision_files.py, by Stefan Appelhoff (#104) 
- Add function to fetch BrainVision testing data - mne_bids.datasets.fetch_brainvision_testing_data, by Stefan Appelhoff (#104)
- Add support for EEG and a corresponding example: make_eeg_bids.py, by Stefan Appelhoff (#78) 
- Update - mne_bids.raw_to_bidsto work for KIT and BTi systems, by Teon Brooks (#16)
- Add support for iEEG and add - mne_bids.make_bids_foldersand- mne_bids.make_bids_folders, by Chris Holdgraf (#28 and #37)
- Add command line interface, by Teon Brooks (#31) 
- Add - mne_bids.print_dir_tree()for visualizing directory structures and restructuring package to be more open towards integration of other modalities (iEEG, EEG), by Stefan Appelhoff (#55)
- Automatically generate participants.tsv, by Matt Sanderson (#70) 
- Add support for KIT marker files to be exported with raw data, by Matt Sanderson (#114) 
Bug#
- Correctly handle the case when measurement date is not available, by Mainak Jas (#23) 
- Fix counting of miscellaneous channels, by Matt Sanderson (#49) 
- The source data is now copied over to the new BIDS directory. Previously this was only true for FIF data, by Stefan Appelhoff (#55) 
- Fix ordering of columns in scans.tsv, by Matt Sanderson (#68) 
- Fix bug in how artificial trigger channel STI014 is handled in channels.tsv for KIT systems, by Matt Sanderson (#72) 
- Fix channel types for KIT system in channels.tsv, by Matt Sanderson (#76) 
- Fix the way FIF files are named to satisfy the BIDS part parameters of the filename construction, Teon Brooks (#102) 
- Fix how overwriting of data is handled, by Matt Sanderson (#99) 
Authors#
People who contributed to this release (in alphabetical order):