:orphan: 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 (:ref:`sphx_glr_auto_workshop_01_meg`) 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 (:ref:`sphx_glr_auto_workshop_02_eeg`) 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: * |Gorgolewski| et al. (2011) Front. Neuroinform. 5:13 * |Gramfort| et al. (2013), Front. Neurosci. 7:267 * |Meunier_Pascarella| et al. (2020), Neuroimage .. |CuttingEEG| raw:: html CuttingEEG .. |Gorgolewski| raw:: html Gorgolewski .. |Gramfort| raw:: html Gramfort .. |Meunier_Pascarella| raw:: html Meunier, Pascarella 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 |installation instructions|. The last version of MNE-python relies on python 3.10. .. |installation instructions| raw:: html MNE python installation instructions Alternativaly, you can create an enviroment by Anaconda or Mamba and install the packages contained in :download:`requirements ` file, e.g. .. code-block:: bash $ conda create -n practicalmeeg python=3.10 $ pip install -r requirements.txt $ pip install jupyter Install ephypype ^^^^^^^^^^^^^^^^ .. comment To install ephypype package, you can use the Pypi version .. code-block:: bash $ pip install ephypype==0.3.dev0 To install ephypype package, you can use the Pypi version .. code-block:: bash $ pip install ephypype or alternatively, you can download from |github| the last version and install it: .. code-block:: bash $ git clone https://github.com/neuropycon/ephypype.git $ cd ephypype $ python setup.py develop .. |github| raw:: html github Sample data ----------- During the workshop we use some sample datasets that will be shared on |zenodo| .. |zenodo| raw:: html zenodo Freesurfer ^^^^^^^^^^ 1. Download Freesurfer software: https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall 2. Follow the Installation instructions https://surfer.nmr.mgh.harvard.edu/fswiki/LinuxInstall Notebooks --------- .. contents:: Contents :local: :depth: 3 .. raw:: html
.. raw:: html
FACE dataset ^^^^^^^^^^^^ These examples demonstrate how to process 1 participant of the |FACE| dataset from |Wakeman_Henson|. 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. .. |FACE| raw:: html FACE .. |Wakeman_Henson| raw:: html Wakeman and Henson (2015) Here, we focus only on MEG data and use :func:`~ephypype.pipelines.create_pipeline_preproc_meeg` to preprocess the MEG raw data and :func:`~ephypype.pipelines.create_pipeline_source_reconstruction` to perform source reconstruction of time-locked event-related fields. .. raw:: html
.. raw:: html
.. only:: html .. image:: /auto_workshop/01_meg/images/thumb/sphx_glr_01-run-smri_reconall_thumb.png :alt: 01. Freesurfer anatomical pipeline :ref:`sphx_glr_auto_workshop_01_meg_01-run-smri_reconall.py` .. raw:: html
01. Freesurfer anatomical pipeline
.. raw:: html
.. only:: html .. image:: /auto_workshop/01_meg/images/thumb/sphx_glr_plot_01_meg_preprocessing_thumb.png :alt: 02. Preprocess MEG data :ref:`sphx_glr_auto_workshop_01_meg_plot_01_meg_preprocessing.py` .. raw:: html
02. Preprocess MEG data
.. raw:: html
.. only:: html .. image:: /auto_workshop/01_meg/images/thumb/sphx_glr_plot_02_events_inverse_stc_thumb.png :alt: 03. Compute inverse solution :ref:`sphx_glr_auto_workshop_01_meg_plot_02_events_inverse_stc.py` .. raw:: html
03. Compute inverse solution
.. raw:: html
.. only:: html .. image:: /auto_workshop/01_meg/images/thumb/sphx_glr_plot_03_stc_thumb.png :alt: 04. Plot contrast :ref:`sphx_glr_auto_workshop_01_meg_plot_03_stc.py` .. raw:: html
04. Plot contrast
.. raw:: html
.. only:: html .. image:: /auto_workshop/01_meg/images/thumb/sphx_glr_plot_04-preprocessing_inverse_thumb.png :alt: 04. Preprocess MEG data and compute inverse solution :ref:`sphx_glr_auto_workshop_01_meg_plot_04-preprocessing_inverse.py` .. raw:: html
04. Preprocess MEG data and compute inverse solution
.. raw:: html
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. .. |ERP_CORE| raw:: html ERP CORE .. |NeuroPycon| raw:: html NeuroPycon .. raw:: html
.. raw:: html
.. only:: html .. image:: /auto_workshop/02_eeg/images/thumb/sphx_glr_plot_ERP_thumb.png :alt: 02. Compute ERP :ref:`sphx_glr_auto_workshop_02_eeg_plot_ERP.py` .. raw:: html
02. Compute ERP
.. raw:: html
.. only:: html .. image:: /auto_workshop/02_eeg/images/thumb/sphx_glr_plot_eeg_preprocessing_thumb.png :alt: 01. Preprocess EEG data :ref:`sphx_glr_auto_workshop_02_eeg_plot_eeg_preprocessing.py` .. raw:: html
01. Preprocess EEG data
.. raw:: html
.. toctree:: :hidden: :includehidden: /auto_workshop/01_meg/index.rst /auto_workshop/02_eeg/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: auto_workshop_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: auto_workshop_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_