Code Monkey home page Code Monkey logo

gamma-entrainment's Introduction

Overview

In this repository we provide all the implemented codes and materials used for investigating several temporal/spatial synchronization features as well as cross-frequency coupling effects in the brain oscillatory activity recorded through electroencephalography (EEG). The EEG data are included in the Auditory data, Rest data, and Multisensory data folders.

To see data specifications please see Auditory Gamma Entrainment and Multisensory Gamma Entrainment for more information on how the data are acquired and what each dataset contains.

The attached MATLAB scripts are the codes that were used to generate the plots and produce the analytical results discussed in the article Gamma Entrainment Improves Synchronization Deficits Caused by Dementia authored by M. Lahijanian, H. Aghajan, Z. Vahabi, and A. Afzal. The preprint version of the article is accessible through https://doi.org/10.1101/2021.09.30.462389.

Requirements

For running the scripts, you only need MATLAB. In addition, for producing the connectivity graphs as in Fig. 4b of the referenced article, we recommend using BrainNet Viewer.

Instructions

There are two main scripts: pre.m and main.m in the Code folder. Initial parameters are set at the beginning of each script. First, to define epochs in the data and perform preprocessing steps, run pre.m for different window lengths (change W to the desired window length). This will prepare the data for the following analyses and the result should be saved in the Partitioned data folder (you need to make Partitioned data folder in the main repository). Then to generate the epoched data try running pre.m for window lengths of 1, 20, and 40 seconds since these values are used later in the analyses. Pay attention to the commented notes as you need to comment/uncomment some lines of the script for W = 40.

Then, for generating the results go through main.m and you can see the script is pretty segmented to different parts and each part is related to each result discussed in the paper. Try to run each segment one after another. At the beginning of each segment, the epoched data is loaded and some parameters are set to desired values. Then, the segment will end by generating figures as depicted in the paper. To regenerate all the sub-figures you may need to change some parameters and comment/uncomment some lines of the script. Pay attention to the commented notes.

Note that running cross frequency coupling analyses in Theta-Gamma Coupling and Audio + Visual Entrainment segments may take a considerable amount of time and demands extensive CPU and memory capacity to generate the coupling features from the epoched data. To avoid running this part, you can used the pre-calculated values of these features which are enclosed in the Code folder. This allows you to skip running the calculation parts and directly go to the visualization segments.

Citation

In the case of using the data in this repository, pleas cite https://doi.org/10.1101/2021.09.30.462389.

References

Some pre-existed scripts and functions have been used in different parts of main.m which are referenced below:

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.