Cortex EEG Analysis Tool
Cortex estimates the aperiodic (1/f) exponent of resting-state EEG power spectra and places the recording in a pre-computed neurological disease landscape using UMAP. The tool is designed for researchers who want a quick, reproducible summary of spectral slope as a potential biomarker.
For research use only — not a clinical diagnosis tool.
Spectral Parameterization (specparam v2)
Aperiodic exponent extraction uses the specparam v2 library (formerly FOOOF; Donoghue et al., 2020).
Fitting parameters
- Frequency range (default)
- 1–20 Hz
- Aperiodic mode
- fixed
- Peak width limits
- 0.5–12.0 Hz
- Min peak height
- 0.05
- Max peaks
- 6
Quality gates
- High quality
- R² ≥ 0.90
- Acceptable
- R² ≥ 0.70
- Low quality
- R² < 0.70
PSD is computed via Welch method (2-second windows) and averaged across channels after outlier rejection (>10× median channel power). specparam receives linear power input.
UMAP Embedding
Reference recordings are embedded using UMAP (McInnes et al., 2018). New recordings are placed via umap.transform() without re-fitting the reference embedding.
Distance scoring uses aperiodic exponent alone (not UMAP Euclidean position), expressed in standard deviations from each population mean.
Reference Populations
2,051 recordings total. Populations below contribute to reference distance scoring.
| Population | n | Source dataset | DOI | Fit range |
|---|---|---|---|---|
| ALS | 96 | bigP3BCI — Mainsah et al. (PhysioNet) | 10.13026/0byy-ry86 | 1–20 Hz |
| HC (bigP3BCI) | 36 | bigP3BCI — Mainsah et al. (PhysioNet) | 10.13026/0byy-ry86 | 1–20 Hz |
| PD | 15 | BrainLat — Prado et al. (Synapse) | 10.1038/s41597-023-02806-8 | 1–20 Hz |
| HC (BrainLat) | 28 | BrainLat — Prado et al. (Synapse) | 10.1038/s41597-023-02806-8 | 1–20 Hz |
| AD | 35 | BrainLat — Prado et al. (Synapse) | 10.1038/s41597-023-02806-8 | 1–20 Hz |
| bvFTD | 17 | BrainLat — Prado et al. (Synapse) | 10.1038/s41597-023-02806-8 | 1–20 Hz |
| MDD | 51 | Mumtaz W (figshare) | 10.6084/m9.figshare.4244171 | 1–20 Hz |
| SZ | 14 | Olejarczyk & Jernajczyk (RepOD) | 10.18150/repod.0107441 | 1–20 Hz |
Visual Reference Only
These populations appear in the UMAP scatter but are excluded from distance scoring (incompatible absolute PSD scale or insufficient offset data for calibration).
| Population | n | Source dataset | DOI | Fit range |
|---|---|---|---|---|
| HC (Dortmund) | 742 | Dortmund EEG corpus (internal) | N/A — internal dataset | 1–20 Hz |
| HC (BI2013a) | 72 | Brain Invaders 2013a — Vaineau et al. | 10.5281/zenodo.2669187 | 1–20 Hz |
| FTD (OpenNeuro) | 23 | OpenNeuro ds004504 — Miltiadous et al. | 10.18112/openneuro.ds004504.v1.0.9 | 1–20 Hz |
| AD (OpenNeuro) | 36 | OpenNeuro ds004504 — Miltiadous et al. | 10.18112/openneuro.ds004504.v1.0.9 | 1–20 Hz |
| HC (OpenNeuro ds004504) | 29 | OpenNeuro ds004504 — Miltiadous et al. | 10.18112/openneuro.ds004504.v1.0.9 | 1–20 Hz |
| PD (OpenNeuro) | 12 | OpenNeuro ds003490 — Cavanagh JF | 10.18112/openneuro.ds003490.v1.1.0 | 1–20 Hz |
| HC (OpenNeuro ds003490) | 23 | OpenNeuro ds003490 — Cavanagh JF | 10.18112/openneuro.ds003490.v1.1.0 | 1–20 Hz |
| HC (HUSM) | 56 | Mumtaz W (figshare) | 10.6084/m9.figshare.4244171 | 1–20 Hz |
| HC (Olejarczyk) | 14 | Olejarczyk & Jernajczyk (RepOD) | 10.18150/repod.0107441 | 1–20 Hz |
| PD (ds004584) | 91 | OpenNeuro ds004584 — Singh et al. | 10.18112/openneuro.ds004584.v1.0.0 | 1–20 Hz |
| HC (ds004584) | 44 | OpenNeuro ds004584 — Singh et al. | 10.18112/openneuro.ds004584.v1.0.0 | 1–20 Hz |
| PD (ds007526) | 115 | OpenNeuro ds007526 — Katzir et al. | 10.18112/openneuro.ds007526.v1.0.2 | 1–20 Hz |
| HC (ds007526) | 28 | OpenNeuro ds007526 — Katzir et al. | 10.18112/openneuro.ds007526.v1.0.2 | 1–20 Hz |
| MDD (ds003478) | 44 | OpenNeuro ds003478 — Cavanagh JF | 10.18112/openneuro.ds003478.v1.1.0 | 1–20 Hz |
| HC (ds003478) | 196 | OpenNeuro ds003478 — Cavanagh JF | 10.18112/openneuro.ds003478.v1.1.0 | 1–20 Hz |
| PD (ds007020) | 92 | OpenNeuro ds007020 — Jamshidi et al. | 10.18112/openneuro.ds007020.v1.0.0 | 1–20 Hz |
| FEP (ds003944) | 50 | OpenNeuro ds003944 — Salisbury et al. | 10.18112/openneuro.ds003944.v1.0.1 | 1–20 Hz |
| HC (ds003944) | 32 | OpenNeuro ds003944 — Salisbury et al. | 10.18112/openneuro.ds003944.v1.0.1 | 1–20 Hz |
| FEP (ds003947) | 30 | OpenNeuro ds003947 — Salisbury et al. | 10.18112/openneuro.ds003947.v1.0.1 | 1–20 Hz |
| HC (ds003947) | 30 | OpenNeuro ds003947 — Salisbury et al. | 10.18112/openneuro.ds003947.v1.0.1 | 1–20 Hz |
Citation
Please also cite the specparam library: Donoghue T, et al. (2020). Parameterizing neural power spectra into periodic and aperiodic components. Nature Neuroscience, 23, 1655–1665. https://doi.org/10.1038/s41593-020-00744-x
Reference Manifest
Download the complete reference population statistics (mean exponent, SD, n per population) as a JSON file for independent verification.
Download reference manifest (JSON)Python SDK
Single-file script — no package installation. Download and import directly.
Quick start
# Install dependency
pip install requests
# Analyze a single file
from cortex_eeg import analyze, analyze_batch, save_csv
result = analyze("sub-01.edf")
print(result["exponent"], result["fit_quality"])
# e.g. 1.23 high
# Analyze 40 files and export CSV
results = analyze_batch([f"sub-{i:02d}.edf" for i in range(1, 41)])
save_csv(results, "study_results.csv")
# Command-line usage
# python3 cortex_eeg.py sub-01.edf sub-02.edf --csv results.csv