Code Monkey home page Code Monkey logo

leupin_britz_pnas24's Introduction

Code accompanying Leupin and Britz, PNAS (2024) We here provide the code for preprocessing, epoching, and analysis of EEG data in sensor and source space. EEG data can be made available upon request.

Code organization

Each folder is generally organized with a main, helper and constants script.The base folder contains some helper functions to filter through the data directories.

  • The main scripts contain the code that must be run.
  • The helper scripts contain the helper functions and classes used to run the code.
  • The constant files contain constants that are called in the script.

Preprocessing

Order to run preprocessing

  1. markers/markers_main.py
  2. epochs/epochs_main.py
  3. ICA
  4. evoked/autoreject_main.py
  5. evoked/evoked_MNE_main.py
  6. source/compute_fwd_solution.ipynb
  7. source/source_main.py

Description

  1. markers: analyzes cardiac and respiratory signals and generates markers to classify each stimulus according to the behavioral response and the cardiac / respiratory phase.
  2. epochs: segments the EEG into epochs before artifact rejection and computes ICA solutions.
  3. ICA: jupyter notebook to be applied to each subject to manually select ICA components to be rejected.
  4. evoked:
  • autoreject: used the Autoreject procedure to clean the epoched data after the ICA.
  • evoked_MNE: computes evoked potentials for each condition and each subject.
  1. source:
  • compute_fwd_solution: jupyter notebook to compute the forward solution (requires manual coregistration of electrodes).
  • source_main: applies inverse solution of the forward model to ERPs to compute sources for each condition and each subject.

Analyses

The stats folder contains the code for statistical analyses.

Behavioral

  1. Behavioral_GLM.Rmd: R markdown script to run the General Linear Mixed Models.
  2. Behav_rev.ipynb: jupyter notebook to compute descriptive statistics and code to generate figures.

Sensor space

  1. Sensor_space_stats.ipynb: jupyter notebook that contains all analysis and figure output for the ERP analyses.
  2. Stats_helper contains helper functions used in sensor_space_stats.ipynb.

Source space

  1. Source_statistics.ipynb: jupyter notebook that contains all analysis and figure output for the source space analyses.
  2. Inverse_stats_helper.py contains helper functions used in source_statistics.ipynb.

leupin_britz_pnas24's People

Contributors

vivile42 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.