Version 0.23.0 (2021-04-27)#
Enhancements#
Add support for exporting to EEGLAB’s set format with
eeglabio
with new methodsmne.io.Raw.export()
andmne.Epochs.export()
. (#9192 by new contributor Jack Zhang)mne.viz.plot_evoked_topo()
now uses a Minimum/Maximum of peaks for each channel type to calculate ylim when input param is None (#9285 by new contributor Ram Pari)Add exclude parameter to
mne.viz.plot_evoked_topo()
(#9278 by new contributor Ram Pari)Add
mne.time_frequency.EpochsTFR.to_data_frame()
andmne.time_frequency.AverageTFR.to_data_frame()
methods (#9124 by new contributor Felix Klotzsche)Add
selection
anddrop_log
tomne.time_frequency.EpochsTFR
(#9124 by new contributor Felix Klotzsche)Add CSV, TSV, and XYZ support to
mne.channels.read_custom_montage()
(#9203 by new contributor Jack Zhang)Add HTML representation for
Epochs
in Jupyter Notebooks (#9174 by new contributor Valerii Chirkov)Speed up
mne.viz.plot_ica_properties()
by refactoring (#9174 by new contributor Valerii Chirkov)Add
apply_function
method to epochs and evoked objects (#9088 by new contributor Erica Peterson and Victoria Peterson)New tutorial for function
mne.make_fixed_length_epochs()
(#9156 by new contributor Erica Peterson)Add different colors for each volume source space in
mne.viz.plot_alignment()
(#9043 by new contributor Valerii Chirkov)Add
overlap
parameter tomne.make_fixed_length_epochs()
to allow creating overlapping fixed length epochs (#9096 by new contributor Silvia Cotroneo)Add
mne.Dipole.to_mni()
for more convenient dipole.pos to MNI conversion (#9043 by new contributor Valerii Chirkov)Update citations in maxwell.py (#9043 by new contributor Valerii Chirkov)
New Tutorial for analyzing frequency-tagging data (#8867 by new contributor Dominik Welke and kalenkovich)
Add dbs as new channel type for deep brain stimulation (DBS) recordings (#8739 by new contributor Richard Koehler)
Add some preprocessing functions to the EEGLAB migration guide (#9169 by new contributor Apoorva Karekal)
Add
mne.chpi.extract_chpi_locs_kit()
to read cHPI coil locations from KIT/Yokogawa data (#8813 by new contributor Matt Sanderson, Robert Seymour, and Eric Larson)Add
match_alias
parameter tomne.io.Raw.set_montage()
and related functions to match unrecognized channel location names to known aliases (#8799 by new contributor Zhi Zhang)Update the
notebook
3d backend to useipyvtk_simple
for a better integration withinJupyter
(#8503 by Guillaume Favelier)Remove the 15-character limitation for channel names when writing to FIF format. If you need the old 15-character names, you can use something like
raw.rename_channels({n: n[:13] for n in raw.ch_names}, allow_duplicates=True)
, by Eric Larson (#8346)Add channel-specific annotation support to
mne.Annotations
viach_names
parameter (#8896 by Eric Larson)Add toggle-all button to
mne.Report
HTML andwidth
argument tomne.Report.add_bem_to_section
(#8723 by Eric Larson)Add infant template MRI dataset downloader
mne.datasets.fetch_infant_template()
(#8738 by Eric Larson and Christian O’Reilly)Add digitizer information to
mne.io.read_raw_egi()
(#8789 by Christian Brodbeck)Add support for reading some incomplete raw FIF files in
mne.io.read_raw_fif()
(#9268 by Eric Larson)Allow reading digitization from files other than
*.fif
in the coregistration GUI (#8790 by Christian Brodbeck)Speed up
mne.inverse_sparse.tf_mixed_norm()
using STFT/ISTFT linearity (#8697 by Eric Larson)Reduce memory consumption of
mne.io.Raw
and speed up epoching when thousands of events are present formne.Epochs
(#8801 by Eric Larson)Speed up
import mne
by reducing function creation overhead (#8829 by Eric Larson)mne.Report.parse_folder
now processes supported non-FIFF files by default, too (#8744 by Richard Höchenberger)mne.Report
has gained the new methodsadd_custom_js
andadd_custom_css
for adding user-defined JavaScript and styles (#8762, #9037 by Richard Höchenberger)Add option to control appearance of opaque inside surface of the head to mne coreg (#8793 by Eric Larson)
Add option to disable projection using
--projoff
in mne browse_raw (#9262 by Eric Larson)Add keypress to toggle projection using
shift+j
inmne.io.Raw.plot()
and mne browse_raw (#9262 by Eric Larson)Add support for non-FIF files in mne browse_raw using
mne.io.read_raw()
(#8806 by Eric Larson)Add
mne.io.read_raw_nedf()
for reading StarStim / enobio NEDF files (#8734 by Tristan Stenner)Add
raw.describe()
to display (or return) descriptive statistics for each channel (#8760 by Clemens Brunner)Add
annotations.to_data_frame()
to return annotations as a pandas dataframe (#8783 by Robert Luke)Add
mne.preprocessing.compute_maxwell_basis()
to compute the SSS basis function (#8822 by Eric Larson)Add the
silhouette
parameter tomne.viz.Brain
to display sharp edges and improve perception (#8771 by Guillaume Favelier)Add warning to
mne.cov.compute_whitener()
when an explicitrank
parameter leads to a large increase in condition number (#8805 by Eric Larson)Add parameter
align=True
tomne.viz.Brain.show_view
to make views relative to the closest canonical (MNI) axes rather than the native MRI surface RAS coordinates (#8794 by Eric Larson)Add
auto_close
tomne.Report.add_figs_to_section
andmne.Report.add_slider_to_section
to manage closing figures (#8730 by Guillaume Favelier)Add
mne.write_head_bem()
to support writing head surface files (#8841 by Yu-Han Luo)The signal of
resp
(respiratory) channels is now assumed to be in the unit Volt (#8858 by Richard Höchenberger)Static type checkers like Pylance (comes with VS Code) now display the parameters of many more functions correctly, largely improving overall usability for VS Code users (#8862 by Richard Höchenberger)
Support new EEGLAB file format (#8874 by Clemens Brunner)
Reading and writing FIFF files whose filenames end with
_meg.fif.gz
,_eeg.fif(.gz)
, and_ieeg.fif(.gz)
doesn’t emit a warning anymore; this improves interobaility with BIDS-formatted datasets (#8868 by Richard Höchenberger)On macOS, we now set the environment variable
QT_MAC_WANTS_LAYER
to"1"
if it hasn’t been set explicitly by the user, in order to ensure thatSourceEstimate
plots work on macOS 11 with older versions of Qt and PyQt (#8959 by Richard Höchenberger)mne.time_frequency.EpochsTFR.average()
now allows different ways of averaging, such as “median”, or callable functions (#8879 by Adam Li)Epochs
metadata can now be generated automatically from events usingmne.epochs.make_metadata
(#8834 by Richard Höchenberger)Interactions with sliders in
mne.Report
will now continuously update the linked content (it was updated only on mouse button release before) (#9023 by Richard Höchenberger)mne.viz.plot_drop_log
andmne.Epochs.plot_drop_log()
now omit displaying the subject name in the title ifsubject=None
is passed (#9015 by Richard Höchenberger)Plot ECoG tutorial now uses a real epilepsy seizure dataset and visualizes the seizure onset (#9087 by Eric Larson, Adam Li, Alex Rockhill and Liberty Hamilton)
Improve documentation of Report-Class (#9113 by Martin Schulz)
Add
mne.channels.DigMontage.add_estimated_fiducials()
which will add LPA, RPA and Nasion fiducial points to theDigMontage
object inmri
coordinate frame (#9118 by Adam Li)mne.io.anonymize_info()
now anonymizes also sex and hand fields whenkeep_his
isFalse
(#9103, #9175 by new contributor Rotem Falach and Richard Höchenberger)Add parameter
theme
tomne.viz.Brain
for optional Dark-Mode (#9149 by Martin Schulz, Guillaume Favelier)Add first_samp support for raw simulations with
mne.simulation.simulate_raw
andmne.simulation.SourceSimulator
(#9166 by Steven Bierer)Evoked
gained abaseline
attribute that is automatically assembled based on the baseline of the averagedEpochs
(#9210 by Richard Höchenberger)Add
units
parameter tomne.io.Raw.get_data()
to return data in the desired unit (#9136 by Johann Benerradi and Stefan Appelhoff)Add
mne.preprocessing.equalize_bads()
to interpolate bad channels in a list ofEvoked
,Epochs
orRaw
having different sets of bad channels (#9241 by Alex Gramfort)mne.Epochs.equalize_event_counts()
can now be called without providing a list of event names, and will equalize the counts of all event types present in theEpochs
(#9261 by Richard Höchenberger)mne.preprocessing.find_eog_events()
andmne.preprocessing.create_eog_epochs()
now accept a list of channel names, allowing you to specify multiple EOG channels at once (#9269 by Richard Höchenberger)Improve performance of
mne.set_bipolar_reference()
(#9270 by Martin Schulz)Add support for setting montages on fNIRS data, with built in standard montages for Artinis OctaMon and Artinis Brite23 devices (#9141 by Johann Benerradi, Robert Luke and Eric Larson)
Enable support for reading SNIRF files with 2D optode positions (#9347 Robert Luke)
Bugs#
Fix bug with
mne.time_frequency.tfr()
where plot misbehaved. Plot now always returns a list of figures instead of a single figure handle (#8013 by new contributor Eduard Ort)Fix bug with
mne.viz.plot_evoked_topo()
where set ylim parameters gets swapped across channel types. (#9207 by new contributor Ram Pari)Fix bug with
mne.io.read_raw_edf()
where µV was not correctly recognized (#9187 by new contributor Sumalyo Datta)Fix bug with
mne.viz.plot_compare_evokeds()
did not check type of combine. (#9151 by new contributor Matteo Anelli)Fix bug with
mne.viz.plot_evoked_topo()
whereylim
was only being applied to the first channel in the dataset (#9162 by new contributor Ram Pari )Fix bug with
mne.Epochs.plot_image()
allowing interactive zoom to work properly (#9152 by by new contributor Maggie Clarke and Daniel McCloy)Fix bug with
mne.Epochs.plot_image()
where thex_label
was different depending on the evoked parameter (#9115 by new contributor Matteo Anelli)Fix bug with restricting
mne.io.Raw.save()
saving options to .fif and .fif.gz extensions (#9062 by new contributor Valerii Chirkov)Fix bug with
mne.io.read_raw_kit()
where missing marker coils were not handled (#8989 by new contributor Judy D Zhu)Fix bug with
mne.connectivity.spectral_connectivity
where time axis in Epochs data object was dropped. (#8839 by new contributor Anna Padee)Fix bug with
mne.io.Raw.resample
to allow passingstim_picks='misc'
(#8844 by new contributor Enrico Varano and Eric Larson)Fix bugs with
mne.io.read_raw_persyst
where multipleComments
with the same name are allowed, andComments
with a “,” character are now allowed (#8311 and #8806 by new contributor Andres Rodriguez and Adam Li)Fix zen mode and scalebar toggling for
raw.plot()
when using themacosx
matplotlib backend (#8688 by Daniel McCloy)Fix bug with
mne.viz.snapshot_brain_montage()
where the positions were incorrect (#8983 by Eric Larson)Fix bug with
mne.preprocessing.maxwell_filter()
where the eSSS basis had to exactly match the good channels instead of being a superset (#8675 by Eric Larson)Fix bug with
mne.Report.add_bem_to_section
wheren_jobs != 1
would causen_jobs
subsets of MRI images in some orientations to be flipped (#8713 by Eric Larson)Fix bug with
raw.plot()
where annotations didn’t immediately appear when changing window duration (#8689 by Daniel McCloy)Fix bug with
raw.plot()
wherescalings='auto'
did not compute scalings using the full range of data (#8806 by Eric Larson)Fix bug with
raw.plot()
where setting alowpass
could lead to non-data-channels not plotting (#8954 by Eric Larson)Fix bug with
mne.io.Raw.load_data()
andmne.Epochs.drop_bad()
whereverbose
logging was not handled properly (#8884 by Eric Larson)Fix bug with
mne.io.read_raw_nicolet()
where header type values such as num_sample and duration_in_sec where not parsed properly (#8712 by Alex Gramfort)Fix bug with
mne.preprocessing.read_ica_eeglab()
when reading decompositions using PCA dimensionality reduction (#8780 by Alex Gramfort and Eric Larson)Fix bug with
mne.minimum_norm.make_inverse_operator()
wheredepth
was errantly restricted to be less than or equal to 1. (#8804 by Eric Larson)Fix bug with
mne.stats.permutation_cluster_1samp_test()
and related clustering functions whenadjacency=None
andout_type='indices'
(##8842 by Eric Larson)Fix bug with
mne.viz.plot_alignment()
where plotting a sphere model could ignore thebrain
argument (#8857 by Eric Larson)Fix bug with
mne.SourceEstimate.plot()
where flatmaps were not positioned properly when usinghemi='both'
(#9315 by Eric Larson)Fix bug with
mne.Annotations.save()
where files could be overwritten accidentally, it can now be controlled via theoverwrite
argument (#8896 by Eric Larson)Fix bug with
replace
argument ofmne.Report.add_bem_to_section
andmne.Report.add_slider_to_section
(#8723 by Eric Larson)Fix bug with
mne.chpi.compute_chpi_locs()
where all cHPI coils being off would lead to an empty array of the wrong dimensionality (#8956 by Eric Larson)Fix bug with
mne.extract_label_time_course()
where labels, STCs, and the source space were not checked for compatiblesubject
attributes (#9284 by Eric Larson)Fix bug with
mne.grow_labels()
whereoverlap=False
could run forever or raise an error (#9317 by Eric Larson)Fix compatibility bugs with
mne_realtime
(#8845 by Eric Larson)Fix bug with
mne.viz.Brain
where non-inflated surfaces had an X-offset imposed by default (#8794 by Eric Larson)Fix bug with mne coreg where nasion values were not updated when clicking (#8793 by Eric Larson)
Fix bug with matplotlib-based 3D plotting where
Axes3D
were not properly initialized inmne.viz.plot_source_estimates()
(#8811 by Chris Bailey)Allow sEEG channel types in
mne.Evoked.plot_joint()
(#8736 by Daniel McCloy)Fix bug where hidden annotations could be deleted interactively in
mne.io.Raw.plot()
windows (#8831 by Daniel McCloy)Function
mne.set_bipolar_reference()
was not working when passingEpochs
constructed with somepicks
(#8728 by Alex Gramfort)Fix anonymization issue of FIF files after IO round trip (#8731 by Alex Gramfort)
Fix bug in
mne.preprocessing.ICA.plot_sources
where right-clicking component names could yieldplot_properties
windows for the wrong component ifpicks
had been specified (#8996 by Daniel McCloy)Fix title not shown in
mne.viz.plot_montage()
(#8752 by Clemens Brunner)mne.io.read_raw_egi
now correctly handlespathlib.Path
filenames (#8759 by Richard Höchenberger)mne.viz.plot_evoked
andmne.Evoked.plot
now correctly plot global field power (GFP) for EEG data whengfp=True
orgfp='only'
is passed (used to plot RMS). For MEG data, we continue to plot the RMS, but now label it correctly as such (#8775 by Richard Höchenberger)Fix bug with mne make_scalp_surfaces where
--overwrite
was not functional (#8800 by Yu-Han Luo)Fix bug with
mne.viz.plot_topomap()
when plotting gradiometers with a missing channel in a pair (#8817 by Alex Gramfort)epochs.crop()
now also adjusts thereject_tmin
andreject_tmax
attributes if necessary (#8821 by Richard Höchenberger)When creating
Epochs
, we now ensure thatreject_tmin
andreject_tmax
cannot fall outside of the epochs’ time interval anymore (#8821 by Richard Höchenberger)read_raw_bti
erroneously treated response channels as respiratory channels (#8856 by Richard Höchenberger)The RMS trace shown in the time viewer of
SourceEstimate
plots is now correctly labeled asRMS
(wasGFP
before) (#8965 by Richard Höchenberger)Fix bug with
mne.SourceEstimate.plot()
and related functions where the scalars were not interactively updated properly (#8985 by Eric Larson)Fix bug with mne.channels.find_ch_adjacency() returning wrong adjacency for Neuromag122-Data (#8891 by Martin Schulz)
Fix
mne.read_dipole()
yieldingmne.Dipole
objects that could not be indexed (#8963 by Marijn van Vliet)Fix bug when setting n_jobs > 1 in
mne.Report.parse_folder()
(#9109 by Martin Schulz)Fix bug with
mne.Evoked.plot_image()
where an incorrect clim parameter did not raise any error (#9115 by new contributor Matteo Anelli)Fix bug with
mne.io.Raw.pick
where incorrect fnirs types were returned (#9178 by Robert Luke)Fix bug when passing both axes and picks to
mne.viz.plot_compare_evokeds
(#9252 by Daniel McCloy)Improved string representation of
Epochs
containing multiple event types; improved (and more mathematically correct)evoked.comment
in themne.combine_evoked
output; and better (and often more concise) legend labels in the figures created viaplot_compare_evokeds
(#9027 by Richard Höchenberger)mne.preprocessing.find_ecg_events()
now correctly handles situation where no ECG activity could be detected, and correctly returns an empty array of ECG events (#9236 by Richard Höchenberger)Fix bug with
picks
attribute forEpochs
after callingmne.Epochs.add_channels()
(#9246 by Alex Gramfort)Fix bug where
backend='notebook'
could not be used inmne.SourceEstimate.plot()
(#9305 by Jean-Remi King)mne.preprocessing.compute_proj_eog
andmne.preprocessing.compute_proj_ecg
now return empty lists if no EOG or ECG events, respectively, could be found. Previously, we’d returnNone
in these situations, which does not match the documented behavior of returning a list of projectors (#9277 by Richard Höchenberger)
API changes#
Introduced new
'auto'
settings forICA.max_iter
. The old defaultmax_iter=200
will be removed in MNE-Python 0.24 (#9099 by new contributor Cora Kim)mne.viz.plot_sensors_connectivity
now allows setting the colorbar label via thecbar_label
parameter (#9248 by Daniel McCloy)mne.read_selection
has been deprecated in favor ofmne.read_vectorview_selection
.mne.read_selection
will be removed in MNE-Python 0.24 (#8870 by Richard Höchenberger)mne.beamformer.tf_dics
has been deprecated and will be removed in MNE-Python 0.24 (#9122 by Britta Westner)Fitting
ICA
on baseline-correctedEpochs
, and / or applying it on baseline-correctedEpochs
orEvoked
data will now display a warning. Users are advised to only baseline correct their data after cleaning is completed (#9033 by Richard Höchenberger)Supplying multiple channel names to
mne.preprocessing.find_eog_events
ormne.preprocessing.compute_proj_eog
as a string of comma-separated channel names has been deprecated; please pass a list of channel names instead. Support for comma-separated strings will be removed in MNE-Python 0.24 (#9269 by Richard Höchenberger)The default in
mne.beamformer.make_dics()
ofreal_filter=False
will change toreal_filter=True
in 0.24 (#9340 by Britta Westner)