Simply EEGLAB

BIDS & OpenNeuro data

Station 2 · Lesson 4 · EEGLAB 2026.1

In the GUI

  1. FileImport dataUsing EEGLAB functions and pluginsFrom BIDS folder structureFileBIDS toolsImport BIDS folder to STUDY
  2. Select FolderOpenImport BIDS data -- pop_importbids() ds002718
  3. Use BIDS electrode.tsv files (when present) for channel locations; off: look up locations using channel labels EEG001
  4. Use BIDS event.tsv files for events and use the following BIDS field for event type trial_typevalue
  5. Study output folder ds002718/derivatives/eeglab
  6. OK

Script

[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
bidsFolder = 'C:\Users\me\Documents\eeg-course\ds002718';
[STUDY, ALLEEG] = pop_importbids(bidsFolder, ...
    'eventtype', 'trial_type', 'bidsevent', 'on', 'bidschanloc', 'on', ...
    'outputdir', fullfile(bidsFolder, 'derivatives', 'eeglab'));
CURRENTSTUDY = 1; EEG = ALLEEG; CURRENTSET = 1:numel(EEG);
eeglab redraw;
EEG(1).nbchan                % 74
EEG(1).srate                 % 250
numel(EEG(1).event)          % 1479
eeg_eventtypes(EEG(1))       % right_sym 500, famous_new 150, ...

Which value should I choose?

OptionOur choice
Event type columntrial_type
Use BIDS electrode.tsv filesticked
Study output folderderivatives/eeglab (default)
Import only the following participant indicesunticked

Check

  • The Datasets menu lists dataset 1, and choosing it shows 74 channels, 250 Hz and 1479 events
  • eeg_eventtypes(EEG(1)) lists names such as right_sym, famous_new and boundary, not numbers
  • The Channel locations line shows Yes, and Plot > Channel locations > By name shows the electrodes on the head
  • The folder ds002718/derivatives/eeglab/sub-002/eeg/ has the imported .set file

For your Methods

EEG data in BIDS format (OpenNeuro ds002718, participant sub-002) were imported with pop_importbids (EEG-BIDS plugin 10.5, EEGLAB 2026.1), using the trial_type column for event types and electrode positions from electrodes.tsv.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/bids-openneuro/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.