wenhui0206 / NeuroGPT

Code for the paper "Neuro-GPT: Towards a Foundation Model for EEG"
GNU General Public License v3.0
80 stars 16 forks source link

Prerpocessing script for off-the-shelf reproduction #4

Closed HireTheHero closed 3 months ago

HireTheHero commented 3 months ago

Thanks for your insightful work. I believe you did your prerpocessing in MatLab-Brainstorm environment. To achieve off-the-shelf reproduction, I'm writing the conterpart preprocessing script. What do you think of adding it to your repo?

We preprocessed the TUH EEG dataset using the Brainstorm software [15] in MATLAB (Mathworks, Inc.).
Based on the channel labels, we selected 22 channels corresponding to the extended international 10-20 system (Fp1, Fp2, F7, F3, Fz, F4, F8, T1, T3, C3, Cz, C4, T4, T2, T5, P3, Pz, P4, T6, O1, Oz, O2).
Channels with zero or missing signals throughout the recording sessions were marked as bad channels.
The signals of the bad channels were interpolated by a weighted average of all neighboring channels with a maximal distance of 5cm between neighbors.
EEG recordings were re-referenced to the average of 22 channels.
We removed power line noise (60 Hz) using a notch filter and bandpass-filtered the data (0.5-100 Hz).
All recordings were re-sampled to 250 Hz.
We performed a DC offset correction and removed linear trends from the data.
A z-transform was applied along the time dimension within each recording to normalize the data.