These tutorials provide narrative explanations, sample code, and expected output for the most common MNE-Python analysis tasks. The emphasis here is on thorough explanations that get you up to speed quickly, at the expense of covering only a limited number of topics. The sections and tutorials are arranged in a fixed order, so in theory a new user should be able to progress through in order without encountering any cases where background knowledge is assumed and unexplained. More experienced users (i.e., those with significant experience analyzing EEG/MEG signals with different software) can probably skip around to just the topics they need without too much trouble.
If tutorial-scripts contain plots and are run locally, using the
interactive flag with
python -i tutorial_script.py
keeps them open.
These tutorials cover the basic EEG/MEG pipeline for event-related analysis,
mne.Info, events, and
data structures, discuss how sensor locations are handled, and introduce some
of the configuration options available.
Overview of MEG/EEG analysis with MNE-Python
Getting started with mne.Report
Reading data for different recording systems#
These tutorials cover the basics of loading EEG/MEG data into MNE-Python for various recording devices.
Importing data from MEG devices
Importing data from EEG devices
Importing data from fNIRS devices
Working with CTF data: the Brainstorm auditory dataset
Importing Data from Eyetracking devices
Working with continuous data#
These tutorials cover the basics of loading EEG/MEG data into MNE-Python, and
how to query, manipulate, annotate, plot, and export continuous data in the
The Raw data structure: continuous data
Built-in plotting methods for Raw objects
These tutorials cover various preprocessing techniques for continuous data, as well as some diagnostic plotting methods.
Overview of artifact detection
Rejecting bad data spans and breaks
Background information on filtering
Repairing artifacts with regression
Background on projectors and projections
Extracting and visualizing subject head movement
Signal-space separation (SSS) and Maxwell filtering
Preprocessing functional near-infrared spectroscopy (fNIRS) data
Preprocessing optically pumped magnetometer (OPM) MEG data
Working with eye tracker data in MNE-Python
Segmenting continuous data into epochs#
These tutorials cover epoched data, and how it differs from working with continuous data.
The Epochs data structure: discontinuous data
Regression-based baseline correction
Auto-generating Epochs metadata
Exporting Epochs to Pandas DataFrames
Divide continuous data into equally-spaced epochs
Estimating evoked responses#
These tutorials cover estimates of evoked responses (i.e., averages across several repetitions of an experimental condition).
The Evoked data structure: evoked/averaged data
EEG analysis - Event-Related Potentials (ERPs)
These tutorials cover frequency and time-frequency analysis of neural signals.
The Spectrum and EpochsSpectrum classes: frequency-domain data
Frequency and time-frequency sensor analysis
Frequency-tagging: Basic analysis of an SSVEP/vSSR dataset
Forward models and source spaces#
These tutorials cover how the cortical source locations (source spaces) and forward models (AKA leadfield matrices) are defined.
Source alignment and coordinate frames
Using an automated approach to coregistration
Head model and forward computation
EEG forward operator with a template MRI
How MNE uses FreeSurfer’s outputs
Source localization and inverses#
These tutorials cover estimation of cortical activity from sensor recordings.
The SourceEstimate data structure
Source localization with equivalent current dipole (ECD) fit
Source localization with MNE, dSPM, sLORETA, and eLORETA
The role of dipole orientations in distributed source localization
Computing various MNE solutions
Source reconstruction using an LCMV beamformer
Visualize source time courses (stcs)
EEG source localization given electrode locations on an MRI
Brainstorm Elekta phantom dataset tutorial
Brainstorm CTF phantom dataset tutorial
4D Neuroimaging/BTi phantom dataset tutorial
Statistical analysis of sensor data#
These tutorials describe some approaches to statistical analysis of sensor-level data.
Visualising statistical significance thresholds on EEG data
Non-parametric 1 sample cluster statistic on single trial power
Non-parametric between conditions cluster statistic on single trial power
Mass-univariate twoway repeated measures ANOVA on single trial power
Spatiotemporal permutation F-test on full sensor data
Statistical analysis of source estimates#
These tutorials cover within-subject statistical analysis of source estimates.
Permutation t-test on source data with spatio-temporal clustering
2 samples permutation test on source data with spatio-temporal clustering
Repeated measures ANOVA on source data with spatio-temporal clustering
Machine learning models of neural activity#
These tutorials cover some of the machine learning methods available in MNE-Python.
Spectro-temporal receptive field (STRF) estimation on continuous data
These tutorials illustrate some clinical use cases.
mne_gui_addons package supports some clinical use cases:
Locating intracranial electrode contacts
MNE-Python also supports some clinical use cases directly:
Sleep stage classification from polysomnography (PSG) data
These tutorials describe how to populate MNE-Python data structures with arbitrary data, using the array-based constructors and the simulation submodule.
Creating MNE-Python data structures from scratch
Corrupt known signal with point spread