ffrprep.preproc.load_data

ffrprep.preproc.load_data(bids_root=None, sub_label=None, session_label=None, task_label=None, run_label=None)[source]

Identify and load EEG data from a BIDS directory using pybids for querying.

This function uses pybids to robustly query the BIDS dataset and find the appropriate EEG files, then uses MNE-BIDS to load the data.

Parameters:
  • bids_root (string) – The top-level directory of the BIDS dataset.

  • sub_label (string) – Subject label of the specific participant whose data is to be loaded. Default = None.

  • session_label (string) – Session label of the specific session to be loaded. Default = None.

  • task_label (string) – Task label of the specific task to be loaded. Default = None.

  • run_label (string) – Run label of the specific run to be loaded. Default = None.

Returns:

  • data (MNE data object) – MNE data object containing EEG data and metadata.

  • bids_path (MNE-BIDS BidsPath object) – MNE-BIDS BidsPath object containing EEG filepaths.

Examples

Load an EEG-BIDS file.

>>> data = load_data(bids_root=bids_root,
                     sub_label=sub_label,
                     run_label=run_label)