Graphics

GUI elements.

class forced_choice.graphics.TrialOutcome(**kwargs)

Bases: kivy.uix.gridlayout.GridLayout

Visualizes the outcome of a trial. Typically a few instances are created and then reused in a rotating fashion.

animal

The animal ID for the trial.

block

The zero-based block number.

incomplete

Whether the trial ended with an incomplete if the animal didn’t sample the odor stream long enough.

init_outcome(animal, block, trial)

Called at the start of a trial with the trial information in order to reset the widget and prepare for this trial.

iti

The ITI of the trial.

passed

Whether the trial was passes or failed.

rewarded

Which feeder side was rewarded.

side

The side that will be rewarded.

side_went

The feeder side the animal visited.

tinp

How long it spent in the nose port.

trial

The zero-based trial number.

ttnp

How long from trial start until it visited the nose port.

ttrp

How long it spent after the nose poke until it visited a feeder.

class forced_choice.graphics.TrialPrediction(**kwargs)

Bases: kivy.uix.label.Label

A Label generated for each trial ahead of time, indicating the pre-computed params for that trial.

odor

The odor scehduled for that trial.

outcome

Whether it passed or failed the trial.

outcome_text

A textual version of outcome.

side

The feeder side the animal has to go to for this trial in order to get rewarded.

side_rewarded

Which feeder side was rewarded for this trial.

side_went

Which feeder side the animal actually went to for the trial.

trial

The trial number.