EEG and MEG Analysis with MNE

EEG and MEG Analysis with MNE

An introduction to analyzing EEG and MEG data with the MNE-Python package


EEG and MEG Analysis with MNE
Authors
Dr. Ole Bialas | Dr. Thomas S. Binns

This course provides an introduction to EEG and MEG data analysis with Python and the MNE library.

In the first part of the course, you’ll learn how to go from raw EEG and MEG recordings to event-related responses and how to compare those responses between different experimental conditions using statistical tests.

You’ll then learn how to use spatial and temporal filters to extract different sources and frequencies from the recorded signals and to decompose them into multiple frequency bands. The latter will allow you to perform time-frequency analysis and apply phase-based connectivity measures to estimate how the EEG’s frequency content changes across time and how individual sensors are related.

The last part focuses on linear modeling of neural responses. You’ll learn how to use linear regression and regularization and how to introduce time-lags for capturing relationships that are not instantaneous (like the neural responses to stimuli). Finally, you’ll see how these models can be applied to model the EEG responses to continuous naturalistic speech.

Throughout the course you’ll use simulations to test the different methods of analysis against a known ground truth as well as real EEG and MEG data. While the course focuses on the MNE-Python package it places great emphasis on the underlying methods, most of which will translate to other neuroscience modalities.

Credits

Dr. Ole Bialas
Dr. Thomas S. Binns

Installation

To run the course materials on your own machine:

  1. Install VSCode as your editor
  2. Install pixi or alternatively conda to create virtual Python environments (see the lessons on environment and package management)
  3. Download the materials for a lesson using the "Download Materials" button
  4. Extract the zip file and open the notebook in VSCode
  5. In VSCode, open a new terminal and install the environment:
pixi install
conda env create -f environment.yml
conda activate mne

Course Contents

From Raw EEG and MEG to Event-Related Potentials and Fields

Temporal and Spatial Filters

Time-Frequency and Phase-Based Connectivity Analysis

Linear Modeling of Neural Response