Skip to content

Electroencephalography

Support for Electroencephalography (EEG) was developed as a BIDS Extension Proposal. Please see Citing BIDS on how to appropriately credit this extension when referring to it in the context of the academic literature.

The following example EEG datasets have been formatted using this specification and can be used for practical guidance when curating a new dataset.

Further datasets are available from the BIDS examples repository.

EEG recording data

Template:

sub-<label>/
    [ses-<label>]/
      eeg/
        sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_eeg.<manufacturer_specific_extension>
        sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_eeg.json

The EEG community uses a variety of formats for storing raw data, and there is no single standard that all researchers agree on. For BIDS, EEG data MUST be stored in one of the following formats:

  • European data format (Each recording consisting of a .edf file)

  • BrainVision Core Data Format (Each recording consisting of a .vhdr, .vmrk, .eeg file triplet)

  • The format used by the MATLAB toolbox EEGLAB (Each recording consisting of a .set file with an optional .fdt file)

  • Biosemi data format (Each recording consisting of a .bdf file)

It is RECOMMENDED to use the European data format, or the BrainVision data format. It is furthermore discouraged to use the other accepted formats over these RECOMMENDED formats, particularly because there are conversion scripts available in most commonly used programming languages to convert data into the RECOMMENDED formats. The data in their original format, if different from the supported formats, can be stored in the /sourcedata directory.

The original data format is especially valuable in case conversion elicits the loss of crucial metadata specific to manufacturers and specific EEG systems. We also encourage users to provide additional meta information extracted from the manufacturer specific data files in the sidecar JSON file. Other relevant files MAY be included alongside the original EEG data in /sourcedata.

Note the RecordingType, which depends on whether the data stream on disk is interrupted or not. Continuous data is by definition 1 segment without interruption. Epoched data consists of multiple segments that all have the same length (for example, corresponding to trials) and that have gaps in between. Discontinuous data consists of multiple segments of different length, for example due to a pause in the acquisition.

Note that for proper documentation of EEG recording metadata it is important to understand the difference between electrode and channel: An EEG electrode is attached to the skin, whereas a channel is the combination of the analog differential amplifier and analog-to-digital converter that result in a potential (voltage) difference that is stored in the EEG dataset. We employ the following short definitions:

  • Electrode = A single point of contact between the acquisition system and the recording site (for example, scalp, neural tissue, ...). Multiple electrodes can be organized as caps (for EEG), arrays, grids, leads, strips, probes, shafts, and so on.

  • Channel = A single analog-to-digital converter in the recording system that regularly samples the value of a transducer, which results in the signal being represented as a time series in the digitized data. This can be connected to two electrodes (to measure the potential difference between them), a magnetic field or magnetic gradient sensor, temperature sensor, accelerometer, and so on.

Although the reference and ground electrodes are often referred to as channels, they are in most common EEG systems not recorded by themselves. Therefore they are not represented as channels in the data. The type of referencing for all channels and optionally the location of the reference electrode and the location of the ground electrode MAY be specified.

Sidecar JSON (*_eeg.json)

Generic fields MUST be present:

Key name Requirement level Data type Description
TaskName REQUIRED string Name of the task. No two tasks should have the same name. The task label included in the file name is derived from this TaskName field by removing all non-alphanumeric ([a-zA-Z0-9]) characters. For example TaskName faces n-back will correspond to task label facesnback. A RECOMMENDED convention is to name resting state task using labels beginning with rest.

SHOULD be present: For consistency between studies and institutions, we encourage users to extract the values of these fields from the actual raw data. Whenever possible, please avoid using ad hoc wording.

Key name Requirement level Data type Description
InstitutionName RECOMMENDED string The name of the institution in charge of the equipment that produced the composite instances.
InstitutionAddress RECOMMENDED string The address of the institution in charge of the equipment that produced the composite instances.
Manufacturer RECOMMENDED string Manufacturer of the EEG system (for example, Biosemi, Brain Products, Neuroscan).
ManufacturersModelName RECOMMENDED string Manufacturer's designation of the EEG system model (for example, BrainAmp DC).
SoftwareVersions RECOMMENDED string Manufacturer's designation of the acquisition software.
TaskDescription RECOMMENDED string Description of the task.
Instructions RECOMMENDED string Text of the instructions given to participants before the scan. This is not only important for behavioral or cognitive tasks but also in resting state paradigms (for example, to distinguish between eyes open and eyes closed).
CogAtlasID RECOMMENDED string URI of the corresponding Cognitive Atlas term that describes the task (for example, Resting State with eyes closed "https://www.cognitiveatlas.org/task/id/trm_54e69c642d89b").
CogPOID RECOMMENDED string URI of the corresponding CogPO term that describes the task (for example, Rest "http://wiki.cogpo.org/index.php?title=Rest") .
DeviceSerialNumber RECOMMENDED string The serial number of the equipment that produced the composite instances. A pseudonym can also be used to prevent the equipment from being identifiable, as long as each pseudonym is unique within the dataset.

