bidsaid.events.PresentationBlockExtractor.extract_response_counts
- PresentationBlockExtractor.extract_response_counts(response_map=None, response_trial_names=None)[source]
Extract the number of trials with a response for each block.
Parameters
- response_map
dict[str, int]orNone, default=None A dictionary mapping response codes, from “Stim Type” column, to values. If provided, responses mapped to
float("NaN")(or responses not in the map) are excluded from the count. This ensures the count accurately reflects the valid trials used in reaction time and accuracy computations.- response_trial_names
Iterable[str]orNone, default=None The stimulus trial names within each block to include.
Important
If
split_cue_from_blockis True, trial types are excluded from this parameter.
Returns
- list[int]
A list of response counts for each block. If cue row is separated, NaN will be assigned for its count.
- response_map