Version 0.20 (2020-03-27)#
Changelog#
Improved
mne.viz.plot_epochs()
to label epoch counts starting from 0, by Sophie HerbstAdd
minimum_norm.apply_inverse_cov()
to compute static power by applying inverse solutions to a data covariance matrix by Denis Engemann, Luke Bloy, and Eric LarsonAdd
mne.minimum_norm.resolution_metrics()
to compute various resolution metrics for inverse solutions, by Olaf HaukAdd current source density
mne.preprocessing.compute_current_source_density()
to compute the surface Laplacian in order to reduce volume conduction in data by Alex RockhillAdd
mne.chpi.extract_chpi_locs_ctf()
to extract cHPI coil locations from CTF data by Luke BloyAdd
mne.chpi.compute_chpi_amplitudes()
,mne.chpi.compute_chpi_locs()
, andmne.chpi.compute_head_pos()
to compute head positions from cHPI coil locations by Eric Larson and Luke BloyAdd
allow_line_only
option tomne.chpi.filter_chpi()
to allow filtering line frequencies only in files that do not have cHPI information by Eric LarsonAdd
mne.Epochs.as_type()
to allow remapping data in MEG channels to virtual magnetometer or gradiometer channels by Sophie Herbst and Alex GramfortAdd
copy
parameter tomne.Epochs.iter_evoked()
by Alex GramfortAdd command mne setup_source_space to quickly set up bilateral hemisphere surface-based source space with subsampling by Victor Ferat.
Add command mne sys_info to print system information by Eric Larson
Add function
mne.make_fixed_length_epochs()
to segment raw into fixed length epochs by Mohammad DaneshzandAdd support for computing patch information only in surface source space creation with
add_dist='patch'
inmne.setup_source_space()
anddist_limit=0
inmne.add_source_space_distances()
by Eric LarsonAdd
mne.Label.restrict
to restrict a label to vertices within a source space by Eric LarsonAdd support for passing a destination source space
src_to
inmne.compute_source_morph()
to ensure morphing for multiple subjects results in consistent STCs, by Eric LarsonAdd support for
smooth='nearest'
for surfaces inmne.compute_source_morph()
by Eric LarsonAdd support for plotting fNIRS channels in
mne.viz.plot_alignment()
,mne.viz.plot_evoked_topo()
andmne.Evoked.animate_topomap()
by Eric Larson and Robert LukeAdd command line tool mne anonymize for anonymizing raw fiff files by Luke Bloy
Add
mne.preprocessing.find_bad_channels_maxwell()
for automatic bad channel detection via Maxwell filtering by Eric LarsonAdd support to
mne.io.anonymize_info()
to allow time offset to be applied to dates by Luke BloyAdd support for computing resolution matrix to get point spread functions (PSF) and cross-talk functions (CTF) in
mne.minimum_norm.make_inverse_resolution_matrix()
,mne.beamformer.make_lcmv_resolution_matrix()
,mne.minimum_norm.get_cross_talk()
,mne.minimum_norm.get_point_spread()
by Olaf HaukAdd
mne.preprocessing.read_ica_eeglab()
to read EEGLAB ICA decompositions by Christian O’ReillyAdd keyboard functionality to interactive colorbar plotting TFRs by Stefan Repplinger
Add the ability to
return_event_id
inmne.read_events()
for use with MNE-C produced-annot.fif
files, by Eric LarsonAdd option to
mne.connectivity.spectral_connectivity
to compute corrected imaginary PLV by Adonay NunesAdd
mne.SourceEstimate.estimate_snr()
to estimate source-space SNR, by Kaisu Lankinen and Padma SundaramAdd option to specify the coordinate frame in
mne.channels.read_custom_montage()
by Eric LarsonAdd option to use
match_case=False
tomne.io.Raw.set_montage()
and related functions by Eric LarsonAdd reader for NIRx data in
mne.io.read_raw_nirx()
by Robert LukeAdd function to convert NIRS data to optical density
mne.preprocessing.nirs.optical_density()
by Robert LukeAdd function to convert NIRS data to haemoglobin concentration
mne.preprocessing.nirs.beer_lambert_law()
by Robert LukeAdd
fig
argument tomne.viz.plot_evoked_field()
by Eric LarsonAdd functions to calculate spatial information of NIRS channels
mne.preprocessing.nirs.source_detector_distances()
andmne.preprocessing.nirs.short_channels()
by Robert LukeAdd reader for
*.dat
electrode position filesmne.channels.read_dig_dat()
by Christian BrodbeckImproved
mne.viz.plot_events()
to always show event counts by Eric LarsonImproved LIMO Dataset usage and example for usage of
mne.stats.linear_regression()
by Jose AlanisAdd support for
reduce_rank=True
for vector beamformers by Eric LarsonAdd
method='sphere'
support for using Freesurfer spherical inflation inmne.decimate_surface()
to facilitate mesh downsampling for use withmne.make_bem_model()
by Eric LarsonSpeed up
mne.beamformer.make_lcmv()
andmne.beamformer.make_dics()
calculations by vectorizing linear algebra calls by Dmitrii Altukhov and Eric LarsonSpeed up
mne.make_forward_solution()
using Numba, by Eric LarsonSpeed up
mne.io.read_raw_fif()
data reading when the recording is long and there are many data tags repeatedly accessed, by Eric LarsonFor KIT systems without built-in layout,
mne.channels.find_layout()
now falls back on an automatically generated layout, by Christian Brodbeckmne.Epochs.plot()
now takes aepochs_colors
parameter to color specific epoch segments by Mainak JasAdd command mne setup_forward_model to quickly create a BEM model for a subject by Victor Ferat.
Add command mne prepare_bem_model to quickly create a BEM solution using the linear collocation approach by Victor Ferat.
Add support for reading
.bdip
Xfit binary dipole fit files inmne.read_dipole()
by Eric LarsonAllow returning vector source estimates from sparse inverse solvers through
pick_ori='vector'
by Christian BrodbeckAdd NIRS support to
mne.viz.plot_topomap()
andmne.viz.plot_ica_components()
by Robert LukeAdd the ability to
mne.channels.equalize_channels()
to also re-order the channels and also operate on instances ofmne.Info
,mne.Forward
,mne.Covariance
andmne.time_frequency.CrossSpectralDensity
by Marijn van VlietAllow
mne.channels.read_custom_montage
to handle fiducial points for BESA spherical (.elp
) files by Richard HöchenbergerAdd
rank
argument tomne.fit_dipole()
by Eric LarsonAdd function to convert events to annotations
mne.annotations_from_events()
by Nicolas BarascudAdd function to calculate scalp coupling index for fNIRS data
mne.preprocessing.nirs.scalp_coupling_index()
by Robert LukeAdd
item
argument tomne.Epochs.get_data()
for faster access to NumPy data arrays compared tomne.Epochs.__getitem__()
for frequent access on largemne.Epochs
objects, by Eric LarsonMore accurate coordinate system for Easycap montages in
mne.channels.make_standard_montage()
by Christian BrodbeckAdd
border
argument tomne.viz.plot_topomap()
.border
controls the value of the edge points to which topomap values are extrapolated.border='mean'
sets these points value to the average of their neighbours. By Mikołaj MagnuskiAdd function
mne.viz.link_brains()
to link time properties of multiple brain objects interactively by Guillaume FavelierAdd function
mne.preprocessing.annotate_movement()
to annotate periods with head motion andmne.preprocessing.compute_average_dev_head_t()
to re-estimate the device to head transform with average head position during segments with acceptable head movement. by Adonay NunesMake selected channels more distinguishable in
mne.Epochs.plot_sensors()
when usingkind='select'
by Mikołaj MagnuskiAllow retrieval of the number of Infomax ICA iterations via the new
return_n_iter
keyword argument ofmne.preprocessing.infomax()
by Richard HöchenbergerExpose the number of ICA iterations during the fitting procedure via the
n_iter_
attribute ofmne.preprocessing.ICA
by Richard Höchenbergermne.grand_average()
now produces a warning when only a single dataset was passed, instead of raising an error by Richard HöchenbergerAdd
nrows
andncols
parameters tomne.viz.plot_evoked_topomap()
, which allows to create multiline topomap plots for Evoked. By Federico RaimondoImprove repr of
mne.Info
(empty items are not shown anymore) by Clemens Brunner
Bug#
Fix the
reduce_rank
parameter inmne.beamformer.make_lcmv()
andmne.beamformer.make_dics()
to reduce the rank of the leadfield first before then reducing the rank of the denominator of the beamformer formula for the inversion by Britta Westner and Eric Larson.Fix bug with
mne.beamformer.make_lcmv()
with data where rank was incorrectly checked by Eric Larson.Allow
mne.channels.read_dig_hpts()
to accept point categories (eg. EEG) to be specified in upper case by Alex Gramfort.Fix a bug in
mne.MixedSourceEstimate.plot_surface
that prevented plotting in latest PySurfer by Christian O’Reilly.Fix
method='eLORETA'
inmne.minimum_norm.apply_inverse()
, by Eric Larson:regularization, which was off by roughly a factor of a square root
units, which are now nAm instead of being arbitrary
explained variance and residuals, which were previously unavailable
force_equal
in the case of loose orientations, which previously defaulted toTrue
now defaults toFalse
. Reapplying orientation priors at each iteration of the algorithm sufficiently preserves a smooth transition between loose=0. to loose=1. without compromising localization accuracy in testing.
Fix bug in
method='eLORETA'
formne.minimum_norm.apply_inverse()
(and variants) to allow restricting source estimation to a label by Luke BloyFix bug in
mne.compute_covariance()
andmne.compute_raw_covariance()
where biased normalization (based on degrees of freedom) was used andcov.nfree
was not set properly by Eric LarsonFix
mne.VectorSourceEstimate.normal
to account for cortical patch statistics usinguse_cps=True
by Eric LarsonFix
pick_ori='normal'
formne.minimum_norm.apply_inverse()
when the inverse was computed withloose=1.
and the forward solution was not in surface orientation, by Eric LarsonFix missing xlabel for
mne.io.Raw.plot_psd()
and similar functions when passing a subset of axes from a figure by Alex GramfortFix wrong DataFrame index when
index=None
in methodsmne.io.Raw.to_data_frame()
,mne.Epochs.to_data_frame()
,mne.Evoked.to_data_frame()
, andmne.SourceEstimate.to_data_frame()
, by Daniel McCloy.Fix incorrect scaling of cluster temporal extent in
mne.stats.summarize_clusters_stc()
by Daniel McCloy.Fix
mne.time_frequency.read_tfrs()
to properly readInfo
transforms by Eric LarsonFix
mne.viz.plot_sensors()
to always plot in head coordinate frame by Daniel McCloy.Fix
mne.io.read_raw_cnt()
for version 1 of format in the presence of annotations by Alex Gramfort.Fix
mne.decoding.GeneralizingEstimator
and related classes to support multi-class sklearn scorers such as'roc_auc_ovo'
and'roc_auc_ovo_weighted'
by Eric LarsonFix
mne.io.read_raw_ctf()
to set measurement date from CTF ds files by Luke Bloy.Fix
mne.read_epochs_eeglab()
that ignored channel locations by Alex Gramfort.Fix
mne.io.read_raw_brainvision()
when channel names have spaces by Sebastian Major.Fix
mne.io.read_raw_brainvision()
when"Core"
is in the data header by Eric LarsonFix
mne.io.Raw.anonymize()
to correctly resetraw.annotations.orig_time
by Luke Bloy.Fix
mne.io.Raw.anonymize()
to correctly avoid shiftingraw.annotations.onset
relative toraw.first_samp
by Eric LarsonFix
mne.io.Raw.set_channel_types()
andmne.io.Raw.rename_channels()
and related methods to return the instance instead ofNone
by Eric Larsonmne.Epochs.iter_evoked()
now does not return a copy of info whencopy=False
(default parameter) by Alex GramfortThe attribute
mne.Annotations.orig_time
is now read-only, and is adatetime
object (or None) rather than float, by Eric LarsonFix bug where MRI distances were not properly initialized in mne coreg by Eric Larson
Fix
xscale='log'
inmne.io.Raw.plot_psd()
and related functions by Alex GramfortUnify behavior of
raw.annotations.append(...)
whenraw.info['meas_date']
is None to make onsets absolute relative tofirst_samp
as they are whenraw.info['meas_date']
is not None; i.e., you might need to doraw.annotations.append(old_time + raw.first_time)
, by Eric LarsonThe
info['meas_date']
entry is now adatetime
object (or None) rather than float, by Eric LarsonFix
mne.time_frequency.AverageTFR.save()
and related functions to deal withdatetime
objects properly by Eric LarsonFix date reading before Unix time zero (1970 Jan 1) on Windows by Alex Rockhill.
Fix bug running subprocesses (e.g., in
mne.bem.make_watershed_bem()
) in Jupyter notebooks, by Eric LarsonFix
mne.io.read_raw_artemis123()
to add HPI locations to digitization points, by Luke BloyFix
mne.Epochs.shift_time()
andmne.Evoked.shift_time()
to return the modifiedEpochs
orEvoked
instance (instead ofNone
) by Daniel McCloy.Fix
mne.read_annotations()
for text files with zero or one annotations, by Adonay NunesFix bug in
ICA
where requesting extended infomax viafit_params={'extended': True}
was overridden, by Daniel McCloy.Fix bug in
mne.Epochs.interpolate_bads()
where theorigin
was not used during MEG or EEG data interpolation by Eric Larson. Old behavior can be achieved usingorigin=(0., 0., 0.)
for EEG andorigin=(0., 0., 0.04)
for MEG, and the new default isorigin='auto'
, which uses a head-digitization-based fit.Fix bug in
mne.write_evokeds()
whereevoked.nave
was not saved properly when multipleEvoked
instances were written to a single file, by Eric LarsonFix bug in
mne.preprocessing.mark_flat
where acquisition skips were not handled properly, by Eric LarsonFix bug in
mne.viz.plot_bem()
where some sources were not plotted by Jean-Remi King and Eric LarsonFix TAL channel parsing (annotations) for EDF-D files by Clemens Brunner
Fix bug with
mne.viz.plot_dipole_locations()
when plotting in head coordinates by Eric LarsonFix handling in cases where no components are found in
mne.preprocessing.corrmap()
by Eric LarsonFix handling of repeated events in
mne.Epochs
by Fahimeh Mamashli and Alex GramfortFix many bugs with plotting sensors overlaid on a head outline. All plotting is now done in head coordinates and scaled by
head_radius
, which defaults to 0.095, by Eric LarsonFix
mne.io.anonymize_info()
to allow shifting dates of service and to match anticipated changes in mne-cpp by Luke BloyFix reading of cardinals in .htps files (identifier are int not strings) by Alex Gramfort
Fix IO of TFRs when event_id contain a / in one of the keys by Alex Gramfort
Fix plotting of TFRs with linear y-scale (misaligned frequency bins), by Stefan Repplinger and Eric Larson
Fix
info['sfreq']
when decimating inmne.time_frequency.tfr_multitaper()
andmne.time_frequency.tfr_morlet()
and make sure an error is raised when exceed Nyquist frequency by Adonay NunesFix bug in EDF(+) loading, filter values ignored by insufficient regex, by Demetres Kostas
Fix missing scaling of tolerance parameter in
mne.inverse_sparse.tf_mixed_norm()
andmne.inverse_sparse.mixed_norm()
, by Mathurin MassiasFix the automatic scaling of the glyphs in
mne.viz.plot_vector_source_estimates()
by using 10% of the brain width, by Guillaume FavelierFix handling of missing values (NaNs) in
mne.time_frequency.psd_welch
by Clemens BrunnerFix
mne.decoding.LinearModel
to support the refitted estimator ofGridSearchCV
insklearn
by Chun-Hui LiFix
mne.viz.plot_topomap()
when there are bad channels in the providedmne.Info
instance by Eric LarsonFix check for subject definition existing in source space in
mne.compute_source_morph()
and related functions by Eric LarsonFix creation of new figures in
mne.Epochs.plot_image()
andmne.viz.plot_epochs_image()
by Eric LarsonFix bug in
Xdawn
where filters where selected along the incorrect axis, by Henrich KolkhorstFix bug in
mne.bem.make_watershed_bem()
where some surfaces were saved incorrectly in the working directory by Yu-Han LuoFix support for multiple TAL (annotations) channels in BDF reader by Clemens Brunner
Fix missing
brainmask
file type inmne.bem.make_watershed_bem()
by changing its default value tows.mgz
by Fu-Te WongFix bug in
mne.channels.make_standard_montage()
which would returneasycap-M1
even when requestingeasycap-M10
by Christian BrodbeckFix the way planar gradiometers are combined in
mne.viz.plot_tfr_topomap()
andmne.Epochs.plot_psd_topomap()
by Geoff BrookshireImprove error message when trying to load FieldTrip data from a cell array by Thomas Hartmann
Fix bug in
mne.read_evoked_fieldtrip()
causing it to crash when channels were present in the provided Info object but were not present in the data by Thomas HartmannFix placement of extrapolation points in
mne.Evoked.plot_topomap()
and related functions when exactly three channels were used by Mikołaj Magnuski.Fix bug in reading annotations in
read_annotations()
, which would not accept “;” character by Adam LiFix bug in
mne.Report.parse_folder()
, which would not recognize*meg.fif
files by Dmitrii Altukhov.Include
fit_params
when saving anICA
instance to disk by Richard HöchenbergerUpdate old url link in
mne.datasets.eegbci.load_data()
toEEGMI_URL = 'https://physionet.org/files/eegmmidb/1.0.0/'
by Ramiro GattiEnsure corrected p-values calculated by
mne.stats.bonferroni_correction()
never exceed the value of 1.0 by Richard Höchenberger
API#
mne.io.pick.get_channel_types
is now calledmne.io.pick.get_channel_type_constants
to better reflect its return values, by Daniel McCloy.mne.Evoked.as_type()
now returns an instance ofmne.EvokedArray
by Sophie Herbst and Alex GramfortBumped minimum requirements to fall 2017 versions by Eric Larson:
NumPy 1.13.3
SciPy 1.0.0
matplotlib 2.1
scikit-learn 0.19.1 (optional requirement)
pandas 0.21 (optional requirement)
mne.Epochs.plot()
now accepts anevent_id
parameter (useful in tandem withevent_colors
for specifying event colors by name) by Daniel McCloy.Passing
ch_types=None
has been deprecated in favor of explicitly passingch_types='misc'
inmne.create_info()
by Eric LarsonNew time conversion options for methods
mne.io.Raw.to_data_frame()
,mne.Epochs.to_data_frame()
,mne.Evoked.to_data_frame()
, andmne.SourceEstimate.to_data_frame()
, by Daniel McCloy.mne.Epochs.shift_time()
andmne.Evoked.shift_time()
now allow shifting times by arbitrary amounts (previously only by integer multiples of the sampling period), by Daniel McCloy and Eric Larson.The
head_pos
argument ofmne.Evoked.plot_topomap()
and related functions has been deprecated in favor ofhead_radius
, by Eric Larson.The
layout
argument to topomap-related functions such asmne.Evoked.plot_topomap()
andmne.viz.plot_tfr_topomap()
has been deprecated in favor of channel-position based flattening based on theinfo
andsphere
argument, by Eric Larson.The APIs of
mne.io.Raw.plot_projs_topomap()
,mne.Epochs.plot_projs_topomap()
andmne.Evoked.plot_projs_topomap()
are now more similar tomne.viz.plot_projs_topomap()
by Daniel McCloy.The function
mne.setup_volume_source_space()
has asphere_units
argument that defaults to'mm'
in 0.20 but will change to'm'
in 0.21, set it to avoid a warning by Eric Larson.mne.viz.plot_projs_topomap()
and the related methodsmne.io.Raw.plot_projs_topomap()
,mne.Epochs.plot_projs_topomap()
andmne.Evoked.plot_projs_topomap()
now accept parametervlim
to control the colormap, with keyword'joint'
computing the colormap jointly across all projectors of a given channel type, by Daniel McCloy.New methods
mne.io.Raw.get_channel_types()
,mne.Epochs.get_channel_types()
,mne.Evoked.get_channel_types()
by Daniel McCloy.Deprecate
mne.minimum_norm.point_spread_function
andmne.minimum_norm.cross_talk_function
by Alex GramfortDeprecate
montage
parameter ofmne.create_info()
in favor ofmne.io.Raw.set_montage()
,mne.Info.set_montage()
, and related functions by Eric Larsonmne.channels.equalize_channels()
no longer operates in-place by default, but instead makes copies of the objects when necessary (seecopy
parameter) by Marijn van Vlietmne.channels.equalize_channels()
now uses the first object in the list as a template for channel ordering by Marijn van Vlietmne.channels.equalize_channels()
now also re-orders the channels to match, in addition to dropping channels that are not shared by all objects by Marijn van Vlietmne.io.Raw.pick_channels()
,mne.Epochs.pick_channels()
andmne.Evoked.pick_channels()
now have anordered
parameter to enforce the ordering of the picked channels by Marijn van VlietNew methods
mne.Forward.pick_channels()
,mne.Covariance.pick_channels()
,mne.Info.pick_channels
,mne.time_frequency.CrossSpectralDensity.pick_channels()
by Marijn van VlietNew attributes
mne.Forward.ch_names
andmne.Info.ch_names
by Marijn van VlietIn
Xdawn
, the components are stored in the rows of attributesfilters_
andpatterns_
to be consistent withCSP
andICA
by Henrich KolkhorstDrop
unit
keyword argument frommne.channels.read_custom_montage()
, as it was unused by Richard HöchenbergerDeprecate
mne.preprocessing.run_ica
, usemne.preprocessing.ICA.detect_artifacts
instead by Richard Höchenberger