Version 1.0.0 (2022-03-21)#
Enhancements#
Add
use_orig_time
option tomne.Annotations.crop()
. (#10396 by new contributor Michiru Kaneda)Speed up
mne.preprocessing.annotate_muscle_zscore()
,mne.preprocessing.annotate_movement()
, andmne.preprocessing.annotate_nan()
through better annotation creation (#10089 by new contributor Senwen Deng)Fix some unused variables in time_frequency_erds.py example (#10076 by new contributor Jan Zerfowski)
Document
BAD_ACQ_SKIP
annotation behavior (#10054 by new contributor Etienne de Montalivet)Add link to related
MNE-ARI
package (#10174 by new contributor John Veillette)mne.time_frequency.psd_array_multitaper()
can now return complex results per-taper when specifyingoutput='complex'
(#10307 by Mikołaj Magnuski)mne.time_frequency.tfr_array_multitaper()
can now return results foroutput='phase'
instead of an error (#10281 by Mikołaj Magnuski)Add show local maxima toggling button to
mne.gui.locate_ieeg
(#9952 by Alex Rockhill)Show boundaries in
mne.gui.locate_ieeg
(#10379 by Eric Larson)Add argument
cval
tomne.transforms.apply_volume_registration()
to set interpolation values outside the image domain (#10379 by Eric Larson)Improve docstring of
mne.Info
and add attributes that were not covered (#9922 by Mathieu Scheltienne)Add an alternate, manual procedure for aligning a CT to an MR procedure to Locating intracranial electrode contacts (#9978 by Alex Rockhill)
Improve docstring of export functions
mne.export.export_raw()
,mne.export.export_epochs()
,mne.export.export_evokeds()
,mne.export.export_evokeds_mff()
and issue a warning when there are unapplied projectors (#9994 by Mathieu Scheltienne)Add support for reading haemoglobin fNIRS data to
mne.io.read_raw_snirf()
(#9929 by Robert Luke)Add
fill_hole_size
keyword argument tomne.viz.Brain.add_volume_labels()
to close holes in the mesh (#10024 by Alex Rockhill)Changed
mne.Epochs
andmne.Evoked
to have a more concise__repr__
to improve interactive MNE usage in Python Interactive Console, IDEs, and debuggers when many events are handled. (#10042 by Jan Sosulski)Improve docstring of
events
arguments and cross-referencing to events (#10056 by Mathieu Scheltienne)Speed up repeated surface-smoothing operation (e.g., in repeated calls to
stc.plot()
) (#10077 by Eric Larson)Add
verbose
parameter tomne.io.Raw.load_bad_channels()
and log information on how bad channels are updated (#10102 by Stefan Appelhoff)Add
infer_type
argument tomne.io.read_raw_edf()
andmne.io.read_raw_bdf()
to automatically infer channel types from channel labels (#10058 by Clemens Brunner)Reduce the time it takes to generate a
mne.io.Raw
,Epochs
, orICA
figure if ascalings
parameter is provided (#10109 by Richard Höchenberger and Eric Larson)mne.Report.add_raw()
gained a newscalings
parameter to provide custom data scalings for the butterfly plots (#10109 by Richard Höchenberger)The
butterfly
parameter ofmne.Report.add_raw()
now also accepts numbers to specify how many segments to plot (#10115 by Richard Höchenberger)The
psd
parameter ofmne.Report.add_epochs()
now also accepts numbers to specify the signal duration used for PSD calculation (#10119 by Richard Höchenberger)Drastically speed up butterfly plot generation in
mne.Report.add_raw()
. We now don’t plot annotations anymore; however, we feel that the speed improvements justify this change, also considering the annotations were of limited use in the displayed one-second time slices anyway (#10114, #10116 by Richard Höchenberger)In
mne.Report
, limit the width of automatically generated figures to a maximum of 850 pixels (450 pixels formne.SourceEstimate
plots), and the resolution to 100 DPI to reduce file size, memory consumption, and – in some cases likemne.Report.add_stc()
– processing time (#10126, #10129, #10135, #10142 by Richard Höchenberger)Epochs
metadata tables are now included inmne.Report
(#10166 by Richard Höchenberger)mne.get_head_surf()
andmne.dig_mri_distances()
gained a new parameter,on_defects
, controlling how to handle surfaces with topological defects (#10175 by Richard Höchenberger)mne.Report.add_epochs()
gained a new parameter,drop_log_ignore
, to control which drop reasons to omit when creating the drop log plot (#10182 by Richard Höchenberger)mne.Epochs.plot_drop_log()
now also includes the absolute number of epochs dropped in the title (#10186 by Richard Höchenberger)Add a button to show the maximum intensity projection in
mne.gui.locate_ieeg
(#10185 by Alex Rockhill)Annotations from a
Raw
object are now preserved by theEpochs
constructor and are supported when saving Epochs (#9969 and #10019 by Adam Li)Add a checkbox to show and hide the MEG helmet in the coregistration GUI (#10200 by Guillaume Favelier)
The coregistration GUI (instantiated via
mne.gui.coregistration()
) gained a new attribute,coreg
, to access themne.coreg.Coregistration
instance used by the GUI (#10255 by Richard Höchenberger)Add marching cubes display of head if
mne.bem.make_scalp_surfaces()
has not computed or the recon-all hasn’t finished (#10202 by Alex Rockhill)The default interaction style of
mne.gui.coregistration()
andmne.viz.plot_alignment()
has been changed to'terrain'
, which keeps one axis fixed and should make interactions with the 3D scene more predictable (#9972, #10206 by Richard Höchenberger)mne.gui.coregistration()
now uses the proper widget style for push buttons, making for a more native feel of the application (#10220 by Richard Höchenberger and Guillaume Favelier)mne.coreg.Coregistration
,mne.scale_bem()
, andmne.scale_mri()
gained a new parameter,on_defects
, controlling how to handle topological defects (#10230, #10249 by Richard Höchenberger)mne.coreg.Coregistration
gained a new attribute,fiducials
, allowing for convenient retrieval of the MRI fiducial points (#10243, by Richard Höchenberger)Added plotting points to represent contacts on the max intensity projection plot for
mne.gui.locate_ieeg
(#10212 by Alex Rockhill)Add lines in 3D and on the maximum intensity projection when more than two electrode contacts are selected to aid in identifying that contact for
mne.gui.locate_ieeg
(#10212 by Alex Rockhill)Add a
block
parameter tomne.viz.Brain
and the UI ofmne.coreg.Coregistration
to prevent the windows from closing immediately when running in a non-interactive Python session (#10222 by Guillaume Favelier)All methods of
mne.Report
with atags
parameter now also accept a single tag passed as a string (previously, you needed to pass a tuple of strings, even for a single tag) (#10183, by Richard Höchenberger)mne.Report.add_trans()
has gained a new parameter,alpha
, to control the level of opacity of the rendered head (#10247, by Richard Höchenberger)The new convenience function
mne.event.match_event_names()
allows for straightforward checking if a specific event name or a group of events is present in a collection of event names (#10233 by Richard Höchenberger)Epochs.plot()
is now supported by the pyqtgraph-backend (#10297 by Martin Schulz)The
map_surface
parameter ofmne.viz.Brain.add_foci()
now works and allows you to add foci to a rendering of a brain that are positioned at the vertex of the mesh closest to the given coordinates (#10299 by Marijn van Vliet)mne.preprocessing.ICA.plot_sources()
is now also supported by theqt
backend (#10330 by Martin Schulz)Added
mne.viz.Brain.add_dipole()
andmne.viz.Brain.add_forward()
to plot dipoles on a brain as well asmne.viz.Brain.remove_dipole()
andmne.viz.Brain.remove_forward()
(#10373 by Alex Rockhill)Made anterior/posterior slice scrolling in
mne.gui.locate_ieeg
possible for users without page up and page down buttons by allowing angle bracket buttons to be used (#10384 by Alex Rockhill)Add support for
theme='auto'
for automatic dark-mode support inraw.plot()
and related functions and methods when using the'qt'
backend (#10417 by Eric Larson)Add support for
MNE_3D_OPTION_THEME
andMNE_BROWSER_THEME
to use['light', 'dark', 'auto']
or a custom theme path inmne.viz.Brain
andraw.plot()
(and related functions and methods when using the'qt'
backend(), respectively (#10418 by Eric Larson)Add support for passing time-frequency data to
mne.stats.spatio_temporal_cluster_test()
andmne.stats.spatio_temporal_cluster_1samp_test()
and added an example to Spatiotemporal permutation F-test on full sensor data (#10384 by Alex Rockhill)Add support for reading optical density fNIRS data to
mne.io.read_raw_snirf()
(#10408 by Robert Luke)Added
mne.source_space.get_decimated_surfaces()
to extract subsurfaces from a SourceSpaces instance or a .fif file (#10421 by Joshua Teves)
Bugs#
Fix bug with
mne.io.read_raw_nihon()
where latin-1 channels could not be read (#10429 by new contributor Matthias Eberlein)Fix bug with
mne.io.read_raw_nihon()
so that it handles duplicates in channel names (#10431 by new contributor Matthias Eberlein)Fix bug in
mne.io.read_raw_egi()
where themeas_date
in arawMFF
object was incorrectly assigned. The function now converts themeas_date
to UTC and provides a UTC offset key, i.e.raw.info['utc_offset']
. (#10304 by new contributor Scott Huberty)Fix datetime conversion for tmin/tmax=None cases in
mne.Annotations.crop()
. Allow the use of float and None simultaneously formne.Annotations.crop()
. (#10361 by new contributor Michiru Kaneda)Add Shift_JIST mu in
mne.io.read_raw_edf()
(#10356 by new contributor Michiru Kaneda)Teach
mne.io.read_raw_bti()
to use itseog_ch
parameter (#10093 by new contributor Adina Wagner)Fix use of arguments in
numpy.loadtxt()
(#10189 by new contributor Federico Zamberlan)Fix documentation of options in
mne.stc_near_sensors()
(#10007 by new contributor Nikolai Chapochnikov)mne.time_frequency.tfr_array_multitaper()
now returns results per taper whenoutput='complex'
(#10281 by Mikołaj Magnuski)Fix default of
mne.io.Raw.plot()
to beuse_opengl=None
, which will act like False unlessMNE_BROWSER_USE_OPENGL=true
is set in the user configuration (#9957 by Eric Larson)Fix bug with
mne.Report
where figures were saved withbbox_inches='tight'
, which led to inconsistent sizes in sliders (#9966 by Eric Larson)When opening a saved report and saving it to a different filename again, don’t change
Report.fname
to avoid a regression when usingopen_report()
as a context manager (#9998 by Marijn van Vliet)Fix bug in
mne.make_forward_solution()
where sensor-sphere geometry check was incorrect (#9968 by Eric Larson)Use single char alphanumeric suffix when renaming long channel names (over 15-characters) when writing to FIF format. (#10002 by Luke Bloy)
Add argument
overwrite
tomne.export.export_raw()
,mne.export.export_epochs()
,mne.export.export_evokeds()
andmne.export.export_evokeds_mff()
(#9975 by Mathieu Scheltienne)mne.gui.coregistration()
and themne coreg
command didn’t respect theinteraction
parameter (#9972 by Richard Höchenberger)Fix incorrect projection of source space onto white matter surface instead of pial in Working with ECoG data (#9980 by Alex Rockhill)
Fix channel type support when reading from EEGLAB
.set
format withmne.io.read_raw_eeglab()
andmne.read_epochs_eeglab()
(#9990 by Mathieu Scheltienne)Fix suboptimal alignment using
mne.transforms.compute_volume_registration()
(#9991 by Alex Rockhill)Only warn if header is missing in BrainVision files instead of raising an error (#10001 by Clemens Brunner)
Add argument
overwrite
tomne.preprocessing.ICA.save
to check for existing file (#10004 by Mathieu Scheltienne)mne.Report
now raises an exception if invalid tags were passed (#9970 by Richard Höchenberger)Fix bug in
mne.get_montage_volume_labels()
that set the maximum number of voxels to be included too low causing unwanted capping of the included voxel labels (#10021 by Alex Rockhill)Fix annotation cropping and I/O roundtrip when there is no measurement date available (#10040 by Mathieu Scheltienne and Alex Gramfort).
Fix bug where
raw.crop()
from the beginning of the instance could break annotations andraw.first_samp
(#10358 by Eric Larson)sys_info()
output now contains the installed version ofpooch
, too; this output had been accidentally removed previously (#10047 by Richard Höchenberger)Fix VTK version extraction in
mne.sys_info()
(#10399 by Eric Larson)Fix automatic channel type detection from channel labels in
mne.io.read_raw_edf()
andmne.io.read_raw_bdf()
(and disable this functionality frommne.io.read_raw_gdf()
) (#10058 by Clemens Brunner)Fix
permutation_cluster_1samp_test()
to properly handle 2-dimensional data in combination with TFCE (#10073 by Richard Höchenberger)Fix channel grouping error when using “butterfly mode” with
mne.io.Raw.plot()
(#10087 by Daniel McCloy)Fix inconsistent behavior of
mne.preprocessing.annotate_*
functions by making them all returnmne.Annotations
objects with theorig_time
attribute set toraw.info["meas_time"]
(#10067 and #10118 by Stefan Appelhoff, Eric Larson, and Alex Gramfort)Fix bug that appears during automatic calculation of the colormap of
mne.viz.Brain
when data values offmin
andfmax
are too close (#10074 by Guillaume Favelier)We now display a scrollbar in the tags dropdown of a
Report
if many tags have been added, granting access to all tags instead of “hiding” them below the bottom of the page (#10082 by Richard Höchenberger)Creating
mne.Epochs
now provides clearer logging (less ambiguous, no duplicates) when thepreload
and/ormetadata
parameters are set (#10112 by Stefan Appelhoff)Fix bug with
mne.Epochs
where save-load round-trip with FIF would causemne.Epochs.apply_baseline()
to no longer work (#10177 by Eric Larson)Fix functions by adding missing
overwrite
parameters:mne.write_events()
,mne.write_cov()
,mne.write_evokeds()
,mne.SourceEstimate.save()
,mne.minimum_norm.write_inverse_operator()
,mne.write_proj()
, and related methods (#10127 by Eric Larson)Fix bug with
mne.transforms.compute_volume_registration()
andmne.compute_source_morph()
(volumetric) where the smoothing factors were not scaled based onzooms
(#10132 by Eric Larson)Remove repeated logging output when overwriting an existing
Raw
file (#10095 by Richard Höchenberger and Stefan Appelhoff)In the plots generated by
mne.Report.add_stc()
, we now only add 5 labels to the color bar to reduce the chance of overlap, which could previously cause the labels to become unreadable (#10135 by Richard Höchenberger)mne.Report.add_trans()
now allows you to add sensor alignment plots for head surfaces that have topological defects (#10175 by Richard Höchenberger)mne.Report.add_trans()
now also works if no digitization points are present in the data (#10176 by Jeff Stout)Argument
verbose
is now respected by dataset fetching (#10210 by Mathieu Scheltienne)Fix bug with
mne.io.read_raw_hitachi()
where emptyComment
descriptions were not handled properly (#10235 by Eric Larson)Fix bug with input validation of low-level filtering functions (#10267 by Eric Larson)
mne.gui.coregistration()
now works with surfaces containing topological defects (#10230, by Richard Höchenberger)Fix bug with
mne.io.read_raw_nirx()
being unable to read measurement dates recorded on systems with German (de_DE), French (fr_FR), and Italian (it_IT) locales (#10277 by Eric Larson)Fix bug with projector normalization checks that were too sensitive, and improve warning (#10292 by Eric Larson)
Fix bug with
mne.viz.plot_alignment()
where head-coordinate source spaces (e.g., from a forward solution) were not properly plotted (#10309 by Eric Larson)mne.read_trans()
andmne.io.read_fiducials()
now correctly expand~
in the provided path (i.e., to the user’s home directory) (#10265, #10415, by Richard Höchenberger)mne.find_events()
now usesfirst_samp
and not0
for initial event when usinginitial_value
(#10289, by Alex Gramfort)Fix bug with
mne.channels.make_standard_montage()
for'standard*'
,'mgh*'
, and'artinis*'
montages where the points were incorrectly scaled and fiducials incorrectly set away from the correct values for use with thefsaverage
subject (#10324 by Eric Larson)Fix bug with
mne.Report.add_figure()
where figures generated externally were closed and possibly resized during render (#10342 by Eric Larson)Fix bug with
mne.viz.plot_sparse_source_estimates()
where the return value was incorrect (#10347 by Eric Larson)Fix plotting bug in How to convert 3D electrode positions to a 2D image and make view look more natural in Annotate movement artifacts and reestimate dev_head_t (#10313, by Alex Rockhill)
Fix bug with blank 3D rendering with MESA software rendering (#10400 by Eric Larson)
Fix a bug in
mne.gui.locate_ieeg
where 2D lines on slice plots failed to update and were shown when not in maximum projection mode (#10335, by Alex Rockhill)Fix misleading color scale in Non-parametric between conditions cluster statistic on single trial power for the plotting of cluster F-statistics (#10393 by Alex Rockhill)
Fix baseline removal using
remove_dc=True
inraw.plot()
for data containingnp.nan
(#10392 by Clemens Brunner)Fix misleading color scale in Mass-univariate twoway repeated measures ANOVA on single trial power for plotting F-stats (#10401 by Alex Rockhill)
Fix misleading
T_obs
return name formne.stats.spatio_temporal_cluster_test()
when the default returns an F-statistic (#10401 by Alex Rockhill)
API changes#
The default browser for
raw.plot()
,epochs.plot()
, andica.plot_sources()
has been changed to the'qt'
backend on systems where mne_qt_browser is installed. To change back to matplotlib within a session, you can usemne.viz.set_browser_backend('matplotlib')
. To set it permanently on your system, you can usemne.set_config('MNE_BROWSER_BACKEND', 'matplotlib')
(#9960 by Martin Schulz and Eric Larson)mne.Info.pick_channels
has been deprecated. Useinst.pick_channels
to pick channels fromRaw
,Epochs
, andEvoked
. Usemne.pick_info()
to pick channels frommne.Info
(#10039 by Mathieu Scheltienne)All
data_path
functions now returnpathlib.Path
objects rather than strings. Support for string concatenation with plus (+
) is thus deprecated and will be removed in 1.2, use the forward-slash/
operator instead (#10348 by Eric Larson)Argument
event_list
has been deprecated in favor ofevents
inmne.write_events()
(#10056 by Mathieu Scheltienne)mne.preprocessing.annotate_flat
has been deprecated in favor ofmne.preprocessing.annotate_amplitude()
, that covers both minimum and maximum peak-to-peak variation. (#10143 by Mathieu Scheltienne)The
max_ori_out
parameter ofmne.beamformer.apply_lcmv()
and related functions is being removed as only signed estimates are supported.abs(stc)
can be used to obtain unsigned estimates (#10366 by Eric Larson)The
verbose
attribute of classes (e.g.,mne.io.Raw
,mne.Epochs
, etc.) has been deprecated. Explicitly passverbose
to methods as necessary instead. (#10267 by Eric Larson)In
mne.viz.set_browser_backend()
, the mne-qt-browser-based backend is now called'qt'
rather than'pyqtgraph'
for simplicity (#10323 by Eric Larson)
Dependencies#
Numerous external dependencies that used to be bundled with MNE-Python are now not shipped with the package anymore and will instead be retrieved automatically from their official sources when you install MNE-Python. This simplifies MNE-Python maintenance and keeps the package smaller. The following new dependencies have been added:
Jinja2 (replaces
Tempita
, which is not maintained anymore; #10211 by Richard Höchenberger)