Version 0.22.0 (2020-12-17)#
Enhancements#
Add
mne.read_evokeds_mff()
to read averaged MFFs (requires mffpy >= 0.5.7) by new contributor Evan Hathaway (#8354)Add
mne.decoding.SSD
for spatial filtering with spatio-spectral-decomposition (#7070 by new contributor Victoria Peterson and Denis Engemann)Add reader for optical imaging data recorded using ISS Imgagent I/II hardware and BOXY recording software in
mne.io.read_raw_boxy()
(#7717 by new contributor Jonathan Kuziek and Kyle Mathewson)Add options to use labels in
mne.minimum_norm.get_point_spread()
andmne.minimum_norm.get_cross_talk()
(#8275 by Olaf Hauk)Update
surfaces
argument inmne.viz.plot_alignment()
to allow dict for transparency values, and set default for sEEG data to have transparency (#8445 by Keith Doelling)Add support for
mri_fiducials='estimated'
inmne.viz.plot_alignment()
to allow estimating MRI fiducial locations usingmne.coreg.get_mni_fiducials()
(#8553 by Eric Larson)Update default values in mne coreg and
mne.viz.plot_alignment()
for clearer representation of MRI and digitized fiducial points (#8553 by Alex Gramfort and Eric Larson)Add
n_pca_components
argument tomne.viz.plot_ica_overlay()
(#8351 by Eric Larson)Add
mne.stc_near_sensors()
to facilitate plotting ECoG data (#8190 by Eric Larson)Add
proj
argument tomne.make_fixed_length_epochs()
(#8351 by Eric Larson)Add
mne.preprocessing.realign_raw()
to realign simultaneous raw recordings in the presence of clock drift (#8539 by Eric Larson)Reduce memory usage of volume source spaces (#8379 by Eric Larson)
Speed up heavy use of
mne.SourceMorph.apply()
for volumetric source spaces by use of the methodmne.SourceMorph.compute_vol_morph_mat()
(#8366 by Eric Larson)Add support for non-uniform
zooms
(e.g., when using a surrogate MRI viamne.scale_mri()
) in volumetric morphing (#8642 by Eric Larson)In
mne.compute_source_morph()
zooms
are no longer required to match the spacing ofsrc_to
, which is useful to ensure the morphing is accurate when thesrc_to
spacing is large (e.g., 1 cm) (#8642 by Eric Larson)Add volumetric source space support to
mne.labels_to_stc()
(#8447 by Eric Larson)Speed up
mne.decoding.TimeDelayingRidge
with edge correction using Numba (#8323 by Eric Larson)Add
mne.Epochs.reset_drop_log_selection()
to facilitate writing epochs with many ignored entries in their drop log (#8449 by Eric Larson)Add sEEG source visualization using
mne.stc_near_sensors()
and sEEG working tutorial (#8402 by Eric Larson and Adam Li)Add
mne.channels.DigMontage.get_positions()
, which will return a dictionary of channel positions, coordinate frame and fiducial locations (#8460 by Adam Li)Add support for writing digitization points in a coordinate frame other than head in
mne.channels.DigMontage.save()
(#8532 by Eric Larson)Add
picks
parameter tomne.preprocessing.fix_stim_artifact()
to specify which channel needs to be fixed (#8482 by Alex Gramfort)Add progress bar support to
mne.time_frequency.csd_morlet()
(#8608 by Eric Larson)Further improved documentation building instructions and execution on Windows (#8502 by Evgenii Kalenkovich and Eric Larson)
Add option to disable TQDM entirely with
MNE_TQDM='off'
(#8515 by Eric Larson)Add option
on_header_missing
tomne.channels.read_polhemus_fastscan()
(#8622 by Eric Larson)Add option
window
tomne.time_frequency.psd_welch
and related functions (#8862 by Eric Larson)mne.preprocessing.ICA.plot_sources
now displays anmne.preprocessing.ICA.plot_properties
window when right-clicking on component names on the y-axis (#8381 by Daniel McCloy)mne.io.read_raw_edf()
,mne.io.read_raw_bdf()
, andmne.io.read_raw_gdf()
now detect and handle invalid highpass/lowpass filter settings (#8584 by Clemens Brunner)If a
baseline
tuple containing one or twoNone
values – e.g.(None, 0)
,(0, None)
, or(None, None)
– is passed toEpochs
orapply_baseline
, theNone
value(s) will be replaced with the actual time (i.e.,tmin
andtmax
, respectively) when populatingEpochs.baseline
(#8442 by Richard Höchenberger)Epochs
will now retain the information about an applied baseline correction, even if the baseline period is partially or completely removed through cropping later on (#8442 by Richard Höchenberger)Add
mne.source_space.compute_distance_to_sensors()
to compute distances between vertices and sensors (#8534 by Olaf Hauk and Marijn van Vliet)Annotations can now be shown/hidden interactively in raw plots (#8624 by Daniel McCloy)
Added argument
colors
tomne.grow_labels
(#8519 by Olaf Hauk)Added
mne.SourceEstimate.apply_baseline
method for baseline-correction of source estimates (#8452 by Olaf Hauk)New
mne.viz.Brain.set_time
method to set the displayed time in seconds (#8415 by Daniel McCloy)Update the
backend
parameter ofmne.viz.plot_source_estimates()
to integratepyvista
(#8395 by Guillaume Favelier)Add
group_by
parameter tomne.viz.plot_epochs
andmne.Epochs.plot
to allow displaying channel data by sensor position (#8381 by Daniel McCloy)
Bugs#
Fix orthogonalization of power envelopes in
mne.connectivity.envelope_correlation
(#8658 by new contributor Qianliang Li and Eric Larson)Fix data overwrite of cascading simulation operations :
mne.simulation.simulate_raw
(#8633 by new contributor Jeff Stout)Fix a transpose issue of
mne.decoding.CSP.plot_filters()
(#8580 by new contributor Hongjiang Ye)Fix
mne.io.read_raw_curry()
to deal with Curry datasets that have channels that are listed in the labels file, but which are absent from the saved data file (e.g. ‘Ref’ channel). Also now populates info[‘meas_date’] if possible (#8400 by new contributor Tod Flak)Fix bug with mne.io.egi.tests/test_egi.py where it mandatorily downloaded testing data when it was not necessary (#8474 by new contributor Aniket Pradhan)
Fix bug with reading split files that have dashes in the filename (#8339 by new contributor Eduard Ort)
Fix bug with parsing EDF dates and date integers (#8558 by new contributor Austin Hurst and Eric Larson)
Fix bug with reading EDF and KIT files on big endian architectures such as s390x (#8618 by Eric Larson)
Fix bug with
mne.beamformer.make_dics()
where therank
parameter was not properly handled (#8594 by Marijn van Vliet and Eric Larson)Fix bug with
mne.beamformer.apply_dics()
where the whitener was not properly applied (#8610 by Eric Larson)Fix bug with
plot_epochs_image
whenorder
is supplied and multiple conditions are plotted (#8377 by Daniel McCloy )Fix bug with
mne.viz.plot_source_estimates()
when using the PyVista backend where singleton time points were not handled properly (#8285 by Eric Larson)Fix bug when passing
axes
to plotting functions,matplotlib.pyplot.tight_layout()
will not be called when the figure was created using a constrained layout (#8344 by Eric Larson)Fix bug with compensated CTF data when picking channels without preload (#8318 by Eric Larson)
Fix bug with plotting MEG topographies where the wrong extrapolation made was used in ICA (#8637 by Eric Larson)
Fix bug when merging fNIRS channels in
mne.viz.plot_evoked_topomap()
and related functions (#8306 by Robert Luke)Fix bug where events could overflow when writing to FIF (#8448 by Eric Larson)
mne.io.read_raw_edf()
now supports EDF files with invalid recording dates (#8283 by Clemens Brunner)Fix bug with
mne.io.Raw.save()
when usingsplit_naming='bids'
where non-split files would still be namedname_split-01_meg.fif
instead of the requestedname_meg.fif
(#8464 by Alex Gramfort and Eric Larson)Fix bug with
mne.preprocessing.ICA
wheren_pca_components
as afloat
would give the number of components that explained less than or equal to the given variance. It now gives greater than the given number for better usability and consistency withsklearn.decomposition.PCA
. Generally this will mean that one more component will be included (#8326 by Eric Larson)Fix bug with
mne.preprocessing.ICA
where projections were not tracked properly (#8343 by Eric Larson)Fix bug where extrapolation points created artifacts in
mne.viz.plot_evoked_topomap()
and related functions (#8425 by Mikołaj Magnuski)Fix bug with
mne.preprocessing.read_ica_eeglab()
where full-rank data were not handled properly (#8326 by Eric Larson)Fix bug with Somatosensory where the BEM was not included (#8317 by Eric Larson)
Fix bug with coordinate frames when performing volumetric morphs via
mne.compute_source_morph()
andmne.SourceMorph.apply()
that could lead to ~5 mm bias (#8642 by Eric Larson)Fix bug with volumetric rendering alpha in
mne.VolSourceEstimate.plot_3d()
and related functions (#8663 by Eric Larson)Fix missing documentation of
mne.io.read_raw_nihon()
in Importing data from EEG devices (#8320 by Adam Li)Fix bug with
mne.add_reference_channels()
whenmne.io.Raw.reorder_channels()
or related methods are used afterward (#8303, ##8484 by Eric Larson)Fix bug where the
verbose
arguments tomne.Evoked.apply_baseline()
andmne.Epochs.apply_baseline()
were not keyword-only (#8349 by Eric Larson)ICA.max_pca_components
will not be altered by callingfit
anymore. Instead, the new attributeICA.max_pca_components_
will be set (#8321 by Richard Höchenberger)Fix bug that
plot_ica_overlay
would sometimes not create red traces (#8341 by Richard Höchenberger)Fix bug with
ICA
wheren_components=None, n_pca_components=None
could lead to unstable unmixing matrix inversion by makingn_components=None
also use the lesser ofn_components=0.999999
andn_components=n_pca_components
(#8351 by Eric Larson)The
ica.n_pca_components
property is no longer be updated duringmne.preprocessing.ICA.fit()
, insteadica.n_components_
will be added to the instance (#8351 by Eric Larson)Pass
rank
everyhwere in forward preparation for source imaging. This bug affected sparse solvers when using maxfilter data (#8368 by Alex Gramfort)Fix bug in
mne.viz.plot_alignment()
where ECoG and sEEG channels were not plotted and fNIRS channels were always plotted in the head coordinate frame (#8393 by Eric Larson)Fix bug in
mne.set_bipolar_reference()
wherech_info
could contain invalid channel information keys (#8416 by Eric Larson)When reading BrainVision raw data, the channel units and types were sometimes not inferred correctly (#8434 by Richard Höchenberger)
Attempting to remove baseline correction from preloaded
Epochs
will now raise an exception (#8435 by Richard Höchenberger)mne.Report.parse_folder()
will now correctly handle split FIFF files (#8486, #8491 by Richard Höchenberger)Fix bug where BrainVision channel names, event types, and event descriptions containing commas were incorrectly parsed (#8492 by Stefan Appelhoff)
Fix bug in
mne.preprocessing.compute_fine_calibration()
where the magnetometer calibration coefficients were computed incorrectly (#8522 by Eric Larson)Fix bug in
mne.io.read_raw_eeglab()
where empty event durations led to an error (#8384 by Mikołaj Magnuski)Fix inset sensor plots to always use equal aspect (#8545 by Daniel McCloy)
Fix bug in
mne.viz.plot_compare_evokeds
where evokeds with identicalcomment
attributes would not plot properly if passed as a list (#8590 by Daniel McCloy)Fix bug in
mne.time_frequency.psd_welch
and related functions where the window default errantly changed from'hamming'
to('tukey', 0.25)
(#8862 by Eric Larson)Fix bug in
mne.io.read_raw_kit()
where scale factors for EEG channels could be set to zero (#8542 by Eric Larson)Fix reading GDF files with excluded channels in
mne.io.read_raw_gdf()
(#8520 by Clemens Brunner)Fix automatic selection of extrapolation mask type from channel type when plotting field maps (#8589 by Daniel McCloy)
Fix bug in
mne.viz.set_3d_title()
where 3D plot could have multiple titles that overlap (#8564 by Guillaume Favelier)Fix bug in
mne.viz.set_3d_view()
where plotter is not updated properly causing camera issues in the doc (#8564 by Guillaume Favelier)mne.preprocessing.find_ecg_events()
didn’t take thetstart
parameter value into account when calculating the average heart rate (#8605 by Richard Höchenberger)
API changes#
Minimum required versions were increased for core dependencies NumPy (1.15.4), SciPy (1.1.0), and Matplotlib (3.0) and for the optional dependencies scikit-learn (0.20.2) and pandas (0.23.4) (#8374 by Eric Larson)
The parameter
on_split_missing
has been added tomne.io.read_raw_fif()
and its default will change from'warn'
to'raise'
in 0.23, by (#8357 Eric Larson)The
max_pca_components
argument ofICA
has been deprecated, usen_components
during initialization andn_pca_components
inapply()
instead (#8351 by Eric Larson)The
n_pca_components
argument ofICA
has been deprecated, usen_pca_components
inapply()
(#8356 by Eric Larson)The
trans
argument ofmne.extract_label_time_course()
is deprecated and will be removed in 0.23 as it is no longer necessary (#8389 by Eric Larson)Parameter
event_colors
inmne.viz.plot_epochs
andmne.Epochs.plot
is deprecated, replaced byevent_color
which is consistent withmne.viz.plot_raw
and provides greater flexibility (#8381 by Daniel McCloy)