brain_pipe.utils.path.BIDSStimulusGrouper

class BIDSStimulusGrouper(bids_root, mapping={'stim_file': 'stimulus_path'}, subfolders=['stimuli'], na_values=['n/a'])

Bases: object

Group stimulus files by subject, session, task and run.

__init__(bids_root, mapping={'stim_file': 'stimulus_path'}, subfolders=['stimuli'], na_values=['n/a'])

Create a new BIDSStimulusGrouper.

Parameters:
  • bids_root (str) – The root directory of the BIDS dataset.

  • mapping (Dict[str, str]) – A mapping from the column names in the events.tsv file to the column names in the stimulus dictionary.

  • subfolders (Sequence[str]) – The subfolders in which the stimulus files are located.

  • na_values (Sequence[str]) – The values that should be interpreted as missing values.

Methods

__init__(bids_root[, mapping, subfolders, ...])

Create a new BIDSStimulusGrouper.