panels#

Panels of the subject progress and session summary figures.

Each panel draws one plot from a FigureData (a prepared dataframe plus options, see render.py). It lists the columns it needs; the data is prepared once before drawing (preprocessing.prepare), so panels only read columns and never depend on what the caller ran before.

To add a panel: write a function draw(data, ax) with the @panel decorator, and put it in a layout (layouts.py). Raise NotApplicable(“message”) when there is nothing to show for this data.

Functions

by_day

Adds a day column (datetime) from year_month_day.

day_limits

First and last day of the data, so that every "by day" panel shares the x axis.

performance_df

Trials sorted by session and trial, with performance_w (rolling window perf_window).

psychometric

Panel with the choices on the trials of one modality.

session_changes

Index (rows of performance_df) of the first trial of each session.

with_numeric_correct

The trials with correct as 1.0 / 0.0 (timeouts count as errors, see data_format_changes.py).