bidsaid.events.EPrimeBlockExtractor.extract_response_counts
- EPrimeBlockExtractor.extract_response_counts(reaction_time_column_name, correct_response_column=None, valid_correct_responses=None, response_trial_names=None)[source]
Extract the number of trials with a response for each block.
Parameters
- reaction_time_column_name
str The name of the column containing reaction time values.
- correct_response_column
strorNone, default=None The name of the column containing the correct response. Required if
valid_correct_responsesis provided.- valid_correct_responses
Iterable[str | int | float]orNone, default=None Specific values in the
correct_response_columnto include in the count. If provided, the script will only count responses for trials where the correct response matches one of these values (e.g., counting only responses on valid Go trials). If None, all trials are evaluated.- 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.
- reaction_time_column_name