Specific EEG fields MUST be present:

Key name Requirement level Data type Description
EEGReference REQUIRED string General description of the reference scheme used and (when applicable) of location of the reference electrode in the raw recordings (for example, "left mastoid", "Cz", "CMS"). If different channels have a different reference, this field should have a general description and the channel specific reference should be defined in the channels.tsv file.
SamplingFrequency REQUIRED number Sampling frequency (in Hz) of all the data in the recording, regardless of their type (for example, 2400).
PowerLineFrequency REQUIRED number or "n/a" Frequency (in Hz) of the power grid at the geographical location of the EEG instrument (for example, 50 or 60).
SoftwareFilters REQUIRED object of objects or "n/a" Object of temporal software filters applied, or "n/a" if the data is not available. Each key:value pair in the JSON object is a name of the filter and an object in which its parameters are defined as key:value pairs. For example, {"Anti-aliasing filter": {"half-amplitude cutoff (Hz)": 500, "Roll-off": "6dB/Octave"}}.

SHOULD be present:

Key name Requirement level Data type Description
CapManufacturer RECOMMENDED string Name of the cap manufacturer (for example, "EasyCap").
CapManufacturersModelName RECOMMENDED string Manufacturer's designation of the EEG cap model (for example, "actiCAP 64 Ch Standard-2").
EEGChannelCount RECOMMENDED integer Number of EEG channels included in the recording (for example, 128).
ECGChannelCount RECOMMENDED integer Number of ECG channels.
EMGChannelCount RECOMMENDED integer Number of EMG channels.
EOGChannelCount RECOMMENDED integer Number of EOG channels.
MiscChannelCount RECOMMENDED integer Number of miscellaneous analog channels for auxiliary signals.
TriggerChannelCount RECOMMENDED integer Number of channels for digital (TTL bit level) trigger.
RecordingDuration RECOMMENDED number Length of the recording in seconds (for example, 3600).
RecordingType RECOMMENDED string Defines whether the recording is "continuous", "discontinuous" or "epoched", where "epoched" is limited to time windows about events of interest (for example, stimulus presentations, subject responses).
EpochLength RECOMMENDED number Duration of individual epochs in seconds (for example, 1) in case of epoched data.
EEGGround RECOMMENDED string Description of the location of the ground electrode (for example, "placed on right mastoid (M2)").
HeadCircumference RECOMMENDED number Circumference of the participants head, expressed in cm (for example, 58).
EEGPlacementScheme RECOMMENDED string Placement scheme of EEG electrodes. Either the name of a standardized placement system (for example, "10-20") or a list of standardized electrode names (for example, ["Cz", "Pz"]).
HardwareFilters RECOMMENDED object of objects or "n/a" Object of temporal hardware filters applied, or "n/a" if the data is not available. Each key:value pair in the JSON object is a name of the filter and an object in which its parameters are defined as key:value pairs. For example, {"Highpass RC filter": {"Half amplitude cutoff (Hz)": 0.0159, "Roll-off": "6dB/Octave"}}
SubjectArtefactDescription RECOMMENDED string Free-form description of the observed subject artifact and its possible cause (for example, "Vagus Nerve Stimulator", "non-removable implant"). If this field is set to n/a, it will be interpreted as absence of major source of artifacts except cardiac and blinks.

Example:

