timing#
Timing: reaction time, time between trials, center port holds, trial duration, misses and early pokeouts.
Functions
Adds a boolean column 'early_pokeout' to the dataframe indicating whether there was an early pokeout in the center port before holding the required time. |
|
Add an inter-trial interval column to the dataframe. |
|
Adds port<N>_holds: the duration of every poke in that port during the trial (including the ITI), as an array per trial. |
|
Adds reaction_time: time from the last center poke out to the next side poke. |
|
Adds time_between_trials: time from the start of the previous trial of the same session (NaN for the first trial of each session). |
|
Add a trial duration column to the dataframe. |
|
Add a trial initiation time column to the dataframe. |
|
Add a trial misses column to the dataframe. |
|
Adjusts the 'TRIAL_START' and 'trial' columns to start from the first session. |
|
Calculate Time Between Trials and Reaction Time. |
|
Per day: mean and 5-95 percentiles of the number of center pokes per trial and of the duration of those pokes. |
|
Per day: mean and 5-95 percentiles of the reaction time and of the time between trials. |