Version 0.19 (2019-09-24)#
Changelog#
Add
mne.cuda.set_cuda_device()and config variableMNE_CUDA_DEVICEto select among multiple GPUs (by numeric device ID) by Daniel McCloy.Add
mne.channels.make_standard_montage()to createmne.channels.DigMontagefrom templates by Joan Massich and Alex Gramfort.Add
mne.channels.compute_dev_head_t()to compute Device-to-Head transformation from a montage by Joan Massich and Alex Gramfort.Add
mne.channels.read_dig_fif()to read digitization coordinates from.fiffiles by Joan Massich and Alex Gramfort.Add
mne.channels.read_dig_egi()to read digitization coordinates from EGI.xmlfiles by Joan Massich and Alex Gramfort.Add
mne.channels.read_dig_polhemus_isotrak()andmne.channels.read_polhemus_fastscan()to read Polhemus data by Joan MassichAdd
mne.channels.read_dig_captrackto read BrainVision CapTrak (BVCT) digitization coordinate files by Stefan Appelhoff and Joan MassichAdd
mne.channels.make_dig_montage()to createmne.channels.DigMontageobjects out of np.arrays by Joan MassichAdd
mne.channels.read_custom_montage()to read various EEG electrode locations files by Joan Massich and Alex Gramfort.Add support for making epochs with duplicated events, by allowing three policies: “error” (default), “drop”, or “merge” in
mne.Epochsby Stefan AppelhoffAllow
mne.Annotations.crop()to support negativetminandtmaxby Joan MassichUnknown events code in GDF are now visible in the
event_idby Théodore PapadopouloNow
mne.io.read_raw_ctf()populatesraw.annotationswith the markers inMarkerFile.mrkif any by Joan MassichAdd options for controlling the use of the
-T1flag and the location of the brainmask output in mne watershed_bem by Eric LarsonAdd support to
mne.read_annotations()to read CTF marker files by Joan MassichDo not convert effective number of averages (
naveattribute ofmne.Evoked) to integer except when saving to FIFF file by Daniel McCloy.Add automatic fiducial position estimation in mne coreg using MNI Talairach fiducial locations in
mne.coreg.get_mni_fiducials()by Jon Houck and Eric LarsonAdd support for mne coreg scaling surrogate subjects without surface reconstructions, such as those created for volumetric analyses only (e.g., with
recon-all -autorecon1) by Eric LarsonAdd reader for Curry data in
mne.io.read_raw_curry()by Dirk GütlinButterfly channel plots now possible for
mne.Epochs.plot_psd()withaverage=False. Infrastructure for this function now shared with analogous Raw function, found inmne.viz.utilsby Jevri HannaAdd option not to orthogonalize power envelopes with
orthogonalize=Falseinmne.connectivity.envelope_correlationby Denis EngemannAccept filenames of raw .fif files that end in
_meg.fifto enable complicance with the Brain Imaging Data Structure by Stefan AppelhoffAdd function to check the type of a FIF file using
mne.what()and mne what by Eric LarsonAdd support for specifying the initial time and/or position and providing a
mne.SourceMorphinstead ofmne.SourceSpacesinmne.viz.plot_volume_source_estimates()by Eric LarsonSpeed up morph map generation in
mne.read_morph_map()by ~5-10x by usingnumba.jit()by Eric LarsonSpeed up
mne.setup_volume_source_space(), especially whenvolume_label is not Noneby Eric LarsonSpeed up mne coreg interactive and automated (ICP) alignment by using nearest-neighbor calculations in the MRI coordinate frame, by Eric Larson
Add
mne.dig_mri_distances()to compute the distances between digitized head points and the MRI head surface by Alex Gramfort and Eric LarsonAdd scale bars for data channels in
mne.io.Raw.plot()by Eric LarsonAdd
mne.viz.plot_brain_colorbar()to plot a colorbar appropriately matched to amne.viz.plot_source_estimates()plot by Eric LarsonAdd support for showing head surface (to visualize digitization fit) while showing a single-layer BEM to
mne.viz.plot_alignment()by Eric LarsonAdd option
include_tmax=Trueto cropping methodsmne.io.Raw.crop(),mne.Epochs.crop(),mne.Evoked.crop(),mne.SourceEstimate.crop(),mne.Dipole.crop(), andmne.time_frequency.AverageTFR.crop()by Eric LarsonChange the behavior of
mne.io.Raw.plot()forscalings='auto'andremove_dc=Trueto compute the scalings on the data with DC removed by Clemens BrunnerAllow creating annotations within existing annotations in
mne.io.Raw.plot()by default (the old snapping behavior can be toggled by pressing ‘p’) by Clemens BrunnerAdd plotting of rank estimates in
mne.viz.plot_cov()by Eric LarsonAdd a new
mne.viz.plot_sensors_connectivityfunction to visualize the sensor connectivity in 3D by Guillaume Favelier and Alex GramfortAdd support for
info['utc_offset'],info['device_info'], andinfo['helium_info']components ofmne.Infoby Eric LarsonAdd control over dipole colors in
mne.viz.plot_dipole_locations()when using orthoview mode by Eric LarsonUse second-order-sections filtering in
mne.io.Raw.plot()and mne browse_raw by Eric LarsonAdd re-referencing functionality for ecog and seeg channel types in
mne.set_eeg_reference()by Keith DoellingAdd support for median averaging and for returning unaggregated segments in
mne.time_frequency.psd_welchby Richard Höchenbergerio.read_raw_kit(): add support for NYU New York 2019 system update, by Christian Brodbeck
Bug#
Fix setting montage eeg ref position for captrak by Joan Massich
Fix saving raw read from BDF file using
tminandtmaxusingpreload=Falseby Alex GramfortFix
mne.grand_average()to use equal sum-to-one weights (like it used to, before changes to underlyingmne.combine_evoked()) by Daniel McCloyFix
mne.io.Raw.filter()to deal with instances with no data channels properly by Eric LarsonFix one-sample baseline issue in
mne.BaseEpochswhen usingtmin=0by Milan RybářFix bug in
mne.viz.plot_volume_source_estimates()where'glass_brain'MRIs were not transformed to MNI space, by Eric LarsonFix bug in
mne.viz.plot_volume_source_estimates()where MRIs with voxels not in RAS orientation could not be browsed properly, by Eric LarsonFix bug in
mne.SourceMorph.apply()where output STCs hadstc.verticesdefined improperly, by Eric LarsonFix bug in
mne.SourceMorph.apply()where the default was errantlymri_space=Falseinstead ofmri_space=None(as documented), by Eric LarsonFix
mne.VolVectorSourceEstimate.normalandmne.minimum_norm.apply_inverse()to only allow normal extraction/orientation for surface and discrete source spaces by Eric LarsonFix
mne.io.Raw.set_annotations()formeas_dateprevious to 1970 by Joan MassichFix horizontal spacing issues in
mne.io.Raw.plot_psd()by Jevri HannaFix reading of dates in BrainVision files if no “New Segment” marker is specified, no date is given, or data is missing, by Stefan Appelhoff
Fix bug with reading one-channel GDF files by Abram Hindle
Fix bug with y-axis labeling in
mne.io.Raw.plot_psd()by Eric LarsonFix side-effect where
mne.viz.plot_ica_sources()andmne.preprocessing.ICA.plot_sources()changed theICA.excludeattribute even when users didn’t interact with the plot by Daniel McCloy.Fix scaling of sources in
ica.plot_sources(epochs)by Eric LarsonFix wrong assumptions about units in BrainVision montages and add test asserting units in “mm” or “auto”, by Stefan Appelhoff
Fix scaling issue with signals in mV in EDF files read with
mne.io.read_raw_edf()by Alex GramfortFix
mne.extract_label_time_course()behavior when using STCs generated withapply_inverse(..., label=label)orstc.in_labelby Eric LarsonFix bug in
mne.io.read_raw_brainvision()so that recording date timestamps are also recognized if channel reference data is negative, by Stefan AppelhoffFix order of
info['dig']that was alphabetical based on channel names and not following the channel order when usingmne.io.Raw.set_montage()and amne.channels.Montageobject by Joan Massich and Alex Gramfort.Fix reading CNT files larger than 2Gb by Joan Massich
Fix reading of 4D/BTi data with different channel names and onsets in
mne.io.read_raw_bti()by Joshua Bear and Eberhard EichFix formula for effective number of averages in
mne.combine_evoked()whenweights='equal'by Daniel McCloy.Fix bug in
mne.simulation.simulate_stc()to avoid empty stc if label vertices and source space do not intersect, by Kostiantyn MaksymenkoFix
event_id='auto'inmne.events_from_annotations()to recover Brainvision markers after saving it in.fifby Joan MassichFix
mne.read_epochs_eeglab()when epochs are stored as float. By Thomas RadmanFix
mne.Evoked.resample()andmne.Epochs.resample()not settinginst.info['lowpass']properly by Eric LarsonFix checks when constructing volumetric and surface source spaces with
mne.setup_volume_source_space()andmne.setup_source_space(), respectively, by Eric LarsonFix bug in handling of
mne.Evokedtypes that were not produced by MNE-Python (e.g., alternating average) by Eric LarsonFix bug in
mne.read_source_estimate()where vector volumetric source estimates could not be read by Eric LarsonFix bug in
mne.inverse_sparse.mixed_norm()andmne.inverse_sparse.tf_mixed_norm()whereweightswas supplied butweights_minwas not, by Eric LarsonFix bug in
mne.set_eeg_reference()where non-EEG channels could be re-referenced by default if there were no EEG channels present, by Eric LarsonFix bug in
mne.io.Raw.plot()when using HiDPI displays and the MacOSX backend of matplotlib by Eric LarsonFix bug in
mne.viz.plot_compare_evokeds()when using Neuromag 122 system by Eric LarsonFix bug in
mne.Epochs.plot_psd()when some channels had zero/infinitepsdvalues causing erroneous error messages by Luke BloyFix
mne.Evoked.decimate()not settinginst.firstandinst.lastproperly by Marijn van VlietFix
mne.io.read_raw_brainvision()not handlingEventmarkers created by PyCorder correctly by Richard HöchenbergerFix support for string-like objects (such as
pathlib.Path) by Eric LarsonFix
mne.Reportsilently suppressing exceptions when used as a context manager by Marijn van Vliet
API#
Deprecate
mne.channels.Montageclass,mne.channels.read_montageandmne.channels.read_dig_montagefunction by Joan Massich.Deprecate passing
Montage,stras montage parameter inmne.io.Raw.set_montage()by Joan Massich.Deprecate
set_digparameter inmne.io.Raw.set_montage()andupdate_ch_namesinmne.io.RawEEGLAB.set_montagewhen usingmne.channels.DigMontageas by Joan Massich.Now
mne.io.Raw.set_montage()raises an error whenmne.channels.DigMontagecontains only a subset of the channels inraw.info. It also addsraise_if_subsetparameter to ensure backward compatibility (defaults to False in 0.19, to True in 0.20, and will be removed in 0.21) by Joan Massich.Minimum dependency versions for the following libraries have been bumped up (by Eric Larson):
NumPy: 1.12.1
SciPy: 0.18.1
matplotlib: 2.0.2
scikit-learn: 0.18.2
pandas 0.19.2
New boolean parameter
show_scrollbarsformne.io.Raw.plot(),mne.Epochs.plot(), andmne.preprocessing.ICA.plot_sources()(and associated functions) that allows hiding the scrollbars and buttons for a “zen mode” data browsing experience. When the plot window has focus, zen mode can be toggled by pressing z, by Daniel McCloy.Deprecate
mne.evoked.grand_averagein favor ofmne.grand_average()(which works on bothEvokedandAverageTFR) by Daniel McCloyDeprecate
excludeparameter inmne.viz.plot_ica_sources()andmne.preprocessing.ICA.plot_sources(), instead always use theexcludeattribute of the ICA object by Daniel McCloy.Deprecate
montageparameter in favor of theset_montagemethod in all EEG data readersmne.io.read_raw_cnt(),mne.io.read_raw_egi(),mne.io.read_raw_edf(),mne.io.read_raw_gdf(),mne.io.read_raw_nicolet(),mne.io.read_raw_eeglab()andmne.read_epochs_eeglab()by Alex GramfortNew parameter
clearinmne.viz.plot_epochs_image()for clearing pre-existing axes before plotting into them by Daniel McCloymne.viz.plot_epochs_image()no longer supportsgroup_by='type'— combining by channel type is now the default whenpicksis a channel type string; to get individual plots for each channel, passpicksas a list of channel names or indices by Daniel McCloyNew parameter
combineinmne.viz.plot_compare_evokeds()for specifying method to combine information across channels by Daniel McCloyFIFF constants related to SmartShield (
*_SMSH_*and*_SMARTSHIELD) have been renamed toIASfor consistency with MEGIN, by Eric LarsonThe
gfpparameter ofmne.viz.plot_compare_evokeds()is deprecated; usecombine='gfp'instead by Daniel McCloyThe
truncate_yaxis='max_ticks'parameter ofmne.viz.plot_compare_evokeds()is deprecated; usetruncate_yaxis='auto'instead by Daniel McCloyThe
truncate_xaxisandtruncate_yaxisparameters ofmne.viz.plot_compare_evokeds()now perform one-sided truncation unless both areTrueby Daniel McCloyThe
show_legendparameter ofmne.viz.plot_compare_evokeds()is renamed tolegendby Daniel McCloymne.viz.plot_compare_evokeds()always returns a list of figures even when a single figure is generated by Daniel McCloyDeprecate
average=Trueandspatial_colors=Falseformne.Epochs.plot_psd()by Jevri Hannamne.io.read_raw_brainvision()no longer raises an error when there are inconsistencies betweeninfo['chs']andmontagebut warns instead by Joan MassichAdd
update_ch_namesparameter tomne.io.RawEEGLAB.set_montageto allow updating the channel names based on the montage by Joan MassichReading annotations contained in GDF files with
mne.io.read_raw_gdf()now returns numeric event codes as descriptions (instead of textual descriptions) due to restrictive licensing of the GDF event code table from BioSig by Clemens Brunnerchannels.find_ch_connectivitynow returns pre-built neighbor maps for KIT systems when available, by Christian Brodbeck