First of possibly many PRs about updating the code to fit training sessions. My first goal is to build the infrastructure for getting a manifest of sessions. Then I will update the fitting scripts. The guts of the model should be fine with the exception of early training sessions, but I will need to review them. Finally I will review the training summary file
[ ] resolves #92
Manifest and Inventory
[x] resolves #325
[x] resolves #329
[x] ptt.get_training_manifest() generates a list of all training sessions associated with the mice in summary_df
[x] ptt.get_training_inventory()
Fitting Scripts
[x] scripts/deploy_training.sh
[x] scripts/deploy_training.py
[x] scripts/fit_training.py
[x] Removes three old fitting scripts
Model internals
[x] Should handle no omissions fine, but check
[x] Check how things like QC and data alignment are handled
[x] resolves #326
[x] Early training without flashed images ?
327
Making a decision to skip these for now
Training Summary file
[x] ptt.get_training_summary_table() loads the saved training summary file
[x] ptt.build_training_summary_table() computes and saves the training summary file
[x] ptt.build_core_training_table() loads the model fits and compiles model fit information
[x] ptt.add_time_aligned_training_info() saves image by image information to the summary file
[x] ptt.clean_session_type() is redundant with pgt.get_clean_session_name
[x] ptt.get_mouse_pivot_table()
[x] ptt.plot_mouse_strategy_correlation()
[x] ptt.plot_average_by_day()
[x] Plot each metric three ways- by stage, by day forward from training start, by day backwards from ophys
[x] Remove plot_all_ functions and use a list of metrics to call the relevant plot functions
[x] Use psy_style for colors
[x] Make the figure sizes better
[x] It looks like "fraction engaged" decreases with training, but num_rewards is constant. For both strategies! Does this mean the mice are improving their lick hit fraction? worth exploring
First of possibly many PRs about updating the code to fit training sessions. My first goal is to build the infrastructure for getting a manifest of sessions. Then I will update the fitting scripts. The guts of the model should be fine with the exception of early training sessions, but I will need to review them. Finally I will review the training summary file
Manifest and Inventory
ptt.get_training_manifest()
generates a list of all training sessions associated with the mice insummary_df
ptt.get_training_inventory()
Fitting Scripts
scripts/deploy_training.sh
scripts/deploy_training.py
scripts/fit_training.py
Model internals
327
Training Summary file
ptt.get_training_summary_table()
loads the saved training summary fileptt.build_training_summary_table()
computes and saves the training summary fileptt.build_core_training_table()
loads the model fits and compiles model fit informationptt.add_time_aligned_training_info()
saves image by image information to the summary fileptt.add_training_engagement_metrics()
annotates engagement status.Analysis
ptt.plot_average_by_stage()
ptt.plot_average_by_stage_inner()
ptt.clean_session_type()
is redundant withpgt.get_clean_session_name
ptt.get_mouse_pivot_table()
ptt.plot_mouse_strategy_correlation()
ptt.plot_average_by_day()
plot_all_
functions and use a list of metrics to call the relevant plot functionspsy_style
for colors