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
Report
when clicking on a TOC entry multiple times, by Richard Höchenberger. (#12561)Fix bug where
mne.decoding.get_coef()
did not work properly withmne.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 forseeg
channels 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 withmne.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
EpochsTFR
objects, 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()
, andmne.time_frequency.csd_array_fourier()
would return cross-spectral densities with thefmin
andfmax
frequencies missing, by Thomas Binns (#12633)Output types of sparse arrays were changed from
matrix
toarray
inread_ch_adjacency()
,find_ch_adjacency()
,combine_adjacency()
,spatio_temporal_src_adjacency()
, and related functions to comply with the pending deprecation ofnp.matrix
. The returned objects now behave like standardndarray
objects, and in particular*
now operates element-wise instead of performing matrix multiplication. You can use@
as a backward compatible matrix multiplication for bothnp.matrix
andnp.ndarray
objects, and if a matrix is desired the outputs can be cast directly, for example asscipy.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.CSP
where usingrank="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
ylim
parameter would sometimes apply to the wrong channel types inmne.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()
andset_log_level()
can now be correctly detected by static analysis tools like Pylance, by Richard Höchenberger. (#12735)Safeguard loading of
meas_date
inmne.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_annotations
has been added tomne.io.read_raw_egi()
with a default value ofFalse
that will change toTrue
in version 1.9, by Scott Huberty and Eric Larson. (#12300)mne.Info.ch_names
will now return an empty list instead of raising aKeyError
if 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 theraws
parameter in favor of aninsts
parameter, by Stefan Appelhoff. (#12699)The
block
argument tomne.viz.Brain
is deprecated and will be removed in 1.9, usematplotlib.pyplot.show()
withblock=True
instead, by Eric Larson. (#12719)mne.datasets.fetch_fsaverage()
now returns apathlib.Path
object 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()
andmne.channels.Layout.pick()
to copy and select channels from amne.channels.Layout
object. Plotting 2D topographies of evoked responses withmne.viz.plot_evoked_topo()
with both argumentslayout
andexclude
now ignores excluded channels from themne.channels.Layout
. By Mathieu Scheltienne. (#12338)In
Report
you 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'
formne.viz.Brain.add_volume_labels()
andmne.get_montage_volume_labels()
to useaparc+aseg
by default or if not present usewmparc
because freesurfer useswmparc
in the latest version, by Alex Rockhill. (#12576)The HTML representations of
Raw
,Epochs
, andEvoked
(which you will see e.g. when working with Jupyter Notebooks orReport
) have been updated to be more consistent and contain slightly more information, by Richard Höchenberger. (#12624) (#12583)When adding
Evoked
data to aReport
viaadd_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'
toequalize_epoch_counts()
and toequalize_event_counts()
to randomly select epochs or events. By Mathieu Scheltienne. (#12649)Add new parameter
ignore_marker_types
toread_raw_brainvision()
to ignore marker types (and only use marker descriptions) when reading BrainVision files, by Clemens Brunner. (#12652)Added support for passing
axes
tomne.viz.plot_head_positions()
whenmode='field'
, by Eric Larson. (#12655)The HTML representation of
Epochs
(visible e.g. in Jupyter or inReport
) 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 newscale
parameter. The default isscale=1
(factors less than 1 will scale down, whereas factors greater than 1 will scale up). The previousscale_factor
parameter 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.date
forinfo["subject_info"]["birthday"]
rather than a tuple of(year, month, day)
by Eric Larson. (#12720)Add default
spatial_colors="auto"
tomne.viz.plot_evoked_white()
andmne.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 doingepochs[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 inmne.datasets
, static analysis tools like Pylance will now correctly infer that apathlib.Path
will 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
, andmne.time_frequency.EpochsSpectrumArray
objects, 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
ylim
documentation throughEvoked
plotting function and validate type todict
orNone
to 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)