moabb.datasets.BNCI2022_001#

class moabb.datasets.BNCI2022_001(subjects=None, sessions=None, *, return_all_modalities=False)[source]#

Bases: BNCIBaseDataset

[source]

Dataset Snapshot

BNCI2022_001

Motor Imagery, 4 classes (trajectory_start vs waypoint_miss vs waypoint_hit vs trajectory_end)

AuthorsPing-Keng Jao, Ricardo Chavarriaga, Jose del R. Millan

🇨🇭 Ecole Polytechnique Federale de Lausanne, Switzerland·2021·ping-keng.jao@alumni.epfl.ch
Motor Imagery Code: BNCI2022-001 13 subjects 1 session 64 ch 256 Hz 4 classes 90.0 s trials CC BY 4.0

Class Labels: trajectory_start, waypoint_miss, waypoint_hit, trajectory_end

Overview

BNCI 2022-001 EEG Correlates of Difficulty Level dataset.

Dataset from

Dataset Description

This dataset contains EEG recordings from 13 subjects performing a simulated drone piloting task through waypoints at varying difficulty levels. The study aimed to decode the subjective perception of task difficulty from EEG signals to help optimize operator performance by automatically adjusting task difficulty.

Subjects controlled a simulated drone through circular waypoints using a flight joystick. The difficulty was modulated by the size of waypoints - smaller waypoints required more precise control and were perceived as more difficult. After each trajectory, subjects reported their perceived difficulty level.

Participants

  • - 13 healthy subjects (8 females, mean age 22.6 years, SD 1.04)
  • All had normal or corrected-to-normal vision
  • No history of motor or neurological disease
  • Location: EPFL, Geneva, Switzerland

Recording Details

  • - Equipment: Biosemi ActiveTwo system
  • Channels: 64 EEG + 3 EOG = 67 total
  • Original sampling rate: 2048 Hz (downsampled to 256 Hz in public release)
  • Hardware trigger recorded as 8-bit signal
  • Baseline recording: 1-minute eye close/open

Experimental Procedure

  • - Subjects sat in front of a monitor controlling a flight joystick with their right hand
  • Task: Pilot simulated drone through circular waypoints
  • 32 trajectories per subject, each with 32 waypoints (~90 seconds each)
  • 16 difficulty levels (waypoint sizes), normalized to each subject's skill
  • Difficulty progression: levels 16->1->16 (decreasing then increasing)
  • After each trajectory, subjects reported:
  • Numeric difficulty level (0-100)
  • Categorical difficulty (easy/hard/extremely hard)

Event Codes

  • - trajectory_start (1): Beginning of trajectory (countdown before drone moves)
  • waypoint_miss (16): Drone failed to pass through waypoint
  • waypoint_hit (48): Drone successfully passed through waypoint
  • trajectory_end (255): End of trajectory (3s after final waypoint)

Data Organization

  • - 1 session per subject (offline data only, online sessions not included)
  • Two file types per subject:
  • Baseline: eye close/open recording
  • Task (wpsize): main piloting task with difficulty variations

Citation & Impact

Stimulus Protocol
../_images/BNCI2022_001.svg

90s task window per trial · 4-class motor imagery paradigm · 1 runs/session across 1 sessions

HED Event Tags
HED tags4/4 events annotated

Source: MOABB BIDS HED annotation mapping.

Experiment-structure
4
Label
4
trajectory_start
Experiment-structureLabel
waypoint_miss
Experiment-structureLabel
waypoint_hit
Experiment-structureLabel
trajectory_end
Experiment-structureLabel

HED tree view

Tree · trajectory_start
├─ Experiment-structure
└─ Label
Tree · waypoint_miss
├─ Experiment-structure
└─ Label
Tree · waypoint_hit
├─ Experiment-structure
└─ Label
Tree · trajectory_end
├─ Experiment-structure
└─ Label
Channel Summary
Total channels64
EEG64 (active)
EOG3
Montage10-10
Sampling256 Hz
Referencecar
Notch / line50 Hz

This diagram is automatically generated from MOABB metadata. Please consult the original publication to confirm the experimental protocol details.

BNCI 2022-001 EEG Correlates of Difficulty Level dataset.

Dataset from [1].

Dataset Description

This dataset contains EEG recordings from 13 subjects performing a simulated drone piloting task through waypoints at varying difficulty levels. The study aimed to decode the subjective perception of task difficulty from EEG signals to help optimize operator performance by automatically adjusting task difficulty.

Subjects controlled a simulated drone through circular waypoints using a flight joystick. The difficulty was modulated by the size of waypoints - smaller waypoints required more precise control and were perceived as more difficult. After each trajectory, subjects reported their perceived difficulty level.

Participants

  • 13 healthy subjects (8 females, mean age 22.6 years, SD 1.04)

  • All had normal or corrected-to-normal vision

  • No history of motor or neurological disease

  • Location: EPFL, Geneva, Switzerland

