The examples gallery provides working code samples demonstrating various analysis and visualization techniques. These examples often lack the narrative explanations seen in the tutorials, and do not follow any specific order. These examples are a useful way to discover new analysis or plotting ideas, or to see how a particular technique you’ve read about can be applied using MNE-Python.
If example-scripts contain plots and are run locally, using the
interactive interactive flag with
python -i tutorial_script.py
keeps them open.
These examples sometimes use simulations or shortcuts (such as intentionally adding noise to recordings) to illustrate a point. Use caution when copy-pasting code samples.
Recipes for reading and writing files. See also our tutorials on reading data from various recording systems and our tutorial on manipulating MNE-Python data structures.
Tools to generate simulation data.
Examples related to data preprocessing (artifact detection / rejection etc.)
Looking at data and processing output.
Some examples of how to explore time-frequency content of M/EEG data with MNE.
Some examples of how to compute statistics on M/EEG data with MNE.
Machine Learning (Decoding, Encoding, and MVPA)#
Decoding, encoding, and general machine learning examples.
Connectivity Analysis Examples#
Examples demonstrating connectivity analysis in sensor and source space.
From BEM segmentation, coregistration, setting up source spaces to actual computation of forward solution.
Inverse problem and source analysis#
Estimate source activations, extract activations in labels, morph data between subjects etc.
Examples on open datasets#
Some demos on common/public datasets using MNE.