Frequency-following response (FFR) analysis code for the EAM1 project
Motor signals modulate cortical but not subcortical processing of self-initiated sounds Laura Raiff, Gabrielle Butler, Kailyn McFarlane, Bharath Chandrasekaran, Kevin R. Sitek bioRxiv 2026.07.10.737812; doi: https://doi.org/10.64898/2026.07.10.737812
Availble in BIDS format: https://openneuro.org/datasets/ds008161
- Extract precise sound onset timing from the EEG ergo channel: get_event_onsets_stimtrack.ipynb
- Convert the EEG data to the Brain Imaging Data Structure (EEG-BIDS): bids-conversion.ipynb
- Preprocess and analyze the FFRs: ffr_preprocessing_analysis.ipynb, onset_latency_ffr.py, and onset_latency_analysis.py
- Preprocess and analyze the cortical ERPs: erp_preprocessing_analysis.ipynb
- Analyse the phase consistency of the FFRs and cortical ERPs plot_phase_consistency.ipynb
Before running any of the notebooks, please set up the following gitconfig filter to avoid metadata clutter:
- install required packages:
pip install -r requirements.txt - Make sure nbconvert is installed globally (
pip install nbconvertorconda install nbconvert) - Windows: in a bash terminal, run:
bash setup-git-jupyter-filters.sh - Mac: run
chmod +x setup-git-jupyter-filters.shthen./setup-git-jupyter-filters.sh