moabb.datasets.BNCI2020_002#

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

Bases: BNCIBaseDataset

[source]

Dataset Snapshot

BNCI2020_002

Gaze-independent brain-computer interface based on covert spatial attention shifts for binary (yes/no) communication

P300 / ERP, 2 classes (NonTarget vs Target)

AuthorsChristoph Reichert, Igor Fabian Tellez Ceja, Catherine M. Sweeney-Reed, Hans-Jochen Heinze, Hermann Hinrichs, Stefan Dürschmid

🇩🇪 Leibniz Institute for Neurobiology, Germany·2020·christoph.reichert@lin-magdeburg.de
P300 / ERP Code: BNCI2020-002 18 subjects 1 session 30 ch 250 Hz 2 classes 16.0 s trials CC BY 4.0

Class Labels: NonTarget, Target

Overview

BNCI 2020-002 Attention Shift (Covert Spatial Attention) dataset.

Dataset from

Dataset Description

This dataset contains EEG recordings from 18 healthy subjects performing a covert spatial attention task for brain-computer interface (BCI) control. The paradigm decodes binary decisions based on the N2pc component - a neurological marker reflecting attention to visual targets in specific hemispheres.

Subjects were presented with colored stimuli (red and green crosses) in left and right visual hemifields simultaneously. By covertly shifting attention to one side (left or right), subjects could indicate "yes" or "no" responses without any overt movement, enabling gaze-independent communication.

Participants

  • - 18 healthy subjects (10 female)
  • Age range: 19-38 years (mean 27 years)
  • All right-handed
  • Normal or corrected-to-normal vision
  • Location: Otto-von-Guericke University Magdeburg, Germany

Recording Details

  • - Equipment: BrainAmp DC Amplifier (Brain Products GmbH)
  • Channels: 29 EEG + 2 EOG (horizontal and vertical)
  • Electrode positions: Standard 10-20 system
  • Reference: Right mastoid
  • Sampling rate: 250 Hz
  • Hardware filter: 0.1 Hz high-pass
  • Display: 24" TFT, 70 cm viewing distance

Experimental Procedure

  • - Binary communication task: attend left (red cross) for "no", attend right (green cross) for "yes"
  • 120 statements presented, subjects respond by covert attention shift
  • Each trial: 10 visual stimuli presentations
  • Stimulus parameters tested:
  • Four symbol sizes: 0.45, 0.90, 1.36, 1.81 degrees visual angle
  • Five eccentricities: 4, 5.5, 7, 8.5, 10 degrees visual angle
  • Inter-stimulus interval: ~175 ms
  • Online accuracy: 88.5% (+/- 7.8%)

Event Codes

For P300 paradigm compatibility, events are named Target/NonTarget:

  • - NonTarget (1): Left attention (no response)
  • Target (2): Right attention (yes response)

Data Organization

  • - 1 session per subject
  • 120 trials per subject, each with 10 stimulus presentations
  • Trial duration: 16 seconds (4000 samples at 250 Hz)
  • Data stored in MAT format with fields:
  • bciexp.data: EEG data (channels x samples x trials)
  • bciexp.heog, bciexp.veog: EOG data
  • bciexp.intention: subject's intended response (yes/no)
  • subject: demographic information

Citation & Impact

Stimulus Protocol
../_images/BNCI2020_002.svg

16s task window per trial · 2-class p300 / erp paradigm · 1 runs/session across 1 sessions

HED Event Tags
HED tags2/2 events annotated

Source: MOABB BIDS HED annotation mapping.

Experimental-stimulus
2
Sensory-event
2
Visual-presentation
2
Non-target
1
Target
1
NonTarget
Sensory-eventExperimental-stimulusVisual-presentationNon-target
Target
Sensory-eventExperimental-stimulusVisual-presentationTarget

HED tree view

Tree · NonTarget
├─ Sensory-event
├─ Experimental-stimulus
├─ Visual-presentation
└─ Non-target
Tree · Target
├─ Sensory-event
├─ Experimental-stimulus
├─ Visual-presentation
└─ Target
Channel Summary
Total channels30
EEG30 (Ag/AgCl electrodes)
EOG2
Montageextended 10-20
Sampling250 Hz
Referenceright mastoid
Filter0.1 Hz highpass
Notch / line50 Hz

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

BNCI 2020-002 Attention Shift (Covert Spatial Attention) dataset.

Dataset from [1].

Dataset Description

