Station 2 · Lesson 4

BIDS & OpenNeuro data

Recommended15 minBefore this lesson: Importing raw files: EDF, BDF & BrainVision, EventsPrint the card
Starts from: sub-002_task-FaceRecognition_eeg.set (D4) · Nothing yet: the data as downloaded.Download the data (opens in a new tab)
Script to reach this state
MATLAB
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
% Folder for the BIDS dataset (change it)
bidsFolder = 'C:\Users\me\Documents\eeg-course\ds002718';
baseUrl = 'https://s3.amazonaws.com/openneuro.org/ds002718/';
files = {'dataset_description.json', 'README', 'task-FaceRecognition_events.json', ...
    'sub-002/eeg/sub-002_task-FaceRecognition_eeg.set', ...
    'sub-002/eeg/sub-002_task-FaceRecognition_eeg.json', ...
    'sub-002/eeg/sub-002_task-FaceRecognition_channels.tsv', ...
    'sub-002/eeg/sub-002_task-FaceRecognition_electrodes.tsv', ...
    'sub-002/eeg/sub-002_task-FaceRecognition_events.tsv'};
for iFile = 1:numel(files)
    target = fullfile(bidsFolder, files{iFile});
    if ~exist(fileparts(target), 'dir'), mkdir(fileparts(target)); end
    websave(target, [baseUrl files{iFile}]);
end

The idea in brief

Every lab names and arranges its files in its own way. BIDSA standard for naming and organizing neuroimaging data files. (Brain Imaging Data Structure) is a shared standard: fixed folder names, fixed file names, and side files that describe the recording. A datasetOne EEG data file loaded in EEGLAB together with its information. in BIDS can be read by any tool that knows the standard, without asking the lab how it saved its data.

Before and after

Folder tree of ds002718: at the root dataset_description.json, README and task-FaceRecognition_events.json; then sub-002, then eeg with five files: the .set signal of about 235 MB, eeg.json with recording details, channels.tsv with 74 channel names, electrodes.tsv with electrode positions and events.tsv with 1479 events.

Your next questions, each answered in its own section:

Why do I need this step?

The reasons in detail, and the terms you need

OpenNeuro is a free site that hosts hundreds of public datasets in BIDS. For an EEGLAB user, BIDS saves two steps that you did by hand in this station: the events and the channelThe signal recorded from one electrode, as shown in EEGLAB. locations come ready in their own files.

We use dataset ds002718 (Wakeman and Henson): participants viewed famous, unfamiliar and scrambled faces. The whole dataset is about 4 GB, so we download one participantThe person whose data were recorded in the study. only, sub-002, about 235 MB.

How do I do it in EEGLAB?

9 steps in the menus

1. Download one participant

  1. Open the dataset page: ds002718 on OpenNeuro.
  2. In the file list, download these files, and keep the same folder structure on your computer, in a folder named ds002718:
    • At the top level: dataset_description.json, README and task-FaceRecognition_events.json.
    • In sub-002/eeg/: the five files that start with sub-002_task-FaceRecognition_.
  3. You do not need the anat folder (the MRI) for this lesson.

The scriptA MATLAB file of commands that runs processing steps in order. in the starting point box does the same download in one go.

2. Look at the side files

Open sub-002_task-FaceRecognition_events.tsv in any text editor or spreadsheet. Each line is an eventA marker in the recording that flags a moment of interest, such as a stimulus., with columns such as onset (in seconds), trial_type (for example famous_new or right_sym) and value (a number code).

Open sub-002_task-FaceRecognition_channels.tsv. The channel names are EEG001 to EEG074, not 10-10 names. This matters in the next step.

3. Import the participant

  1. Open File then Import data then Using EEGLAB functions and plugins then From BIDS folder structure. (The same command is in File then BIDS tools then Import BIDS folder to STUDY.)
  2. Choose your ds002718 folder and click Select Folder (on macOS: Open). The window Import BIDS data — pop_importbids() opens.
  3. Keep Use BIDS electrode.tsv files (when present) for channel locations; off: look up locations using channel labels ticked. The names EEG001 and so on are not standard, so a lookup by name would find nothing.
  4. Keep Use BIDS event.tsv files for events and use the following BIDS field for event type ticked, and in the list under it choose trial_type instead of value.
  5. Study output folder shows a path that ends with ds002718/derivatives/eeglab. Keep it. EEGLAB writes its own files there and does not touch the downloaded files.
  6. Click OK. The import takes a minute or two.