{
  "TaskName":"Seeing stuff",
  "TaskDescription":"Subjects see various images for which phase, amplitude spectrum, and color vary continuously",
  "Instructions":"Your task is to detect images when they appear for the 2nd time, only then press the response button with your right/left hand (counterbalanced across subjects)",
  "InstitutionName":"The world best university, 10 Beachfront Avenue, Papeete",
  "SamplingFrequency":2400,
  "Manufacturer":"Brain Products",
  "ManufacturersModelName":"BrainAmp DC",
  "CapManufacturer":"EasyCap",
  "CapManufacturersModelName":"M1-ext",
  "EEGChannelCount":87,
  "EOGChannelCount":2,
  "ECGChannelCount":1,
  "EMGChannelCount":0,
  "MiscChannelCount":0,
  "TriggerChannelCount":1,
  "PowerLineFrequency":50,
  "EEGPlacementScheme":"10 percent system",
  "EEGReference":"single electrode placed on FCz",
  "EEGGround":"placed on AFz",
  "SoftwareFilters":{
    "Anti-aliasing filter":{
      "half-amplitude cutoff (Hz)": 500,
      "Roll-off": "6dB/Octave"
    }
  },
  "HardwareFilters":{
    "ADC's decimation filter (hardware bandwidth limit)":{
      "-3dB cutoff point (Hz)":480,
      "Filter order sinc response":5
    }
  },
  "RecordingDuration":600,
  "RecordingType":"continuous"
}

Note that the date and time information SHOULD be stored in the Study key file (scans.tsv). Date time information MUST be expressed as indicated in Units

Channels description (*_channels.tsv)

Template:

sub-<label>/
    [ses-<label>]/
      eeg/
        [sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_channels.tsv]

This file is RECOMMENDED as it provides easily searchable information across BIDS datasets for for example, general curation, response to queries or batch analysis. The required columns are channel name, type and units in this specific order. To avoid confusion, the channels SHOULD be listed in the order they appear in the EEG data file. Any number of additional columns may be added to provide additional information about the channels. Note that electrode positions SHOULD NOT be added to this file, but to *_electrodes.tsv.

The columns of the Channels description table stored in *_channels.tsv are:

MUST be present:

Column name Requirement level Description
name REQUIRED Channel name (for example, FC1, Cz)
type REQUIRED Type of channel; MUST use the channel types listed below. Note that the type MUST be in upper-case.
units REQUIRED Physical unit of the value represented in this channel, for example, V for Volt, or fT/cm for femto Tesla per centimeter (see Units).

SHOULD be present:

Column name Requirement level Description
description OPTIONAL Free-form text description of the channel, or other information of interest. See examples below.
sampling_frequency OPTIONAL Sampling rate of the channel in Hz.
reference OPTIONAL Name of the reference electrode(s) (not needed when it is common to all channels, in that case it can be specified in *_eeg.json as EEGReference).
low_cutoff OPTIONAL Frequencies used for the high-pass filter applied to the channel in Hz. If no high-pass filter applied, use n/a.
high_cutoff OPTIONAL Frequencies used for the low-pass filter applied to the channel in Hz. If no low-pass filter applied, use n/a. Note that hardware anti-aliasing in A/D conversion of all EEG electronics applies a low-pass filter; specify its frequency here if applicable.
notch OPTIONAL Frequencies used for the notch filter applied to the channel, in Hz. If no notch filter applied, use n/a.
status OPTIONAL Data quality observed on the channel (good, bad). A channel is considered bad if its data quality is compromised by excessive noise. Description of noise type SHOULD be provided in status_description.
status_description OPTIONAL Free-form text description of noise or artifact affecting data quality on the channel. It is meant to explain why the channel was declared bad in status.

Restricted keyword list for field type in alphabetic order (shared with the MEG and iEEG modality; however, only the types that are common in EEG data are listed here). Note that upper-case is REQUIRED:

Keyword Description
AUDIO Audio signal
EEG Electroencephalogram channel
EOG Generic electrooculogram (eye), different from HEOG and VEOG
ECG Electrocardiogram (heart)
EMG Electromyogram (muscle)
EYEGAZE Eye tracker gaze
GSR Galvanic skin response
HEOG Horizontal EOG (eye)
MISC Miscellaneous
PPG Photoplethysmography
PUPIL Eye tracker pupil diameter
REF Reference channel
RESP Respiration
SYSCLOCK System time showing elapsed time since trial started
TEMP Temperature
TRIG System triggers
VEOG Vertical EOG (eye)

Example of free-form text for field description

  • n/a, stimulus, response, skin conductance, battery status

Example:

name     type   units   description                     status  status_description
VEOG     VEOG   uV      n/a                             good    n/a
FDI      EMG    uV      left first dorsal interosseous  good    n/a
Cz       EEG    uV      n/a                             bad     high frequency noise
UADC001  MISC   n/a     envelope of audio signal        good    n/a

Electrodes description (*_electrodes.tsv)

Template:

