Workshop

In this hands-on session we will describe the philosophy, architecture and functionalities of NeuroPycon and provide illustrative examples through interactive notebooks.

We will show how to use NeuroPycon pipeline to analyze MEG data (FACE dataset) with a focus on automatic artifact removal by ICA and and source reconstruction.

In the past edition of CuttingEEG we showed how to use NeuroPycon pipeline to analyze EEG data (ERP CORE dataset) with a focus on automatic artifact removal by ICA and and ERP components computation.

Basic knowledge of (or a keen interest in) Python is required. Furthermore, we suggest the following lectures:

Installation

We recommend to install neuropycon and the related software (MNE-python, Freesurfer) before the workshop.

First, we recommend to install MNE python by following the MNE python installation instructions. The last version of MNE-python relies on python 3.10.

Alternativaly, you can create an enviroment by Anaconda or Mamba and install the packages contained in requirements file, e.g.

$ conda create -n practicalmeeg python=3.10
$ pip install -r requirements.txt
$ pip install jupyter

Install ephypype

To install ephypype package, you can use the Pypi version

$ pip install ephypype

or alternatively, you can download from github the last version and install it:

$ git clone https://github.com/neuropycon/ephypype.git
$ cd ephypype
$ python setup.py develop

Sample data

During the workshop we use some sample datasets that will be shared on zenodo

Freesurfer

  1. Download Freesurfer software:

https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall

  1. Follow the Installation instructions

https://surfer.nmr.mgh.harvard.edu/fswiki/LinuxInstall

Notebooks

FACE dataset

These examples demonstrate how to process 1 participant of the FACE dataset from Wakeman and Henson (2015). The data consist of simultaneous MEG/EEG recordings from 19 healthy participants performing a visual recognition task. Subjects were presented images of famous, unfamiliar and scrambled faces. Each subject participated in 6 runs, each 7.5 min in duration.

Here, we focus only on MEG data and use create_pipeline_preproc_meeg() to preprocess the MEG raw data and create_pipeline_source_reconstruction() to perform source reconstruction of time-locked event-related fields.

01. Freesurfer anatomical pipeline

01. Freesurfer anatomical pipeline

01. Freesurfer anatomical pipeline
02. Preprocess MEG data

02. Preprocess MEG data

02. Preprocess MEG data
03. Compute inverse solution

03. Compute inverse solution

03. Compute inverse solution
04. Plot contrast

04. Plot contrast

04. Plot contrast
04. Preprocess MEG data and compute inverse solution

04. Preprocess MEG data and compute inverse solution

04. Preprocess MEG data and compute inverse solution

ERP CORE dataset

These examples demonstrate how to process 1 participant from the ERP CORE dataset. It shows how to obtain N170 component from a face perception task by NeuroPycon pipelines.

02. Compute ERP

02. Compute ERP

02. Compute ERP
01. Preprocess EEG data

01. Preprocess EEG data

01. Preprocess EEG data

Gallery generated by Sphinx-Gallery