Version 1.8.0 (2024-08-18)#
Dependencies#
- Minimum versions for dependencies were bumped to those ~2 years old at the time of release (by Eric Larson), including: - NumPy ≥ 1.23 
- SciPy ≥ 1.9 
- Matplotlib ≥ 3.6 
- scikit-learn ≥ 1.1 (#12554) 
 
- Official support for PySide2 has been dropped in this release (though it might continue to work), by Eric Larson. (#12742) 
Bugfixes#
- Fix bug where an event that occurred only once was excluded in - mne.io.read_raw_egi(), by new contributor Ping-Keng Jao. (#12300)
- Fix bug where - mne.stats.permutation_cluster_test()(and related functions) uses excessive amount of memory for large 2D data when TFCE method is selected, by new contributor Nicolas Fourcaud-Trocmé. (#12609)
- Assure that blink times are handled correctly - mne.preprocessing.eyetracking.interpolate_blinks(), even when the raw object is cropped by Scott Huberty and new contributor Sammi Chekroud. (#12759)
- Fix check for dropping all channels in - mne.io.Raw.drop_channels()and related methods, by new contributor Farzin Negahbani. (#12763)
- Fix scrolling behavior in - Reportwhen clicking on a TOC entry multiple times, by Richard Höchenberger. (#12561)
- Fix bug where - mne.decoding.get_coef()did not work properly with- mne.decoding.CSP, by Eric Larson. (#12562)
- The color scaling of Evoked topomaps added to reports via - mne.Report.add_evokeds()was sometimes sub-optimal if bad channels were present in the data. This has now been fixed and should be more consistent with the topomaps shown in the joint plots, by Richard Höchenberger. (#12578)
- Fix error causing - mne.Epochs.interpolate_bads()not to work for- seegchannels and fix a single contact on neighboring shafts sometimes being included in interpolation, by Alex Rockhill (#12593)
- Fix bug where - mne.io.read_raw_fil()could not assign bad channels on import, by George O’Neill. (#12597)
- Fixed a bug where - mne.Evoked.animate_topomap()did not work with- mne.preprocessing.compute_current_source_density()- modified data, by Michal Žák. (#12605)
- Fix overflow when plotting source estimates where data is all zero (or close to zero), and fix the range of allowed values for the colorbar sliders, by Marijn van Vliet. (#12612) 
- Fix adding channels to - EpochsTFRobjects, by Clemens Brunner. (#12616)
- Fix for new sklearn metadata routing protocol in decoding search_light, by Alex Gramfort (#12620) 
- Fix bug where - mne.time_frequency.csd_multitaper(),- mne.time_frequency.csd_fourier(),- mne.time_frequency.csd_array_multitaper(), and- mne.time_frequency.csd_array_fourier()would return cross-spectral densities with the- fminand- fmaxfrequencies missing, by Thomas Binns (#12633)
- Output types of sparse arrays were changed from - matrixto- arrayin- read_ch_adjacency(),- find_ch_adjacency(),- combine_adjacency(),- spatio_temporal_src_adjacency(), and related functions to comply with the pending deprecation of- np.matrix. The returned objects now behave like standard- ndarrayobjects, and in particular- *now operates element-wise instead of performing matrix multiplication. You can use- @as a backward compatible matrix multiplication for both- np.matrixand- np.ndarrayobjects, and if a matrix is desired the outputs can be cast directly, for example as- scipy.sparse.csr_matrix(out). Changed by Eric Larson. (#12646)
- Fix incorrect RuntimeWarning (different channel filter settings) in EDF/BDF import, by Clemens Brunner. (#12661) 
- In - mne.export.export_raw()(- fmt='edf'), when padding data to create equal-length data blocks, edge-padding is favored over zero-padding in order to avoid accidentally enlarging physical range, by Qian Chu. (#12676)
- In - mne.io.read_raw_eyelink(), gracefully handle missing datetime in file by Scott Huberty. (#12687)
- Fix regression with - mne.decoding.CSPwhere using- rank="full"errantly raised an error, by Eric Larson. (#12694)
- Fix in-memory anonymization of data read with - mne.io.read_raw_edf()by Eric Larson. (#12720)
- Fix bug with overplotting of butterfly labels in - mne.viz.plot_raw()and related functions and methods, by Eric Larson. (#12721)
- Fix a bug where the - ylimparameter would sometimes apply to the wrong channel types in- mne.viz.plot_evoked_topo(), by Marijn van Vliet. (#12724)
- Fix bug where ad-hoc regularization of a covariance with - mne.cov.regularize()did not properly account for bad channels in rank calculations, by Eric Larson. (#12727)
- Fix bug when reading NIRX files saved in a non-western encoding, by Daniel McCloy. (#12730) 
- set_log_file()and- set_log_level()can now be correctly detected by static analysis tools like Pylance, by Richard Höchenberger. (#12735)
- Safeguard loading of - meas_datein- mne.io.read_raw_edf(), by Mathieu Scheltienne. (#12754)
- Fix bug in - maxwell_filter_prepare_emptyroom()where a difference in sampling frequencies between data and emptyroom files was ignored, by Daniel McCloy. (#12760)
API changes by deprecation#
- A new argument - events_as_annotationshas been added to- mne.io.read_raw_egi()with a default value of- Falsethat will change to- Truein version 1.9, by Scott Huberty and Eric Larson. (#12300)
- mne.Info.ch_nameswill now return an empty list instead of raising a- KeyErrorif no channels are present, by Richard Höchenberger. (#12583)
- Documented that - match_channel_orders()can also work on Epochs, and Evoked objects. Reflecting this, deprecated the- rawsparameter in favor of an- instsparameter, by Stefan Appelhoff. (#12699)
- The - blockargument to- mne.viz.Brainis deprecated and will be removed in 1.9, use- matplotlib.pyplot.show()with- block=Trueinstead, by Eric Larson. (#12719)
- mne.datasets.fetch_fsaverage()now returns a- pathlib.Pathobject rather than a string. Support for string concatenation with plus (- +) is thus deprecated and will be removed in 1.9, use the forward-slash- /operator instead, by Eric Larson. (#12771)
New features#
- Added internals to allow modifying single-channel annotations in the Qt raw browser, by new contributor Noah Markowitz. (#12669) 
- Adding - mne.channels.Layout.copy()and- mne.channels.Layout.pick()to copy and select channels from a- mne.channels.Layoutobject. Plotting 2D topographies of evoked responses with- mne.viz.plot_evoked_topo()with both arguments- layoutand- excludenow ignores excluded channels from the- mne.channels.Layout. By Mathieu Scheltienne. (#12338)
- In - Reportyou can now easily navigate through images and figures connected to a slider with the left and right arrow keys. Clicking on the slider or respective image will focus the slider, enabling keyboard navigation, by Richard Höchenberger (#12556)
- When plotting EOG and ECG artifact scores for ICA in - mne.Report.add_ica(), the channel names used for artifact detection are now displayed in the titles of each respective subplot, by Richard Höchenberger. (#12573)
- Use - aseg='auto'for- mne.viz.Brain.add_volume_labels()and- mne.get_montage_volume_labels()to use- aparc+asegby default or if not present use- wmparcbecause freesurfer uses- wmparcin the latest version, by Alex Rockhill. (#12576)
- The HTML representations of - Raw,- Epochs, and- Evoked(which you will see e.g. when working with Jupyter Notebooks or- Report) have been updated to be more consistent and contain slightly more information, by Richard Höchenberger. (#12624) (#12583)
- When adding - Evokeddata to a- Reportvia- add_evokeds(), we now also include an “Info” section with some basic summary info, as has already been the case for raw and epochs data, by Richard Höchenberger. (#12584)
- We added new installation variants for a full installation with the PySide6 Qt binding ( - "mne[full-pyside6]"), with the PyQt6 binding (- "mne[full-pyqt6]", equivalent to- "mne[full]"), and without any Qt binding (- "mne[full-no-qt]"), which may be useful in certain situations by Richard Höchenberger. (#12628)
- Adding argument - 'random'to- equalize_epoch_counts()and to- equalize_event_counts()to randomly select epochs or events. By Mathieu Scheltienne. (#12649)
- Add new parameter - ignore_marker_typesto- read_raw_brainvision()to ignore marker types (and only use marker descriptions) when reading BrainVision files, by Clemens Brunner. (#12652)
- Added support for passing - axesto- mne.viz.plot_head_positions()when- mode='field', by Eric Larson. (#12655)
- The HTML representation of - Epochs(visible e.g. in Jupyter or in- Report) now indicates whether metadata is attached to the epochs, by Richard Höchenberger. (#12686)
- Montage plots created with - plot()now scale both the channel dots and channel names with the new- scaleparameter. The default is- scale=1(factors less than 1 will scale down, whereas factors greater than 1 will scale up). The previous- scale_factorparameter only affected marker size, and this parameter is now deprecated. By Clemens Brunner. (#12703)
- Add - compute_sme()to compute the analytical standardized measurement error (SME) as a data quality measure for ERP studies, by Clemens Brunner. (#12707)
- Use - datetime.datefor- info["subject_info"]["birthday"]rather than a tuple of- (year, month, day)by Eric Larson. (#12720)
- Add default - spatial_colors="auto"to- mne.viz.plot_evoked_white()and- mne.Evoked.plot_white()to enable spatial colors by default, by Eric Larson. (#12725)
- mne.minimum_norm.make_inverse_operator()and related functions now more robustly warn if the whitener computed from the noise covariance has an incorrect rank, by Eric Larson. (#12727)
- When indexing - Epochs(e.g. by doing- epochs[0]), static code analysis tools like Pylance should now be able to infer that the returned object is an epoch, too, and provide editor support like automated code completions, by Richard Höchenberger. (#12733)
- When using the - data_path()in any dataset included in- mne.datasets, static analysis tools like Pylance will now correctly infer that a- pathlib.Pathwill be returned and provide editor support like automated code completions, by Richard Höchenberger. (#12734)
- Add support for storing Fourier coefficients in - mne.time_frequency.Spectrum,- mne.time_frequency.EpochsSpectrum,- mne.time_frequency.SpectrumArray, and- mne.time_frequency.EpochsSpectrumArrayobjects, by Thomas Binns. (#12747)
Other changes#
- Fixed issue template links by new contributor Michal Žák (#12600) 
- Enhance documentation on decimation filtering to prevent aliasing, by new contributor Xabier de Zuazo. (#12650) 
- Added vulture as a pre-commit hook and removed related dead code, by Eric Larson. (#12569) 
- Add link to BEst-Python in the list of related software. by Ilian Azz. (#12659) 
- Improved clarity of parameter documentation for - mne.decoding.SSD.fit, by Thomas Binns. (#12664)
- Disable the “Back to top” button in the documentation, by Richard Höchenberger. (#12688) 
- Improve argument - ylimdocumentation through- Evokedplotting function and validate type to- dictor- Noneto prevent misuage, by Mathieu Scheltienne. (#12697)
- Code contributions are now measured using PRs and reported on the Contributors page, by Eric Larson. (#12774) 
- Authorship headers in MNE-Python code have been standardized, by Eric Larson. (#12781)