sub-<label>/
    [ses-<label>]/
      eeg/
        sub-<label>[_ses-<label>][_acq-<label>][_space-<label>]_electrodes.tsv

File that gives the location of EEG electrodes. Note that coordinates are expected in cartesian coordinates according to the EEGCoordinateSystem and EEGCoordinateUnits fields in *_coordsystem.json. If an *_electrodes.tsv file is specified, a *_coordsystem.json file MUST be specified as well. The order of the required columns in the *_electrodes.tsv file MUST be as listed below.

MUST be present:

Column name Requirement level Description
name REQUIRED Name of the electrode.
x REQUIRED Recorded position along the x-axis.
y REQUIRED Recorded position along the y-axis.
z REQUIRED Recorded position along the z-axis.

SHOULD be present:

Column name Requirement level Description
type RECOMMENDED Type of the electrode (for example, cup, ring, clip-on, wire, needle).
material RECOMMENDED Material of the electrode (for example, Tin, Ag/AgCl, Gold).
impedance RECOMMENDED Impedance of the electrode, units MUST be in kOhm.

Example:

name  x         y        z         type      material
A1    -0.0707   0.0000   -0.0707   clip-on   Ag/AgCl
F3    -0.0567   0.0677   0.0469    cup       Ag/AgCl
Fz    0.0000    0.0714   0.0699    cup       Ag/AgCl
REF   -0.0742   -0.0200  -0.0100   cup       Ag/AgCl
GND   0.0742    -0.0200  -0.0100   cup       Ag/AgCl

The acq-<label> key/value pair can be used to indicate acquisition of the same data. For example, this could be the recording of electrode positions with a different electrode position recording device, or repeated digitization before and after the recording.

Coordinate System JSON (*_coordsystem.json)

Template:

sub-<label>/
    [ses-<label>]/
      eeg/
        [sub-<label>[_ses-<label>][_acq-<label>]_coordsystem.json]

A *_coordsystem.json file is used to specify the fiducials, the location of anatomical landmarks, and the coordinate system and units in which the position of electrodes and landmarks is expressed. The *_coordsystem.json is REQUIRED if the optional *_electrodes.tsv is specified. If a corresponding anatomical MRI is available, the locations of landmarks and fiducials according to that scan should also be stored in the *_T1w.json file which goes alongside the MRI data.

For disambiguation, we employ the following definitions for fiducials and anatomical landmarks respectively:

  • Fiducials are objects with a well defined location used to facilitate the localization of electrodes and co-registration with other geometric data such as the participant's own T1 weighted magnetic resonance head image, a T1 weighted template head image, or a spherical head model. Commonly used fiducials are vitamin-E pills, which show clearly in an MRI, or reflective spheres that are localized with an infrared optical tracking system.

  • Anatomical landmarks are locations on a research subject such as the nasion, which is the intersection of the frontal bone and two nasal bones of the human skull.

Fiducials are typically used in conjunction with anatomical landmarks. An example would be the placement of vitamin-E pills on top of anatomical landmarks, or the placement of LEDs on the nasion and preauricular points to triangulate the position of other LED-lit electrodes on a research subject's head.

General fields:

Key name Requirement level Data type Description
IntendedFor OPTIONAL string Relative path to associate the electrodes, landmarks and fiducials to an MRI/CT.

Fields relating to the EEG electrode positions:

Key name Requirement level Data type Description
EEGCoordinateSystem REQUIRED string Defines the coordinate system for the EEG sensors. See Appendix VIII for a list of restricted keywords for coordinate systems. If Other, provide definition of the coordinate system in EEGCoordinateSystemDescription.
EEGCoordinateUnits REQUIRED string Units in which the coordinates that are listed in the field EEGCoordinateSystem are represented. MUST be m, cm, or mm.
EEGCoordinateSystemDescription RECOMMENDED, but REQUIRED if EEGCoordinateSystem is Other string Free-form text description of the coordinate system. May also include a link to a documentation page or paper describing the system in greater detail.

Fields relating to the position of fiducials measured during an EEG session/run:

