AllenInstitute / visual_behavior_analysis

Python package for analyzing behavioral data for Brain Observatory: Visual Behavior
Other
21 stars 6 forks source link

Extend catch trial definition #778

Closed dougollerenshaw closed 2 years ago

dougollerenshaw commented 2 years ago
alexpiet commented 2 years ago
  • adds functions for calculating response and d' matrices
  • adds a function called annotate_stimuli to utilities.py that annotates all stimuli in stimulus_presentations with the following columns: 'trials_id': the corresponding ID of the stimulus in the trials table

you mean the ID of the trial?

'previous_image_name': the name of the stimulus on the last flash

What does this do during omissions?

'next_start_time': The time of the next stimulus start

Again, what does this do during omissions?

'auto_rewarded': True for trials where rewards were delivered regardless of animal response 'trial_stimulus_index': index of the given stimulus on the current trial

how is this different from trials_id?

dougollerenshaw commented 2 years ago

@alexpiet image Yes, the ID of the trial on which the stimulus occurred. I changed the docstring to read: 'trials_id': the corresponding ID of the trial in the trials table in which the stimulus occurred

image It will list 'omitted' if the last stimulus is omitted. I changed the docstring to read: 'previous_image_name': the name of the stimulus on the last flash (will list 'omitted' if last stimulus is omitted)

image

This also applies to omissions. I changed the docstring to read: 'next_start_time': The time of the next stimulus start (including the time of the omitted stimulus if the next stimulus is omitted)

image This is the index of the stimulus within the trial. For example, the first stimulus in a trial has index 0, the second stimulus in a trial has index 1, etc. This is useful for determining where the stimulus would have been in the geometric distribution. Stimuli with indices 0-3 could not have been change stimuli. I changed the docstring to read: 'trial_stimulus_index': index of the given stimulus on the current trial. For example, the first stimulus in a trial has index 0, the second stimulus in a trial has index 1, etc