MNE is a community-driven software package designed for processing electroencephalography (EEG) and magnetoencephalography (MEG) data providing comprehensive tools and workflows for (among other things):

  1. Preprocessing and denoising
  2. Source estimation
  3. Time–frequency analysis
  4. Statistical testing
  5. Estimation of functional connectivity
  6. Applying machine learning algorithms
  7. Visualization of sensor- and source-space data

MNE includes a comprehensive Python package supplemented by tools compiled from C code for the LINUX and Mac OSX operating systems, as well as a MATLAB toolbox.

From raw data to source estimates in about 30 lines of code (Try it by installing it or in an experimental online demo!):

>>> import mne  
>>> raw ='raw.fif', preload=True)  # load data  
>>>['bads'] = ['MEG 2443', 'EEG 053']  # mark bad channels  
>>> raw.filter(l_freq=None, h_freq=40.0)  # low-pass filter data  
>>> # Extract epochs and save them:
>>> picks = mne.pick_types(, meg=True, eeg=True, eog=True,  
>>>                        exclude='bads')  
>>> events = mne.find_events(raw)  
>>> reject = dict(grad=4000e-13, mag=4e-12, eog=150e-6)  
>>> epochs = mne.Epochs(raw, events, event_id=1, tmin=-0.2, tmax=0.5,  
>>>                     proj=True, picks=picks, baseline=(None, 0),  
>>>                     preload=True, reject=reject)  
>>> # Compute evoked response and noise covariance
>>> evoked = epochs.average()  
>>> cov = mne.compute_covariance(epochs, tmax=0)  
>>> evoked.plot()  # plot evoked  
>>> # Compute inverse operator:
>>> fwd_fname = 'sample_audvis−meg−eeg−oct−6−fwd.fif'  
>>> fwd = mne.read_forward_solution(fwd_fname, surf_ori=True)  
>>> inv = mne.minimum_norm.make_inverse_operator(, fwd,  
>>>                                              cov, loose=0.2)  
>>> # Compute inverse solution:
>>> stc = mne.minimum_norm.apply_inverse(evoked, inv, lambda2=1./9.,  
>>>                                      method='dSPM')  
>>> # Morph it to average brain for group study and plot it
>>> stc_avg = mne.morph_data('sample', 'fsaverage', stc, 5, smooth=5)  
>>> stc_avg.plot()  

MNE development is driven by extensive contributions from the community. Direct financial support for the project has been provided by:

  • (US) National Institute of Biomedical Imaging and Bioengineering (NIBIB) grants 5R01EB009048 and P41EB015896 (Center for Functional Neuroimaging Technologies)
  • (US) NSF awards 0958669 and 1042134.
  • (US) NCRR Center for Functional Neuroimaging Technologies P41RR14075-06
  • (US) NIH grants 1R01EB009048-01, R01 EB006385-A101, 1R01 HD40712-A1, 1R01 NS44319-01, and 2R01 NS37462-05
  • (US) Department of Energy Award Number DE-FG02-99ER62764 to The MIND Institute.
  • (FR) IDEX Paris-Saclay, ANR-11-IDEX-0003-02, via the Center for Data Science.
  • (FR) European Research Council (ERC) Starting Grant (ERC-YStG-263584).
  • (FR) French National Research Agency (ANR-14-NEUC-0002-01).
  • (FR) European Research Council (ERC) Starting Grant (ERC-YStG-676943).
  • Amazon Web Services - Research Grant issued to Denis A. Engemann