Closed jess-breda closed 1 month ago
Updates to the multi-day cpoke plots
polishing:
Did a big overhaul today (not yet committed) creating a python package for this repository.
Worked through plotting data for a single cohort and all the code is working. Had to deal with some type changes from pandas as well as path dependences
The next step here is to condense some of these function names. Specifically the wrappers with respect to multi and single day plotting.
conda create -n behav_viz python==3.10
conda activate behav_viz
cd src
pip install -e .
conda install -c conda-forge jupyterlab
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=behav_viz
Working on single day plots for Fixation Grower. Specifically for R012 who is in the v1 curriculum right now. Started by looking at plots that have the mode
option to be settling_in
or violations
. This was an easy fix using settling_in_determines_fixation
. Now, we need to determine the growth type. If an animal is growing each trial (e.g. not overnight), then the histogram needs to be relative to the go cue. This currently is not relative to the go cue, even they are all valid pokes and that is why the black line is occuring before the cpoke
Working with R010, R012, R033 and R039 who are on fixationgrower with the cpoke test experiment.
Plots over days
Next steps: cpoke plots that make sense for the two curricula mentioned above! start over days and then go within a session? set a timer.
This issue got out of hand and started acting like main. Closing it merging and then re-opening a new one
Similar to #51, all the code was written with DMS2 in mind and will need to be adjusted for
FixationGrower
.The initial steps are
Plots to make:
[x] cpoke_dur_stats_raw: similar to the plot made during EDA for the fixation project for DMS depending on if settling_dur_determines_fix is on, determine the avg failed cpoke (plot in red) determine the avg successful cpoke (plot in green) plot the required fixation in gray plot the initial fix dur for the day in black
[x] cpoke_dur_stats_relative: same as plot above but fixation_dur is subtracted off at each trial so that a success must be greater than 0 and fail is less than 0. init fix is not on plot. This is for looking at day by day growth
[ ] failure rate: depending on if settling_dur_determines_fix is on plot either the multi_cpoke rate (groked to trials or raw or both) or violation rate
[ ] n failed pokes per trial: n_settling_ins (might already exist?
[ ] over session delta delay: today's max minus yesterday's max. if yesterday doesn't exist then use today's max minus today's min
[ ] ITI info: avg iti both for the animal and the sma
[ ] Give type, curriculum?: basically just a categorical plot
[ ] Run time: might already have this made, will need to see how axes play together
[ ] Trial Timing: still contains pre, stim, post and doesn't account for relationship between settling in and delay dur and pre go dur. will want to add some logic steps to this specific to FixationGrower & leave DMS2 as is.
[ ] Food Puck to rig/tech: just add in another category of was foodpuck?
Over days proposed structure (bold needs to be created) rig/techsession/foodpuck -- mass -- water stage -- run time --trials perf -- perf bars -- stage side bias 3 plots inter trial stats -- time to spoke -- give type/curriculum/condition failure rates -- n pokes/trial -- min/max delta w/i date (boxplot etc) cpoke dur stats raw -- cpoke dur states relative -- max delta over days