overview#
Tables and figures of the overview page of the daily report (village-report-generator), one function per report cell.
They take the trials of all the subjects of a project, prepared with preprocessing.prepare (or analyze_df). None of them raises: if something fails, they return a figure that says what failed (and log the error), so that one broken cell does not stop the report.
Performance counts timeouts (correct = None) as errors, as in the figures (see data_format_changes.py).
Functions
Percentage of each day the box was used, the hours of the day it was used, and which mouse used it after which (an arrow from A to B: B started a session right after A). |
|
Number of trials and performance per day of the whole cohort, by training stage. |
|
Trials, performance and misses of each subject per day and training stage. |
|
The report cells that failed (and showed a message instead) so far. |
|
At most max_points points per subject: consecutive trials are grouped (as few per group as needed) and each group is one point, at the last trial of the group (total_trial) with the mean of column. |
|
Trials and performance of each subject in the last n_days days with data, one column per day ("trials_<day>", "performance_<day>"). |
|
The trials that started in the last hours before the last trial of df (of any subject). |
|
Decorator: if the function raises, log the error and return a figure (kind "plotly" or "matplotlib") with the message instead. |
|
Performance through the trials of every subject (interactive), with at most max_points points per subject (see group_trials), so that the size of the report does not grow with the number of trials. |
|
The figure panels that failed, e.g. {"NUO003": fig.panel_problems, ...}. |
|
Performance against the number of trials done in each training stage (bins of bin_size trials), a plot per stage (Habituation left out): the mean of the mice (with its 95% confidence interval) in the colour of the stage, and each mouse as a thin line (not in the "publication" style). |
|
Win-stay / lose-switch and side / alternation bias of each mouse in the last hours (before the last trial of df), a point per mouse with its colour of the overview. |
|
A colour per subject (in alphabetical order), the same in every figure of the overview. |
|
Number of trials of each subject in each training stage (stages in order of appearance). |
|
Detections, sessions, water and weight of each subject in the last hours. |