Version 0.18 (2019-05-19)#
Changelog#
Add
event_id='auto'inmne.events_from_annotations()to accommodate Brainvision markers by Jona Sassenhagen, Joan Massich and Eric LarsonAdd example on how to simulate raw data using subject anatomy, by Ivana Kojcic, Eric Larson, Samuel Deslauriers-Gauthier and Kostiantyn Maksymenko
mne.beamformer.apply_lcmv_cov()returns static source power after supplying a data covariance matrix to the beamformer filter by Britta Westner and Marijn van VlietAdd
butterflyandorderarguments tomne.viz.plot_epochs()and offer separated traces for non-meg data (seeg, eeg, ecog) in butterfly view by Stefan Repplinger and Eric Larsonmne.Epochs.get_data()now takes apicksparameter by Jona Sassenhagenplot_compare_evokeds()will generate topo plots ifaxes='topo'by Jona Sassenhagenmne.viz.iter_topographycan yield an additional axis, e.g., for plotting legends by Jona Sassenhagen and Daniel McCloyDefault plot title reflects channel type when
picksis a channel type inplot_compare_evokeds()by Daniel McCloyColor scale limits in
plot_topo_image_epochs()are now computed separately per channel type in combined mag/grad plots, by Daniel McCloymne.simulation.simulate_stc()now allows for label overlaps by Nathalie Gayraud, and Ivana KojcicAdd
long_formatoption to the pandas dataframe exporters, e.gmne.Epochs.to_data_frame()by Denis EngemannAdd example on how to load standard montage Plotting sensor layouts of EEG systems by Joan Massich
Add new tutorial on EEG forward operator with a template MRI by Alex Gramfort, and Joan Massich
Add
mne.Epochs.apply_hilbert()andmne.Evoked.apply_hilbert()by Eric LarsonAdd convenience
fsaveragesubject dataset fetcher / updatermne.datasets.fetch_fsaverage()by Eric LarsonAdd
fminandfmaxargument tomne.time_frequency.AverageTFR.crop()and tomne.time_frequency.EpochsTFR.crop()to crop TFR objects along frequency axis by Dirk GütlinAdd support to
mne.read_annotations()to read CNT formats by Joan MassichAdd
rejectparameter tomne.preprocessing.ICA.plot_properties()to visualize rejected epochs by Antoine GauthierAdd support for picking channels using channel name and type strings to functions with
picksarguments, along with a conveniencemne.io.Raw.pick(),mne.Epochs.pick(), andmne.Evoked.pick()method, by Eric LarsonAdd new tutorial on Sleep stage classification from polysomnography (PSG) data by Alex Gramfort, Stanislas Chambon and Joan Massich
Add data fetchers for polysomnography (PSG) recordings from Physionet (
mne.datasets.sleep_physionet.age.fetch_data()andmne.datasets.sleep_physionet.temazepam.fetch_data()) by Alex Gramfort and Joan MassichAdd envelope correlation code in
mne.connectivity.envelope_correlationby Denis Engemann, Sheraz Khan, and Eric LarsonAdd option to toggle all projectors in
mne.io.Raw.plot()and related functions by Eric LarsonAdd support for indexing, slicing, and iterating
mne.Annotationsby Joan Massichmne.io.Raw.plot()now uses the lesser ofn_channelsandraw.ch_names, by Joan MassichAdd support for FIR filtering in
mne.io.Raw.plot()and mne browse_raw by passingfiltorder=0or--filtorder 0, respectively, by Eric LarsonAdd
chunk_durationparameter tomne.events_from_annotations()to allow multiple events from a single annotation by Joan MassichAdd
mne.simulation.SourceSimulatorclass to simplify simulating SourceEstimates, by Samuel Deslauriers-Gauthier, Kostiantyn Maksymenko, Nathalie Gayraud, Ivana Kojcic, Alex Gramfort, and Eric Larsonmne.io.read_raw_edf()now detects analog stim channels labeled'STATUS'and sets them as stim channel.mne.io.read_raw_edf()no longer synthesize TAL annotations into stim channel but stores them inraw.annotationswhen reading by Joan MassichAdd
mne.simulation.add_noisefor ad-hoc noise addition toio.Raw,Epochs, andEvokedinstances, by Eric LarsonAdd
drop_refs=Trueparameter toset_bipolar_reference()to drop/keep anode and cathode channels after applying the reference by Cristóbal Moënne-Loccoz.Add processing of reference MEG channels to
mne.preprocessing.ICAby Jevri HannaAdd use of
scipy.signal.windows.dpss()for faster multitaper window computations in PSD functions by Eric LarsonAdd
mne.morph_labels()to facilitate morphing label sets obtained from parcellations, by Eric LarsonAdd
mne.labels_to_stc()to facilitate working with label data, by Eric LarsonAdd
mne.label.select_sources()to simplify the selection of sources within a label, by Samuel Deslauriers-GauthierAdd support for using
mne.Infoinmne.simulation.simulate_raw()instead ofmne.io.Rawby Eric LarsonAdd support for passing an iterable and stim channel values using
stcparameter ofmne.simulation.simulate_raw()by Eric LarsonAdd
overlapargument tomne.make_fixed_length_events()by Eric LarsonAdd approximate distance-based
spacingsource space decimation algorithm tomne.setup_source_space()by Eric LarsonAdd 448-labels subdivided aparc cortical parcellation by Denis Engemann and Sheraz Khan
Add option to improve rendering in mne coreg for modern graphics cards by Eric Larson
Add
mne.preprocessing.mark_flatto automate marking of flat channels and segments of raw data by Eric LarsonAdd support for CUDA-based correlation computations and progress bars in
mne.decoding.ReceptiveFieldby Eric LarsonAdd support for file-like objects in
mne.io.read_raw_fif()as long as preloading is used by Eric LarsonAdd keyboard shortcuts to nativate volume source estimates in time using (shift+)left/right arrow keys by Mainak Jas
Add option to SSP preprocessing functions (e.g.,
mne.preprocessing.compute_proj_eog()andmne.compute_proj_epochs()) to process MEG channels jointly withmeg='combined'by Eric LarsonAdd Epoch selection and metadata functionality to
mne.time_frequency.EpochsTFRusing new mixin class by Keith DoellingAdd
reject_by_annotationargument tomne.preprocessing.find_ecg_events()by Eric LarsonAdd
pcaargument to return the rank-reduced whitener inmne.cov.compute_whitener()by Eric LarsonAdd
extrapolateargument tomne.viz.plot_topomap()for better control of extrapolation points placement by Mikołaj MagnuskiAdd
channel_wiseargument tomne.io.Raw.apply_function()to allow applying a function on multiple channels at once by Hubert BanvilleAdd option
copy='auto'to control data copying inmne.io.RawArrayby Eric LarsonThe
mriparameter inmne.setup_volume_source_space()is now automatically set toT1.mgzifsubjectis provided. This allows to get amne.SourceSpacesof kindvolumemore automatically. By Alex GramfortAdd better
__repr__for constants, andinfo['dig']entries viaDigPointby Eric LarsonAllow string argument in
mne.io.Raw.drop_channels()to remove a single channel by Clemens BrunnerAdd additional depth weighting options for inverse solvers (e.g.,
mne.inverse_sparse.gamma_map()andmne.inverse_sparse.mixed_norm()) by Eric LarsonAdd depth weighting to LCMV beamformers via
depthargument inmne.beamformer.make_lcmv()by Eric LarsonAllow toggling of DC removal in
mne.io.Raw.plot()by pressing the ‘d’ key by Clemens BrunnerImproved clicking in
mne.io.Raw.plot()(left click on trace toggles bad, left click on background sets green line, right click anywhere removes green line) by Clemens BrunnerAdd
mne.realtime.LSLClientfor realtime data acquisition with LSL streams of data by Teon Brooks and Mainak JasAdd partial support for PyVista as a 3D backend using
mne.viz.use_3d_backend()by Guillaume FavelierAdd option
ids = Noneinmne.event.shift_time_events()for considering all events by Nikolas Chalas and Joan MassichAdd
mne.realtime.MockLSLStreamto simulate an LSL stream for testing and examples by Teon BrooksAdd support for file-like objects in
mne.read_epochs()as long as preloading is used by Paul Roujansky
Bug#
Fix annotations in split fif files
mne.io.read_raw_fif()by Joan MassichFix
mne.Epochs.plot()withscalings='auto'to properly compute channel-wise scalings by Stefan RepplingerFix
mne.gui.coregistration()and mne coreg crashing with segmentation fault when switching subjects by Eric LarsonFix
mne.io.read_raw_brainvision()to accommodate vmrk files which do not have any annotations by Alexander KovrigFix
mne.io.Raw.plot()andmne.Epochs.plot()to auto-scalemiscchannel types by default by Eric LarsonFix filtering functions (e.g.,
mne.io.Raw.filter()) to properly take into account the two elements inn_padparameter by Bruno NicenboimFix
feature_namesparameter change after fitting inmne.decoding.ReceptiveFieldby Jean-Rémi KingFix index error in
mne.io.read_raw_cnt()when creating stim_channel manually by Joan MassichFix bug with
weight_norm='unit-gain'inmne.beamformer.make_lcmv()andmne.beamformer.make_dics()by Britta WestnerFix 32bits annotations in
mne.io.read_raw_cnt()by Joan MassichFix
mne.events_from_annotations()to ignore'BAD_'and'EDGE_'annotations by default using a new defaultregexpby Eric LarsonFix bug in
mne.preprocessing.mark_flatwhereraw.first_sampwas not taken into account by Evgenii KalenkovichFix date parsing in
mne.io.read_raw_cnt()by Joan MassichFix topological checks and error messages for BEM surfaces in
mne.make_bem_model()by Eric LarsonFix default HTML language of
mne.Reportto be"en-us"instead of"fr"and allow setting viareport.langproperty by Eric LarsonFix bug where loading epochs with
preload=Trueand subsequently usingmne.Epochs.drop_bad()with newrejectorflatentries leads to improper data (andepochs.selection) since v0.16.0 by Eric Larson. If your code usesEpochs(..., preload=True).drop_bad(reject=..., flat=...), we recommend regenerating these data.Fix mne flash_bem to properly utilize
flash30images when conversion from DICOM images is used, and to properly deal with non-standard acquisition affines by Eric LarsonFix
mne.io.Raw.set_annotations()withannotations=Noneto create an empty annotations object withorig_timethat matches themne.io.Rawinstance by Eric LarsonFix
mne.io.read_raw_edf()returning all the annotations with the same name in GDF files by Joan MassichFix boundaries during plotting of raw data with
mne.io.Raw.plot()and mne browse_raw on scaled displays (e.g., macOS with HiDPI/Retina screens) by Clemens BrunnerFix bug where filtering was not performed with
lowpassorhighpassinmne.io.Raw.plot()and mne browse_raw by Eric LarsonFix
mne.simulation.simulate_evoked()that was failing to simulate the noise with heterogeneous sensor types due to poor conditioning of the noise covariance and make sure the projections from the noise covariance are taken into account Alex GramfortFix checking of
datadimensionality inmne.SourceEstimateand related constructors by Eric LarsonFix
mne.io.Raw.append()annotations miss-alignment by Joan MassichFix hash bug in the
mne.io.edfmodule when installing on Windows by Eric LarsonFix
mne.io.read_raw_edf()reading duplicate channel names by Larry EisenmanFix
set_bipolar_reference()in the case of generating all bipolar combinations and also in the case of repeated channels in both lists (anode and cathode) by Cristóbal Moënne-LoccozFix missing code for computing the median when
method='median'inmne.Epochs.average()by Cristóbal Moënne-LoccozFix CTF helmet plotting in
mne.viz.plot_evoked_field()by Eric LarsonFix saving of rejection parameters in
mne.Epochs.save()by Eric LarsonFix orientations returned by
mne.dipole.get_phantom_dipoles()(half were flipped 180 degrees) by Eric LarsonFix bug in
mne.viz.plot_compare_evokeds()whenevoked.times[0] >= 0would cause a problem withvlines='auto'mode by Eric LarsonFix path bugs in
mne.bem.make_flash_bem()and mne flash_bem by Eric LarsonFix
mne.time_frequency.AverageTFR.plot_joint()mishandling bad channels, by David Haslacher and Jona SassenhagenFix
mne.beamformer.make_lcmv()failing when full rank data is used (i.e., when no projection is done) withreg=0., by Eric LarsonFix issue with bad channels ignored in
mne.beamformer.make_lcmv()andmne.beamformer.make_dics()by Alex GramfortFix
mne.compute_proj_raw()whenduration != Nonenot to apply existing proj and to avoid using duplicate raw data samples by Eric LarsonFix
reject_by_annotationnot being passed internally bymne.preprocessing.create_ecg_epochs()and mne clean_eog_ecg tomne.preprocessing.find_ecg_events()by Eric LarsonFix
mne.io.read_raw_edf()failing when EDF header fields (such as patient name) contained special characters, by Clemens BrunnerFix
mne.io.read_raw_eeglab()incorrectly parsing event durations by Clemens BrunnerFix
mne.io.read_raw_egi()when cropping non-preloaded EGI MFF data by Alex GramfortFix
mne.io.Raw.interpolate_bads()for interpolating CTF MEG channels when reference sensors are present by jeythekeyFix a bug in
mne.io.Raw.resample(), where resampling events could result in indices > n_times-1, by jeythekeyFix
mne.preprocessing.ICA.score_sources()to use thesfreqof the raw data to filter rather than thesfreqwhen the ICA was fit, by jeythekeyFix a bug in
mne.preprocessing.ICA, where manually setting the attributeICA.excludeto an np.array resulted in the removal of random components when later also providing theexcludeargument to anyapply...-method, by jeythekeyAscending changed to descending sorting of scores for integer
..._criterionarguments inmne.preprocessing.ICA.detect_artifactsandmne.preprocessing.run_ica, as it used to be documented; the docstring in these functions was corrected for float..._criterionarguments, by jeythekey
API#
Deprecate
cov, iir_params, blink, ecg, chpi, random_stateand support formne.io.Rawinstance inputs inmne.simulation.simulate_raw(); usemne.simulation.add_noise(),mne.simulation.add_ecg(),mne.simulation.add_eog(), andmne.simulation.add_chpi()by Eric LarsonAdd
overwriteparameter inmne.Epochs.save()by Katarina SlamaAdd
stim_channelparameter inmne.io.read_raw_cnt()to toggle stim channel synthesis by Joan MassichPython 2 is no longer supported; MNE-Python now requires Python 3.5+, by Eric Larson
A new class
mne.VolVectorSourceEstimateis returned bymne.minimum_norm.apply_inverse()(and related functions) when a volume source space andpick_ori='vector'is used, by Eric LarsonConverting a forward solution with a volume source space to fixed orientation using
mne.convert_forward_solution()now raises an error, by Eric Larsonraw.estimate_rankhas been deprecated and will be removed in 0.19 in favor ofmne.compute_rank()by Eric LarsonAnnotationsare now kept sorted (by onset time) during instantiation andappend()operations, by Eric LarsonDeprecate
mne.io.find_edf_eventsby Joan MassichDeprecate
limit_depth_chsinmne.minimum_norm.make_inverse_operator()in favor ofdepth=dict(limit_depth_chs=...)by Eric LarsonReading BDF and GDF files with
mne.io.read_raw_edf()is deprecated and replaced bymne.io.read_raw_bdf()andmne.io.read_raw_gdf(), by Clemens Brunnermne.forward.compute_depth_prior()has been reworked to operate directly onForwardinstance asforwardrather than a representation scattered across the parametersG, is_fixed_ori, patch_info, by Eric LarsonDeprecate
method='extended-infomax'inmne.preprocessing.ICA; Extended Infomax can now be computed withmethod='infomax'andfit_params=dict(extended=True)by Clemens BrunnerFix support for supplying
extrapolateviaica.plot_properties(..., topomap_args=dict(extrapolate=...))by Sebastian CastanoThe peak finder that was formerly accessible via
from mne.preprocessing.peak_finder import peak_findershould now be imported directly from the enclosing namespace asfrom mne.preprocessing import peak_finderby Eric LarsonDeprecate
mne.realtimemodule to make a standalone modulemne-realtimethat will live outside of this package by Teon Brooks