Closed dougollerenshaw closed 2 years ago
- adds functions for calculating response and d' matrices
- adds a function called
annotate_stimuli
to utilities.py that annotates all stimuli instimulus_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?
@alexpiet
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
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)
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)
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
adds functions for calculating response and d' matrices
adds a function called
annotate_stimuli
to utilities.py that annotates all stimuli instimulus_presentations
with the following columns: 'trials_id': the corresponding ID of the stimulus in the trials table 'previous_image_name': the name of the stimulus on the last flash 'next_start_time': The time of the next stimulus start '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 'response_lick': Boolean, True if a lick followed the stimulus 'response_lick_times': list of all lick times following this stimulus 'response_lick_latency': time difference between first lick and stimulus 'previous_response_on_trial': Boolean, True if there has been a lick to a previous stimulus on this trial 'could_change': Boolean, True if the stimulus met the conditions that would have allowed to be chosen as the change stimulus by camstim:modifies the
get_behavior_stats
function in utilities.py to use a new "stimulus_based" definition of catch stimuli, based on the above annotations. if 'stimulus_based' (default), calculates hit and false alarm rates using every stimulus on which a change could have occurred. This dramatically increases the number of stimuli used when calculating the false alarm rate, reducing the noise on the false alarm estimate.