Version 1.9.0 (2024-12-18)#
Dependencies#
Minimum supported dependencies were updated in accordance with SPEC0, most notably Python 3.10+ is now required. (#12798)
Importing from
mne.decodingnow explicitly requiresscikit-learnto be installed, by Eric Larson. (#12834)Compatibility improved for Python 3.13, by Eric Larson. (#13021)
Bugfixes#
Fix typos in the Spatio-Spectral Decomposition example, by new contributor Simon M. Hofmann. (#12924)
Fix duration calculation for the textual (
__repr__) and html (_repr_html_, used by e.g. Jupyter) display ofmne.io.Rawinstances. For example a duration of 1h is now displayed as00:01:00rather than00:59:60. By new contributor Leonardo Rochael Almeida. (#12955)Fix IndexError when loading CNT file does not have annotations, by new contributor Ziyi ZENG. (#12986)
Fix handling of MRI file-path in
mne.SourceSpacesand safeguard saving ofpathlib.Pathwithh5ioby casting tostr, by Mathieu Scheltienne. (#12803)Cast
fwd["info"]toInfoandfwd["src"]toSourceSpaceswhen loading a forward solution from an HDF5 file, by Mathieu Scheltienne. (#12804)Fix bug where
mne.Epochs.compute_tfr()could not be used with the multitaper method and complex or phase outputs, by Thomas Binns. (#12842)Fixed a bug where split FIF files that were read and then appended to other
mne.io.Rawinstances had theirBAD boundaryannotations incorrectly offset in samples by the number of split files, by Eric Larson. (#12843)Enforce SI units for Eyetracking data (eyegaze data should be radians of visual angle, not pixels. Pupil size data should be meters). Updated tutorials so demonstrate how to convert data to SI units before analyses, by Scott Huberty. (#12846)
Prevent the
colorbarparameter being ignored in topomap plots such asmne.time_frequency.Spectrum.plot_topomap(), by Thomas Binns. (#12853)Fix bug where invalid data types (e.g.,
np.ndarray``s) could be used in some :class:`mne.io.Info` fields like ``info["subject_info"]["weight"], by Eric Larson. (#12875)When creating a
SpectrumArray, the array shape check now compares against the total of both ‘good’ and ‘bad’ channels in the providedInfo(previously only good channels were checked), by Mathieu Scheltienne. (#12877)Fix bug where mne coreg would always show MEG channels even if the “MEG Sensors” checkbox was disabled, by Eric Larson. (#12884)
mne.ReportHDF5 files are now written inmode='a'(append) to allow users to store other data in the HDF5 files, by Eric Larson. (#12901)Fix bug in
mne.io.read_raw_gdf()when NumPy >= 2 is used, by Clemens Brunner. (#12909)Allow exporting edf where a channel contains only constant values, by Florian Hofer. (#12911)
Fix a bug in
mne.epochs.make_metadata(), where missing values in the columns generated forkeep_firstandkeep_lastevents were represented by empty strings, while it should have beenNAvalues, by Richard Höchenberger. (#12931)Fix decimal places of
floatmne.Evoked.naveinmne.Evoked.plot()andmne.Evoked.plot_image(), by Gennadiy Belonosov. (#12936)Fix displayed units in representations of classes such as
mne.io.Rawto correctly use KiB, MiB, GiB, and so on, by Clemens Brunner. (#12962)Gracefully handle invalid patient info when reading EDF files by Scott Huberty. (#12968)
Correct
mne.io.read_raw_cnt()to read responses and fix exceptions by Jacob Woessner. (#13007)Fix errant detection of software-rendered vs hardware-rendered MESA GL contexts in 3D rendering on Linux, by Eric Larson. (#13012)
Fix plot scaling for
Spectrum.plot(dB=True, amplitude=True), by Daniel McCloy. (#13036)
API changes by deprecation#
Deprecate
averageparameter inplot_filtersandplot_patternsmethods of themne.decoding.CSPandmne.decoding.SPoCclasses, by Thomas Binns. (#12829)Deprecate
subjectparameter in favor ofsubjectsinmne.datasets.eegbci.load_data(), by Stefan Appelhoff. (#12918)
New features#
Added support for
sensor_scalestomne.viz.Brain.add_sensors()andmne.viz.plot_alignment(), by new contributor Alex Lepauvre. (#12805)Add convenience
mne.io.Raw.durationproperty to centralize duration calculation for the textual (__repr__) and html (_repr_html_, used by e.g. Jupyter) display ofmne.io.Rawinstances, by new contributor Leonardo Rochael Almeida. (#12955)Add option to
mne.preprocessing.fix_stim_artifact()to use baseline average to flatten TMS pulse artifact by Fahimeh Mamashli and Padma Sundaram and Mohammad Daneshzand. (#6915)Add support for
dicttype argumentref_channelstomne.set_eeg_reference(), to allow flexible re-referencing (e.g.raw.set_eeg_reference(ref_channels={'A1': ['A2', 'A3']})will set the new A1 data to beA1 - mean(A2, A3)), by Alex Lepauvre and Qian Chu and Daniel McCloy. (#12366)Add reader for ANT Neuro files in the
*.cntformat withread_raw_ant(), by Mathieu Scheltienne, Eric Larson and Proloy Das. (#12792)Add support for a
mne.transforms.Transformin the argumenttransof the coregistration GUI called withmne.gui.coregistration(), by Mathieu Scheltienne. (#12801)Raw()andsave()now return the path to the saved file(s), by Victor Ferat. (#12811)mne.channels.read_custom_montage()may now read a newer version of the.elcASA Electrode file format, by Stefan Appelhoff. (#12830)Added the
titleargument tomne.viz.create_3d_figure(), andcolorandpositionarguments tomne.viz.set_3d_title(), by Eric Larson. (#12871)Improved reporting and plotting options:
mne.Report.add_projs()can now plot withmne.viz.plot_projs_joint()rather thanmne.viz.plot_projs_topomap()mne.Reportnow has attributesimg_max_widthandimg_max_resthat can be used to control image scaling.mne.Reportnow has an attributecollapsethat allows collapsing sections and/or subsections by default.mne.viz.plot_head_positions()now has atotals=Trueoption to show the total distance and angle of the head.
Changes by Eric Larson. (#12901)
Added the
psd_argsargument tomne.viz.plot_ica_sources()andmne.preprocessing.ICA.plot_sources(), by Richard Scholz. (#12912)Add ability to use
mne.preprocessing.compute_fine_calibration()with non-Neuromag-style systems, as well as options to control the bad-angle and error tolerances, by Eric Larson. (#12966)Add support for
uint16_codecargument inmne.io.read_raw_eeglab()whenpymatreader(which already supported this argument previously) is not installed, by Clemens Brunner. (#12971)Added support for saving and loading channel names from FIF in
mne.channels.DigMontage.save()andmne.channels.read_dig_fif()and added the convention that they should be saved as-dig.fif, by Eric Larson. (#13003)Add new
Raw.rescalemethod to rescale the data in place, by Clemens Brunner. (#13018)
Other changes#
Fix a mistake in Repairing artifacts with regression where the wrong regression coefficients were applied, by new contributor Jacob Phelan. (#12978)
Use custom code in
mne.sys_info()to get the amount of physical memory and a more informative CPU name instead of using thepsutilpackage, by Clemens Brunner. (#12787)Improve documentation clarity of
fit_transformmethods formne.decoding.SSD,mne.decoding.CSP, andmne.decoding.SPoCclasses, by Thomas Binns. (#12827)Improve handling of filenames in
raw.filenamesby usingPathinstead ofstr, by Mathieu Scheltienne. (#12843)Improve automatic figure scaling of
mne.viz.plot_events(), and event_id and count overview legend when a high amount of unique events is supplied, by Stefan Appelhoff. (#12844)mne.preprocessing.ICA.find_bads_muscle()can now be run when passing aninstwithout sensor positions. However, it will just use the first of three criteria (slope) to find muscle-related ICA components, by Stefan Appelhoff. (#12862)Update governance model, by Daniel McCloy. (#12896)
Improve the Auto-generating Epochs metadata, by Clemens Brunner and Richard Höchenberger. (#12931)
Mention some gotchas that arise from the fact that by default, we pool across dipole orientations when performing source estimation, by Marijn van Vliet (#12960)
Repository CI security is now audited using zizmor, by Eric Larson. (#13011)