metabci.brainda.datasets.bnci module

Brain/Neuro Computer Interface (BNCI) datasets.

class metabci.brainda.datasets.bnci.BNCI2014001[source]

Bases: BaseDataset

BNCI 2014-001 Motor Imagery dataset.

Dataset IIa from BCI Competition 4 [1]_.

Dataset Description

This data set consists of EEG data from 9 subjects. The cue-based BCI paradigm consisted of four different motor imagery tasks, namely the imag- ination of movement of the left hand (class 1), right hand (class 2), both feet (class 3), and tongue (class 4). Two sessions on different days were recorded for each subject. Each session is comprised of 6 runs separated by short breaks. One run consists of 48 trials (12 for each of the four possible classes), yielding a total of 288 trials per session.

The subjects were sitting in a comfortable armchair in front of a computer screen. At the beginning of a trial ( t = 0 s), a fixation cross appeared on the black screen. In addition, a short acoustic warning tone was presented. After two seconds ( t = 2 s), a cue in the form of an arrow pointing either to the left, right, down or up (corresponding to one of the four classes left hand, right hand, foot or tongue) appeared and stayed on the screen for 1.25 s. This prompted the subjects to perform the desired motor imagery task. No feedback was provided. The subjects were ask to carry out the motor imagery task until the fixation cross disappeared from the screen at t = 6 s.

Twenty-two Ag/AgCl electrodes (with inter-electrode distances of 3.5 cm) were used to record the EEG; the montage is shown in Figure 3 left. All signals were recorded monopolarly with the left mastoid serving as reference and the right mastoid as ground. The signals were sampled with. 250 Hz and bandpass-filtered between 0.5 Hz and 100 Hz. The sensitivity of the amplifier was set to 100 μV . An additional 50 Hz notch filter was enabled to suppress line noise

References

data_path(subject: str | int, path: str | Path | None = None, force_update: bool = False, update_path: bool | None = None, proxies: Dict[str, str] | None = None, verbose: bool | str | int | None = None) List[List[str | Path]][source]

Get path to local copy of a subject data.

Parameters:
  • subject (Union[str, int]) – subject id

  • path (Optional[Union[str, Path]], optional) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_DATASETS_(dataset_code)_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, by default None

  • force_update (bool, optional) – force update of the dataset even if a local copy exists, by default False

  • update_path (Optional[bool], optional) – If True, set the MNE_DATASETS_(dataset)_PATH in mne-python config to the given path. If None, the user is prompted, by default None

  • proxies (Optional[Union[bool, str, int]], optional) – proxies if needed

  • verbose (Optional[Union[bool, str, int]], optional) – [description], by default None

Returns:

local path of a subject data, the first list is session and the second list is run

Return type:

List[List[Union[str, Path]]]

class metabci.brainda.datasets.bnci.BNCI2014004[source]

Bases: BaseDataset

BNCI 2014-004 Motor Imagery dataset.

Dataset B from BCI Competition 2008.

Dataset description

This data set consists of EEG data from 9 subjects of a study published in [1]_. The subjects were right-handed, had normal or corrected-to-normal vision and were paid for participating in the experiments. All volunteers were sitting in an armchair, watching a flat screen monitor placed approximately 1 m away at eye level. For each subject 5 sessions are provided, whereby the first two sessions contain training data without feedback (screening), and the last three sessions were recorded with feedback.

Three bipolar recordings (C3, Cz, and C4) were recorded with a sampling frequency of 250 Hz.They were bandpass- filtered between 0.5 Hz and 100 Hz, and a notch filter at 50 Hz was enabled. The placement of the three bipolar recordings (large or small distances, more anterior or posterior) were slightly different for each subject (for more details see [1]). The electrode position Fz served as EEG ground. In addition to the EEG channels, the electrooculogram (EOG) was recorded with three monopolar electrodes.

The cue-based screening paradigm consisted of two classes, namely the motor imagery (MI) of left hand (class 1) and right hand (class 2). Each subject participated in two screening sessions without feedback recorded on two different days within two weeks. Each session consisted of six runs with ten trials each and two classes of imagery. This resulted in 20 trials per run and 120 trials per session. Data of 120 repetitions of each MI class were available for each person in total. Prior to the first motor im- agery training the subject executed and imagined different movements for each body part and selected the one which they could imagine best (e. g., squeezing a ball or pulling a brake).

Each trial started with a fixation cross and an additional short acoustic warning tone (1 kHz, 70 ms). Some seconds later a visual cue was presented for 1.25 seconds. Afterwards the subjects had to imagine the corresponding hand movement over a period of 4 seconds. Each trial was followed by a short break of at least 1.5 seconds. A randomized time of up to 1 second was added to the break to avoid adaptation

For the three online feedback sessions four runs with smiley feedback were recorded, whereby each run consisted of twenty trials for each type of motor imagery. At the beginning of each trial (second 0) the feedback (a gray smiley) was centered on the screen. At second 2, a short warning beep (1 kHz, 70 ms) was given. The cue was presented from second 3 to 7.5. At second 7.5 the screen went blank and a random interval between 1.0 and 2.0 seconds was added to the trial.

References

data_path(subject: str | int, path: str | Path | None = None, force_update: bool = False, update_path: bool | None = None, proxies: Dict[str, str] | None = None, verbose: bool | str | int | None = None) List[List[str | Path]][source]

Get path to local copy of a subject data.

Parameters:
  • subject (Union[str, int]) – subject id

  • path (Optional[Union[str, Path]], optional) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_DATASETS_(dataset_code)_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, by default None

  • force_update (bool, optional) – force update of the dataset even if a local copy exists, by default False

  • update_path (Optional[bool], optional) – If True, set the MNE_DATASETS_(dataset)_PATH in mne-python config to the given path. If None, the user is prompted, by default None

  • proxies (Optional[Union[bool, str, int]], optional) – proxies if needed

  • verbose (Optional[Union[bool, str, int]], optional) – [description], by default None

Returns:

local path of a subject data, the first list is session and the second list is run

Return type:

List[List[Union[str, Path]]]