Home - jasonnan2/Automated-Analysis-of-EEG GitHub Wiki

Automated-Analysis-of-EEG

This package automatically analyzes complex ERP and source localized EEG experiment structures off minimally processed time series data. Integration after epoching with EEGLAB. Source localized EEG is calculated with dsi.

Two scripts to do it all

Scalp Topoplot
Scalp Topoplot
Overlaid ERP Grouped Bar Plots
ERP Bar Plot
Brain Map Network Differences
Alt Text Alt Text
Network Connectivity
Alt Text

Install

  1. Download
  2. Uncompress
  3. Place in active MATLAB directory or add to MATLAB path.
  4. Follow the template in makeSampleData.m to format data. Sample Data is also provided.
  5. Follow runERP.m for scalp EEG pipeline.
  6. Follow runERSP.m to generate ERSP plots.
  7. Follow runSource.m for source localized EEG pipeline.

Your input should follow a specific structure using a MATLAB struct called project. Below is a guide to each required field and how to populate it. Sample Script

To run an analysis, you must define a few required parameters, including time windows of interest (timeRange) and the baseline period (baselineTime). Additional optional settings can be customized through the cfg struct to control how the analyses are run and plotted.

This page outlines the standard analysis workflow using the ScalpObject class to process, analyze, and visualize scalp-level EEG data. Reference script is runERP.m.

This section outlines the standard analysis workflow using the SourceObject class to process, analyze, and visualize source localized EEG data. Reference script is runSource.m

Package Structure

📁/samplePlots - Sample data and plots generated with this package. Output of runERP.m and runSource.m

📂/scripts - Contains all the code

  • 📁DataAnalysis/ - Contains class object code and dependent functions.

  • 📁main/ - Contains scripts to run different analysis.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

📖 Citation

If you use this work, please cite:

Nan, J., et al. (2025). Climate trauma from wildfire exposure impacts cognitive decision-making. Nature Scientific Reports.
https://doi.org/10.1038/s41598-025-94672-0

BibTeX
@article{nan2025,
  author    = {Nan, Jason et. al},
  title     = {Climate trauma from wildfire exposure impacts cognitive decision-making},
  journal   = {Nature Scientific Reports},
  year      = {2025},
  volume    = {},
  number    = {},
  pages     = {},
  doi       = {10.1038/s41598-025-94672-0}
}


⚠️ **GitHub.com Fallback** ⚠️