Station 2 · Lesson 4
BIDS & OpenNeuro data
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
[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}]);
endYour browser's back button takes you to the exact place you were, so open anything you like.
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
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.
Why do I need this step?
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 channel 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 participant only, sub-002, about 235 MB.
How do I do it in EEGLAB?
9 steps in the menus
1. Download one participant
- Open the dataset page: ds002718 on OpenNeuro.
- 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,READMEandtask-FaceRecognition_events.json. - In
sub-002/eeg/: the five files that start withsub-002_task-FaceRecognition_.
- At the top level:
- You do not need the
anatfolder (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
- 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.)
- Choose your
ds002718folder and click Select Folder (on macOS: Open). The window Import BIDS data — pop_importbids() opens. - Keep Use BIDS electrode.tsv files (when present) for channel locations; off: look up locations using channel labels ticked. The names
EEG001and so on are not standard, so a lookup by name would find nothing. - 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_typeinstead ofvalue. - 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. - 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 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 do it in EEGLAB?
1. Download one participant
- Open the dataset page: ds002718 on OpenNeuro.
- 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,READMEandtask-FaceRecognition_events.json. - In
sub-002/eeg/: the five files that start withsub-002_task-FaceRecognition_.
- At the top level:
- You do not need the
anatfolder (the MRI) for this lesson.
The script 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 event, 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
- 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.)
- Choose your
ds002718folder and click Select Folder (on macOS: Open). The window Import BIDS data — pop_importbids() opens. - Keep Use BIDS electrode.tsv files (when present) for channel locations; off: look up locations using channel labels ticked. The names
EEG001and so on are not standard, so a lookup by name would find nothing. - 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_typeinstead ofvalue. - 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. - Click OK. The import takes a minute or two.
In EEGLAB 2026.1, this command always creates a STUDY, even for one participant. The main window shows the STUDY, and the Datasets menu 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
% 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 thevaluecolumn, and the event types become numbers such as13and4096.- The imported file is written to
derivatives/eeglab/sub-002/eeg/, and the STUDY file toderivatives/eeglab/ds002718.study. The file takes its name from the BIDS folder; the STUDY itself has no name (STUDY.nameis empty) unless you give it one.
How do I write it as code?
% 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 thevaluecolumn, and the event types become numbers such as13and4096.- The imported file is written to
derivatives/eeglab/sub-002/eeg/, and the STUDY file toderivatives/eeglab/ds002718.study. The file takes its name from the BIDS folder; the STUDY itself has no name (STUDY.nameis empty) unless you give it one.
Which value should I choose?
Suitable values for your analysis goal
| Option | Our choice | Why |
|---|---|---|
| event typeThe name or code that identifies what kind of event it is. column | trial_type | Readable 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 files | ticked | The 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 folder | derivatives/eeglab (default) | BIDS keeps processed files in derivatives, away from the raw data. |
| Import only the following participant indices | unticked | We downloaded one participant only. In a full dataset, use it to import a few participants first. |
Which value should I choose?
| Option | Our choice | Why |
|---|---|---|
| Event type column | trial_type | Readable names (famous_new, scrambled_new, right_sym). The value column has number codes only. |
| Use BIDS electrode.tsv files | ticked | The 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 folder | derivatives/eeglab (default) | BIDS keeps processed files in derivatives, away from the raw data. |
| Import only the following participant indices | unticked | We 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
- The Datasets menu lists dataset 1, and choosing it shows 74 channels, 250 Hz and 1479 events.
eeg_eventtypes(EEG(1))lists names such asright_sym,famous_newandboundary, not numbers.- 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. - The folder
ds002718/derivatives/eeglab/sub-002/eeg/has the imported.setfile.
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.
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.
How do I check it worked?
- The Datasets menu lists dataset 1, and choosing it shows 74 channels, 250 Hz and 1479 events.
eeg_eventtypes(EEG(1))lists names such asright_sym,famous_newandboundary, not numbers.- 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. - The folder
ds002718/derivatives/eeglab/sub-002/eeg/has the imported.setfile.
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.
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-002oreegfolder. Choose the dataset’s top folder, the one that holdsdataset_description.json. - Downloading the
.setfile only. Withoutevents.tsvandelectrodes.tsv, the side files that make BIDS useful are missing. Keep the folder structure as on OpenNeuro. - Event types appear as numbers. You kept
valuein the event column list. Import again and choosetrial_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,VEOGand twoEKGchannels, soEEG.nbchanis 74.
What mistakes do people make?
- Pointing EEGLAB at the
sub-002oreegfolder. Choose the dataset’s top folder, the one that holdsdataset_description.json. - Downloading the
.setfile only. Withoutevents.tsvandelectrodes.tsv, the side files that make BIDS useful are missing. Keep the folder structure as on OpenNeuro. - Event types appear as numbers. You kept
valuein the event column list. Import again and choosetrial_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 EEG channels plus
HEOG,VEOGand twoEKGchannels, soEEG.nbchanis 74.
Your browser doesn't allow saving progress. All lessons are open, but completion marks won't be saved.
Done. Your progress is saved in this browser.UndoHow 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.How do I write it in my paper?
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
- EEGLAB TutorialDocumentationd. BIDS
- EEGLAB TutorialDocumentationf. BIDS pipeline
- BIDS data format for Neuroimaging: Export/Import BIDS EEG data from EEGLABVideoFull video · 16:14
- Face processing EEG dataset for EEGLAB (OpenNeuro ds002718)README; dataset_description.json
Written for EEGLAB 2026.1 · 2026-10-28
Going further
- EEGLAB Tutorial: https://eeglab.org/tutorials/04_Import/BIDS.html (d. BIDS)
- EEGLAB Tutorial: https://eeglab.org/tutorials/11_Scripting/Analyzing_EEG_BIDS_data_in_EEGLAB.html (f. BIDS pipeline)
- BIDS data format for Neuroimaging: Export/Import BIDS EEG data from EEGLAB: https://www.youtube.com/watch?v=EClpeP7WREw (Full video)
- Face processing EEG dataset for EEGLAB (OpenNeuro ds002718): https://openneuro.org/datasets/ds002718 (README; dataset_description.json)
Need help?
Ask, share feedback, or report an error
- Report a scientific error · Needs a GitHub account. Don't have one? Use "Share your thoughts".