braindecode.datasets.BIDSDataset#
- class braindecode.datasets.BIDSDataset(root: ~pathlib.Path | str, subjects: str | list[str] | None = None, sessions: str | list[str] | None = None, tasks: str | list[str] | None = None, acquisitions: str | list[str] | None = None, runs: str | list[str] | None = None, processings: str | list[str] | None = None, recordings: str | list[str] | None = None, spaces: str | list[str] | None = None, splits: str | list[str] | None = None, descriptions: str | list[str] | None = None, suffixes: str | list[str] | None = None, extensions: str | list[str] | None = <factory>, datatypes: str | list[str] | None = None, check: bool = False, preload: bool = False, n_jobs: int = 1)[source]#
Dataset for loading BIDS.
This class has the same parameters as the
mne_bids.find_matching_paths()function as it will be used to find the files to load. The defaultextensionsparameter was changed.More information on BIDS (Brain Imaging Data Structure) can be found at https://bids.neuroimaging.io
Note
For loading “unofficial” BIDS datasets containing epoched data, you can use
BIDSEpochsDataset.- Parameters:
root (pathlib.Path | str) – The root of the BIDS path.
subjects (str | array-like of str | None) – The subject ID. Corresponds to “sub”.
sessions (str | array-like of str | None) – The acquisition session. Corresponds to “ses”.
tasks (str | array-like of str | None) – The experimental task. Corresponds to “task”.
acquisitions (str | array-like of str | None) – The acquisition parameters. Corresponds to “acq”.
runs (str | array-like of str | None) – The run number. Corresponds to “run”.
processings (str | array-like of str | None) – The processing label. Corresponds to “proc”.
recordings (str | array-like of str | None) – The recording name. Corresponds to “rec”.
spaces (str | array-like of str | None) – The coordinate space for anatomical and sensor location files (e.g.,
*_electrodes.tsv,*_markers.mrk). Corresponds to “space”. Note that valid values forspacemust come from a list of BIDS keywords as described in the BIDS specification.splits (str | array-like of str | None) – The split of the continuous recording file for
.fifdata. Corresponds to “split”.descriptions (str | array-like of str | None) – This corresponds to the BIDS entity
desc. It is used to provide additional information for derivative data, e.g., preprocessed data may be assigneddescription='cleaned'.suffixes (str | array-like of str | None) – The filename suffix. This is the entity after the last
_before the extension. E.g.,'channels'. The following filename suffix’s are accepted: ‘meg’, ‘markers’, ‘eeg’, ‘ieeg’, ‘T1w’, ‘participants’, ‘scans’, ‘electrodes’, ‘coordsystem’, ‘channels’, ‘events’, ‘headshape’, ‘digitizer’, ‘beh’, ‘physio’, ‘stim’extensions (str | array-like of str | None) – The extension of the filename. E.g.,
'.json'. By default, uses the ones accepted bymne_bids.read_raw_bids().datatypes (str | array-like of str | None) – The BIDS data type, e.g.,
'anat','func','eeg','meg','ieeg'.check (bool) – If
True, only returns paths that conform to BIDS. IfFalse(default), the.checkattribute of the returnedmne_bids.BIDSPathobject will be set toTruefor paths that do conform to BIDS, and toFalsefor those that don’t.preload (bool) – If True, preload the data. Defaults to False.
n_jobs (int) – Number of jobs to run in parallel. Defaults to 1.