In EEGLAB 2026.1, this command always creates a STUDYAn EEGLAB structure that groups many participants' datasets for joint analysis., even for one participant. The main window shows the STUDY, and the Datasets menuA list of commands that opens from its name at the top of the window. lists dataset 1. Choose it from the Datasets menu to see its details: 74 channels, 250 Hz and 1479 events. You will learn about STUDY in station 8.

How do I write it as code?

The same steps in 16 lines of MATLAB
MATLAB
% Start EEGLAB (EEG-BIDS ships with EEGLAB 2026.1)
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;

% Folder where you downloaded ds002718 with sub-002 (change it)
bidsFolder = 'C:\Users\me\Documents\eeg-course\ds002718';

% Import: events from the trial_type column, positions from electrodes.tsv
[STUDY, ALLEEG] = pop_importbids(bidsFolder, ...
    'eventtype', 'trial_type', 'bidsevent', 'on', 'bidschanloc', 'on', ...
    'outputdir', fullfile(bidsFolder, 'derivatives', 'eeglab'));

% Make the imported dataset the current one and show it
CURRENTSTUDY = 1; EEG = ALLEEG; CURRENTSET = 1:numel(EEG);
eeglab redraw;

% Check what arrived
EEG(1).nbchan                % 74
EEG(1).srate                 % 250
numel(EEG(1).event)          % 1479
eeg_eventtypes(EEG(1))       % right_sym 500, famous_new 150, ...
  • 'eventtype', 'trial_type' is the same choice as the list in the window. Without it, EEGLAB uses the value column, and the event types become numbers such as 13 and 4096.
  • The imported file is written to derivatives/eeglab/sub-002/eeg/, and the STUDY file to derivatives/eeglab/ds002718.study. The file takes its name from the BIDS folder; the STUDY itself has no name (STUDY.name is empty) unless you give it one.

Which value should I choose?

Suitable values for your analysis goal
OptionOur choiceWhy
event typeThe name or code that identifies what kind of event it is. columntrial_typeReadable names (famous_new, scrambled_new, right_sym). The value column has number codes only.
Use BIDS electrodeThe physical sensor placed on the scalp to pick up the signal..tsv filestickedThe channel names EEG001… are not standard, so positions must come from the file. Untick it only when the names are standard and there is no electrodes file.
Study output folderderivatives/eeglab (default)BIDS keeps processed files in derivatives, away from the raw data.
Import only the following participant indicesuntickedWe downloaded one participant only. In a full dataset, use it to import a few participants first.

How do I check it worked?

4 quick checks
  1. The Datasets menu lists dataset 1, and choosing it shows 74 channels, 250 Hz and 1479 events.
  2. eeg_eventtypes(EEG(1)) lists names such as right_sym, famous_new and boundary, not numbers.
  3. The Channel locations line shows Yes, and Plot then Channel locations then By name shows the electrodes on the head. You also see points for the eye and heart channels, because the file gives them positions too.
  4. The folder ds002718/derivatives/eeglab/sub-002/eeg/ has the imported .set file.

That is all for BIDS. Close the STUDY with File then Clear study / Clear all before the next lesson. From the next station we work on eeglab_data.set, which ships with EEGLAB, because it is small and matches the documentation.

About the data

Data: Wakeman, D. G., & Henson, R. N. (2015). A multi-subject, multi-modal human neuroimaging dataset. Scientific Data, 2, 150001. https://doi.org/10.1038/sdata.2015.1. EEGLAB version on OpenNeuro: ds002718 v1.0.5, DOI 10.18112/openneuro.ds002718.v1.0.5. License: CC0.

What mistakes do people make?

5 mistakes and how to avoid them
  • Pointing EEGLAB at the sub-002 or eeg folder. Choose the dataset’s top folder, the one that holds dataset_description.json.
  • Downloading the .set file only. Without events.tsv and electrodes.tsv, the side files that make BIDS useful are missing. Keep the folder structure as on OpenNeuro.
  • Event types appear as numbers. You kept value in the event column list. Import again and choose trial_type.
  • Unticking the electrode.tsv option. The lookup by name finds no position for EEG001, and the channels have no locations.
  • Looking for 70 channels. The recording has 70 EEGA recording of the brain's electrical activity from electrodes on the scalp. channels plus HEOG, VEOG and two EKG channels, so EEG.nbchan is 74.

How do I write it in my paper?

A Methods template: edit the data, settings and versions to match what you ran

A template: edit the data, settings and versions to match what you ran.

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.

Where can I read more?

4 sources, official docs first

Written for EEGLAB 2026.1 · 2026-10-28

Need help?

Ask, share feedback, or report an error