This dataset contains EEG recordings from 18 healthy subjects performing a covert spatial attention task for brain-computer interface (BCI) control. The paradigm decodes binary decisions based on the N2pc component - a neurological marker reflecting attention to visual targets in specific hemispheres.

Subjects were presented with colored stimuli (red and green crosses) in left and right visual hemifields simultaneously. By covertly shifting attention to one side (left or right), subjects could indicate “yes” or “no” responses without any overt movement, enabling gaze-independent communication.

Participants

  • 18 healthy subjects (10 female)

  • Age range: 19-38 years (mean 27 years)

  • All right-handed

  • Normal or corrected-to-normal vision

  • Location: Otto-von-Guericke University Magdeburg, Germany

Recording Details

  • Equipment: BrainAmp DC Amplifier (Brain Products GmbH)

  • Channels: 29 EEG + 2 EOG (horizontal and vertical)

  • Electrode positions: Standard 10-20 system

  • Reference: Right mastoid

  • Sampling rate: 250 Hz

  • Hardware filter: 0.1 Hz high-pass

  • Display: 24” TFT, 70 cm viewing distance

Experimental Procedure

  • Binary communication task: attend left (red cross) for “no”, attend right (green cross) for “yes”

  • 120 statements presented, subjects respond by covert attention shift

  • Each trial: 10 visual stimuli presentations

  • Stimulus parameters tested:
    • Four symbol sizes: 0.45, 0.90, 1.36, 1.81 degrees visual angle

    • Five eccentricities: 4, 5.5, 7, 8.5, 10 degrees visual angle

  • Inter-stimulus interval: ~175 ms

  • Online accuracy: 88.5% (+/- 7.8%)

Event Codes

For P300 paradigm compatibility, events are named Target/NonTarget:

  • NonTarget (1): Left attention (no response)

  • Target (2): Right attention (yes response)

Data Organization

  • 1 session per subject

  • 120 trials per subject, each with 10 stimulus presentations

  • Trial duration: 16 seconds (4000 samples at 250 Hz)

  • Data stored in MAT format with fields:
    • bciexp.data: EEG data (channels x samples x trials)

    • bciexp.heog, bciexp.veog: EOG data

    • bciexp.intention: subject’s intended response (yes/no)

    • subject: demographic information

References

[1]

Reichert, C., Tellez-Ceja, I. F., Schwenker, F., Rusnac, A.-L., Curio, G., Aust, L., & Hinrichs, H. (2020). Impact of Stimulus Features on the Performance of a Gaze-Independent Brain-Computer Interface Based on Covert Spatial Attention Shifts. Frontiers in Neuroscience, 14, 591777. https://doi.org/10.3389/fnins.2020.591777

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

Dataset summary

#Subj

18

#Chan

31

#Trials / class

varies NT / T

Trials length

16 s

Freq

250 Hz

#Sessions

1

Participants

  • Population: healthy

  • Age: 27 (range: 19-38) years

Equipment

  • Amplifier: BrainAmp DC Amplifier

  • Electrodes: Ag/AgCl electrodes

  • Montage: extended 10-20

  • Reference: right mastoid

Preprocessing

  • Data state: raw

  • Bandpass filter: 1-12.5 Hz

  • Steps: re-referenced to average of left and right mastoid, 4th order zero-phase IIR Butterworth bandpass filter (1.0-12.5 Hz), resampled to 50 Hz, epoched from stimulus onset to 750 ms after

  • Re-reference: average of left and right mastoid

Data Access

Experimental Protocol

  • Paradigm: covert spatial attention

  • Task type: binary decision

  • Feedback: visual (yes/no text)

  • Stimulus: colored crosses (green + and red x)

Notes

Added in version 1.3.0.

This dataset uses a covert spatial attention paradigm with N2pc ERP detection, which is different from traditional P300 or motor imagery paradigms. The paradigm is designed for gaze-independent BCI control, making it suitable for users who cannot control eye movements.

See also

BNCI2015_009

AMUSE auditory spatial P300 paradigm

BNCI2015_010

RSVP visual P300 paradigm

Examples

>>> from moabb.datasets import BNCI2020_002
>>> dataset = BNCI2020_002()
>>> dataset.subject_list
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
__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])

See also

CacheConfig

Cache configuration for get_data().

moabb.datasets.bids_interface.get_bids_root

Return the BIDS root path.

Notes

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) None | DataFrame[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 | pd.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

BaseDataset.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 (Pipeline | None) – Optional processing pipeline to apply to the data. To generate an adequate pipeline, we recommend using moabb.utils.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: DatasetMetadata | None[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