Skip to content
Cedric Cannard edited this page Oct 28, 2025 · 42 revisions

Welcome to the iEEGLAB wiki!

1. Install the iEEGLAB plugin

  1. via the extension manager

[to add after release is made]

  1. via Github download
  1. via Git clone

Navigate to your local eeglab folder (where you installed it) > plugins folder and clone the repo there with:

git clone https://github.com/amisepa/iEEGLAB.git

2. Load the tutorial sEEG dataset

Dataset description: This sEEG dataset is subject 2 from this BIDS dataset: https://nemar.org/dataexplorer/detail?dataset_id=ds004696 See publication here for more detail: https://pmc.ncbi.nlm.nih.gov/articles/PMC10538586/ For tutorial purposes, we:

  • removed the first 369 s of data before the experiment started,
  • adjusted events timestamps accordingly
  • kept only 19 min of experiment data
  • downsampled the .mefd dataset from 2048 to 128 Hz
  • exported it as an EEGLAB .set dataset

Open MATLAB and open EEGLAB by typing eeglab in your MATLAB command window:

eeglab

Navigate to File > Load existing dataset > navigate to eeglab > plugins > iEEGLAB > tutorial > dataset_seeg > select the file named "sub-02_ses-ieeg01_task-ccep_run-01_ieeg.set" > click open

2. Load your 3D electrode coordinates & events from the subject's .tsv files

In EEGLAB, go to the iEEGLAB tab > Load electrode coordinates and events

Loading electrodes coordinates is mandatory, whereas loading events is optional (if events are already contained by EEGLAB dataset depending on how the data were collected, or if the application is continuous like epilepsy or medical monitoring).

Click the "Browse" button and select the tsv file containing the sEEG electrodes spatial 3D (XYZ) coordinates, named "sub-02_ses-ieeg01_electrodes.tsv" > click "Open"

Screenshot 2025-10-21 at 3 51 13 PM Screenshot 2025-10-21 at 3 51 54 PM Screenshot 2025-10-21 at 3 52 33 PM

Launch these GUI via one command line: EEG = ieeglab_load(EEG);

iEEGLAB then automatically loads the selected electrode coordinates and events from the two .tsv files, matching them with the iEEG data, runs checks, etc.

  1. Visualize iEEG electrodes in a 3D glass brain space. If you have a Pial Surface file from Freesurfer (generated from participant's MRI), iEEGLAB automatically searches for it in the participant's folder.
gui_visualize_electrodes

Via command line: ieeglab_vis_elec(EEG);

  • eCoG dataset
Screenshot 2025-10-21 at 3 57 09 PM
eCoG_glassbrain_pial.mp4
  • sEEG dataset
sEEG_glassbrain_pial
sEEG_glassbrain_pial.mp4

If the participant's pial surface file is not available, it falls back to dipfit's standard_BEM (smooth) template. This is of course much less accurate as it does not account for individual differences in brain/head size, shape, etc.

  • eCoG dataset
eCoG_glassbrain_nopial.mp4
  • sEEG dataset
sEEG_glassbrain_nopial
sEEG_glassbrain_nopial.mp4
  1. Visualize raw time series and events (sEEG CCEP dataset)
gui_visualize_time-series_and_events

Usual EEGLAB command line: pop_eegplot(EEG,1,1,1);

5. Run within-subject statistics

Clone this wiki locally