Recording Details

  • Equipment: Biosemi ActiveTwo system

  • Channels: 64 EEG + 3 EOG = 67 total

  • Original sampling rate: 2048 Hz (downsampled to 256 Hz in public release)

  • Hardware trigger recorded as 8-bit signal

  • Baseline recording: 1-minute eye close/open

Experimental Procedure

  • Subjects sat in front of a monitor controlling a flight joystick with their right hand

  • Task: Pilot simulated drone through circular waypoints

  • 32 trajectories per subject, each with 32 waypoints (~90 seconds each)

  • 16 difficulty levels (waypoint sizes), normalized to each subject’s skill

  • Difficulty progression: levels 16->1->16 (decreasing then increasing)

  • After each trajectory, subjects reported:
    • Numeric difficulty level (0-100)

    • Categorical difficulty (easy/hard/extremely hard)

Event Codes

  • trajectory_start (1): Beginning of trajectory (countdown before drone moves)

  • waypoint_miss (16): Drone failed to pass through waypoint

  • waypoint_hit (48): Drone successfully passed through waypoint

  • trajectory_end (255): End of trajectory (3s after final waypoint)

Data Organization

  • 1 session per subject (offline data only, online sessions not included)

  • Two file types per subject:
    • Baseline: eye close/open recording

    • Task (wpsize): main piloting task with difficulty variations

References

[1]

Jao, P.-K., Chavarriaga, R., & Millan, J. d. R. (2021). EEG Correlates of Difficulty Levels in Dynamical Transitions of Simulated Flying and Mapping Tasks. IEEE Transactions on Human-Machine Systems, 51(2), 99-108. https://doi.org/10.1109/THMS.2020.3038339

from moabb.datasets import BNCI2022_001
dataset = BNCI2022_001()
data = dataset.get_data(subjects=[1])
print(data[1])

Dataset summary

#Subj

13

#Chan

67

#Classes

4

#Trials / class

varies

Trials length

90 s

Freq

256 Hz

#Sessions

1

#Runs

1

Total_trials

varies

Participants

  • Population: normal or corrected-to-normal vision, no history of motor or neurological disease (one subject with history of vasovagal syncope)

  • Age: 22.6 years

  • Handedness: {‘right’: 12, ‘left’: 1}

Equipment

  • Amplifier: Biosemi ActiveTwo

  • Electrodes: active

  • Montage: 10-10

  • Reference: car

Preprocessing

  • Data state: preprocessed

  • Bandpass filter: 1-40 Hz

  • Steps: downsampling from 2048 Hz to 256 Hz, casual bandpass filtering between 1 and 40 Hz, SPHARA 20th order spatial low-pass filter for interpolation and artifact reduction, common-average re-referencing, ICA for EOG artifact removal, peripheral electrodes removed (25 central channels kept), artifact rejection: windows with peak value > 50 µV rejected

  • Re-reference: car

  • Notes: Out of 39 recordings, P2 was removed twice from offline or online sessions due to short-circuit with the CMS or DRL electrode. On average, 15.8 ICA components were returned and 1.07 components were removed during construction of online decoders (correlation > 0.7 with EOG).

Data Access

  • DOI: 10.1109/TAFFC.2021.3059688

  • Repository: BNCI Horizon

Experimental Protocol

  • Paradigm: imagery

  • Feedback: visual

  • Stimulus: visual

Notes

Added in version 1.3.0.

This dataset is designed for cognitive workload assessment and difficulty level detection. Unlike motor imagery datasets, the task involves actual motor control while the cognitive state (perceived difficulty) varies.

The public release contains only the first session (offline) data. Additional behavioral data and online sessions with closed-loop difficulty adaptation are not included. The paradigm “imagery” is used for compatibility, though the actual task involves motor execution with cognitive load variations.

See also

BNCI2015_004

Multi-class mental task dataset with imagery and cognitive tasks

BNCI2014_001

4-class motor imagery dataset

Examples

>>> from moabb.datasets import BNCI2022_001
>>> dataset = BNCI2022_001()
>>> dataset.subject_list
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
__init__(subjects=None, sessions=None, *, return_all_modalities=False)[source]#

Initialize function for the BaseDataset.

property all_subjects#

Full list of subjects available in this dataset (unfiltered).

convert_to_bids(path=None, subjects=None, overwrite=False, format='EDF', verbose=None, generate_figures=False)[source]#

Convert the dataset to BIDS format.

Saves the raw EEG data in a BIDS-compliant directory structure. Unlike the caching mechanism (see CacheConfig), the files produced here do not contain a processing-pipeline hash (desc-<hash>) in their names, making the output a clean, shareable BIDS dataset.

