metabci.brainda.datasets.schirrmeister2017 module

High-gamma dataset.

class metabci.brainda.datasets.schirrmeister2017.BBCIDataset(filename, load_sensor_names=None)[source]

Bases: object

Loader class for files created by saving BBCI files in matlab (make sure to save with ‘-v7.3’ in matlab, see https://de.mathworks.com/help/matlab/import_export/mat-file-versions.html#buk6i87 ) :param filename: :type filename: str :param load_sensor_names: Also speeds up loading if you only load some sensors.

None means load all sensors.

Parameters:
  • 2017 (Copyright Robin Schirrmeister,) –

  • 2018 (Altered by Vinay Jayaram,) –

static get_all_sensors(filename, pattern=None)[source]

Get all sensors that exist in the given file.

Parameters:
  • filename (str) –

  • pattern (str, optional) – Only return those sensor names that match the given pattern.

Returns:

sensor_names – Sensor names that match the pattern or all sensor names in the file.

Return type:

list of str

load()[source]
class metabci.brainda.datasets.schirrmeister2017.Schirrmeister2017[source]

Bases: BaseDataset

High-gamma dataset discribed in Schirrmeister et al. 2017

Our “High-Gamma Dataset” is a 128-electrode dataset (of which we later only use 44 sensors covering the motor cortex, (see Section 2.7.1), obtained from 14 healthy subjects (6 female, 2 left-handed, age 27.2 ± 3.6 (mean ± std)) with roughly 1000 (963.1 ± 150.9, mean ± std) four-second trials of executed movements divided into 13 runs per subject. The four classes of movements were movements of either the left hand, the right hand, both feet, and rest (no movement, but same type of visual cue as for the other classes). The training set consists of the approx. 880 trials of all runs except the last two runs, the test set of the approx. 160 trials of the last 2 runs. This dataset was acquired in an EEG lab optimized for non-invasive detection of high- frequency movement-related EEG components (Ball et al., 2008; Darvas et al., 2010).

Depending on the direction of a gray arrow that was shown on black back- ground, the subjects had to repetitively clench their toes (downward arrow), perform sequential finger-tapping of their left (leftward arrow) or right (rightward arrow) hand, or relax (upward arrow). The movements were selected to require little proximal muscular activity while still being complex enough to keep subjects in- volved. Within the 4-s trials, the subjects performed the repetitive movements at their own pace, which had to be maintained as long as the arrow was showing. Per run, 80 arrows were displayed for 4 s each, with 3 to 4 s of continuous random inter-trial interval. The order of presentation was pseudo-randomized, with all four arrows being shown every four trials. Ideally 13 runs were performed to collect 260 trials of each movement and rest. The stimuli were presented and the data recorded with BCI2000 (Schalk et al., 2004). The experiment was approved by the ethical committee of the University of Freiburg.

References

neural networks for EEG decoding and visualization.” Human brain mapping 38.11 (2017): 5391-5420.

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]]]