Key name Requirement level Data type Description
FiducialsDescription OPTIONAL string Free-form text description of how the fiducials such as vitamin-E capsules were placed relative to anatomical landmarks, and how the position of the fiducials were measured (for example, both with Polhemus and with T1w MRI).
FiducialsCoordinates RECOMMENDED object of arrays Key:value pairs of the labels and 3-D digitized position of anatomical landmarks, interpreted following the FiducialsCoordinateSystem (for example, {"NAS": [12.7,21.3,13.9], "LPA": [5.2,11.3,9.6], "RPA": [20.2,11.3,9.1]}). Each array MUST contain three numeric values corresponding to x, y, and z axis of the coordinate system in that exact order.
FiducialsCoordinateSystem RECOMMENDED string Defines the coordinate system for the fiducials. Preferably the same as the EEGCoordinateSystem. See Appendix VIII for a list of restricted keywords for coordinate systems. If Other, provide definition of the coordinate system in FiducialsCoordinateSystemDescription.
FiducialsCoordinateUnits RECOMMENDED string Units in which the coordinates that are listed in the field AnatomicalLandmarkCoordinateSystem are represented. MUST be m, cm, or mm.
FiducialsCoordinateSystemDescription RECOMMENDED, but REQUIRED if FiducialsCoordinateSystem is Other string Free-form text description of the coordinate system. May also include a link to a documentation page or paper describing the system in greater detail.

Fields relating to the position of anatomical landmark measured during an EEG session/run:

Key name Requirement level Data type Description
AnatomicalLandmarkCoordinates RECOMMENDED object of arrays Key:value pairs of the labels and 3-D digitized position of anatomical landmarks, interpreted following the AnatomicalLandmarkCoordinateSystem (for example, {"NAS": [12.7,21.3,13.9], "LPA": [5.2,11.3,9.6], "RPA": [20.2,11.3,9.1]}). Each array MUST contain three numeric values corresponding to x, y, and z axis of the coordinate system in that exact order.
AnatomicalLandmarkCoordinateSystem RECOMMENDED string Defines the coordinate system for the anatomical landmarks. Preferably the same as the EEGCoordinateSystem. See Appendix VIII for a list of restricted keywords for coordinate systems. If Other, provide definition of the coordinate system in AnatomicalLandmarkCoordinateSystemDescription.
AnatomicalLandmarkCoordinateUnits RECOMMENDED string Units in which the coordinates that are listed in the field AnatomicalLandmarkCoordinateSystem are represented. MUST be m, cm, or mm.
AnatomicalLandmarkCoordinateSystemDescription RECOMMENDED, but REQUIRED if AnatomicalLandmarkCoordinateSystem is Other string Free-form text description of the coordinate system. May also include a link to a documentation page or paper describing the system in greater detail.

If the position of anatomical landmarks is measured using the same system or device used to measure electrode positions, and if thereby the anatomical landmarks are expressed in the same coordinates, the coordinates of the anatomical landmarks can be specified in electrodes.tsv. The same applies to the coordinates of the fiducials.

Anatomical landmarks or fiducials measured on an anatomical MRI that match the landmarks or fiducials during an EEG session/run, must be stored separately in the corresponding *_T1w.json or *_T2w.json file and should be expressed in voxels (starting from [0, 0, 0]).

Example:

{
  "IntendedFor":"/sub-01/ses-01/anat/sub-01_T1w.nii",
  "EEGCoordinateSystem":"Other",
  "EEGCoordinateUnits":"mm",
  "EEGCoordinateSystemDescription":"RAS orientation: Origin halfway between LPA and RPA, positive x-axis towards RPA, positive y-axis orthogonal to x-axis through Nasion,  z-axis orthogonal to xy-plane, pointing in superior direction.",
  "FiducialsDescription":"Electrodes and fiducials were digitized with Polhemus, fiducials were recorded as the centre of vitamin E capsules sticked on the left/right pre-auricular and on the nasion, these are also visible on the T1w MRI"
}

Landmark photos (*_photo.jpg)

Photos of the anatomical landmarks and/or fiducials.

Template:

sub-<label>/
    [ses-<label>]/
      eeg/
        [sub-<label>[_ses-<label>][_acq-<label>]_photo.jpg]

Photos of the anatomical landmarks and/or fiducials are OPTIONAL. Please note that the photos may need to be cropped or blurred to conceal identifying features prior to sharing, depending on the terms of the consent given by the participant.

The acq-<label> key/value pair can be used to indicate acquisition of different photos of the same face (or other body part in different angles to show, for example, the location of the nasion (NAS) as opposed to the right periauricular point (RPA).

Example:

Picture of a NAS fiducial placed between the eyebrows, rather than at the actual anatomical nasion: sub-0001_ses-001_acq-NAS_photo.jpg

placement of NAS fiducial