Parameters:
  • path (str | Path | None) – Directory under which the BIDS dataset will be written. If None the default MNE data directory is used (same default as the rest of MOABB).

  • subjects (list of int | None) – Subject numbers to convert. If None, all subjects in subject_list are converted.

  • overwrite (bool) – If True, existing BIDS files for a subject are removed before saving. Default is False.

  • format (str) – The file format for the raw EEG data. Supported values are "EDF" (default), "BrainVision", and "EEGLAB".

  • verbose (str | None) – Verbosity level forwarded to MNE/MNE-BIDS.

  • generate_figures (bool) – If True, generate interactive neural signature HTML figures in {bids_root}/derivatives/neural_signatures/. Requires plotly (pip install moabb[interactive]). Default is False.

Returns:

bids_root – Path to the root of the written BIDS dataset.

Return type:

pathlib.Path

Examples

>>> from moabb.datasets import AlexMI
>>> dataset = AlexMI()
>>> bids_root = dataset.convert_to_bids(path='/tmp/bids', subjects=[1])

Notes

Use CacheConfig to configure caching for get_data(). Use moabb.datasets.bids_interface.get_bids_root to get the BIDS root path.

Added in version 1.5.

data_path(subject, path=None, force_update=False, update_path=None, verbose=None)[source]#

Return paths to data files for a single subject.

download(subject_list=None, path=None, force_update=False, update_path=None, accept=False, verbose=None)[source]#

Download all data from the dataset.

This function is only useful to download all the dataset at once.

Parameters:
  • subject_list (list of int | None) – List of subjects id to download, if None all subjects are downloaded.

  • path (None | str) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_DATASETS_(dataset)_PATH is used. If it doesn’t exist, the “~/mne_data” directory is used. If the dataset is not found under the given path, the data will be automatically downloaded to the specified folder.

  • force_update (bool) – Force update of the dataset even if a local copy exists.

  • update_path (bool | None) – If True, set the MNE_DATASETS_(dataset)_PATH in mne-python config to the given path. If None, the user is prompted.

  • accept (bool) – Accept licence term to download the data, if any. Default: False

  • verbose (bool, str, int, or None) – If not None, override default verbose level (see mne.verbose()).

get_additional_metadata(subject: str, session: str, run: str)[source]#

Load additional metadata for a specific subject, session, and run.

This method is intended to be overridden by subclasses to provide additional metadata specific to the dataset. The metadata is typically loaded from an events.tsv file or similar data source.

Parameters:
  • subject (str) – The identifier for the subject.

  • session (str) – The identifier for the session.

  • run (str) – The identifier for the run.

Returns:

A DataFrame containing the additional metadata if available, otherwise None.

Return type:

None | pandas.DataFrame

get_block_repetition(paradigm, subjects, block_list, repetition_list)[source]#

Select data for all provided subjects, blocks and repetitions.

subject -> session -> run -> block -> repetition

See also

get_data

Parameters:
  • subjects (List of int) – List of subject number

  • block_list (List of int) – List of block number

  • repetition_list (List of int) – List of repetition number inside a block

Returns:

data – dict containing the raw data

Return type:

Dict

get_data(subjects=None, cache_config=None, process_pipeline=None)[source]#

Return the data corresponding to a list of subjects.

The returned data is a dictionary with the following structure:

data = {'subject_id' :
            {'session_id':
                {'run_id': run}
            }
        }

subjects are on top, then we have sessions, then runs. A sessions is a recording done in a single day, without removing the EEG cap. A session is constitued of at least one run. A run is a single contiguous recording. Some dataset break session in multiple runs.

Processing steps can optionally be applied to the data using the *_pipeline arguments. These pipelines are applied in the following order: raw_pipeline -> epochs_pipeline -> array_pipeline. If a *_pipeline argument is None, the step will be skipped. Therefore, the array_pipeline may either receive a mne.io.Raw or a mne.Epochs object as input depending on whether epochs_pipeline is None or not.

Parameters:
  • subjects (List of int) – List of subject number

  • cache_config (dict | CacheConfig) – Configuration for caching of datasets. See CacheConfig for details.

  • process_pipeline (sklearn.pipeline.Pipeline | None) – Optional processing pipeline to apply to the data. To generate an adequate pipeline, we recommend using moabb.make_process_pipelines(). This pipeline will receive mne.io.BaseRaw objects. The steps names of this pipeline should be elements of StepType. According to their name, the steps should either return a mne.io.BaseRaw, a mne.Epochs, or a numpy.ndarray. This pipeline must be “fixed” because it will not be trained, i.e. no call to fit will be made.

Returns:

data – dict containing the raw data

Return type:

Dict

property metadata[source]#

Return structured metadata for this dataset.

Returns the DatasetMetadata object from the centralized catalog, or None if metadata is not available for this dataset.

Returns:

The metadata object containing acquisition parameters, participant demographics, experiment details, and documentation. Returns None if no metadata is registered for this dataset.

Return type:

DatasetMetadata | None

Examples

>>> from moabb.datasets import BNCI2014_001
>>> dataset = BNCI2014_001()
>>> dataset.metadata.participants.n_subjects
9
>>> dataset.metadata.acquisition.sampling_rate
250.0