Toolbox for multielectrode electrophysiology analysis (LFP and MUA) designed for experiments comparing baseline vs CNO conditions in control vs experimental (hM3Dq + CNO) animals. The goal is to quantify how chemogenetic activation modulates connectivity dynamics across brain areas using time-, frequency-, and spike-based measures. Used in Sastre et al., 2026, Bertelsen et al., 2023
- Spectrum: spectral decomposition of signal. Supported statistics: band power, modulation of band power cno-baseline, modulation frequency resolved (as a function of frequency)
- Coherence: multielecrode coherence between areas. Supported statistics: coherency across bands, modulation of coherency cno-baseline in bands and frequency resolved.
- Phase Locking Value: phase coherence between areas
- Granger Causality
- Slope of power spectrum
- Band Limited Power analysis (modulation of power spectrum in different bands)
- Spiking rate
- Interspike interval (ISI) analysis of intervals between spikes
- Phase Locking Value of spiking
Ephys-Analyses/
├── Auxiliary/ % auxiliary utilities (I/O, filtering, helpers)
├── Functions/ % core analysis functions
└── Scripts/ % orchestration scripts
|── main_analyses.m % run analyses for each subject
└── main_statistics.m % compute group-level statistics
Step 1 — Prepare data
Store raw data for each subject in its folder.
Fill the experimental table with metadata.
Step 2 — Run per-subject analyses run('Scripts/main_analyses.m')
This creates a structured .mat file per subject, containing:
LFP metrics (PSD, coherence, PLV, BLP, slope)
MUA metrics (rate, ISI, spike–LFP locking)
Metadata (parameters used, channel lists)
Step 3 — Group statistics run('Scripts/main_statistics.m')
The script compare CNO and baseline epochs, in ctrl vs exp groups. Statistics include:
band-limited analyses
frequency resolved analyses with cluster based methods
1A
Script in Bertelsen_etal were used to chunk LFP data for the analyses in Bertelsen et al., 2023.
Firing rates were obtained as the ouput of MUA analysis run with main/ephys_analysis.m.