Data Structure

Sessions have a data attribute which stores data for that training session. This includes behavioural timepoints that record events during training, settings used for the session, and any arbitrary metadata specified by the user.

Keys

Session.data is a dict. Below lists the default keys contained within that are created during a training session:

duration (int)

The duration of the session in seconds.

date (str)

The date of training in %Y-%m-%d format.

start_time (float)

The start time of the session in Unix time.

end_time (float)

The end time of the session in Unix time.

trials (list of dicts)

This list stores the main behavioural data. Each element is a dictionary containing, for every trial, the start time, lift time, lift paw, target spout, spout position, cue duration, outcome, and whether or not the trial is a shaping trial.

intertrial_interval (tuple of 2 ints)

The minimum and maximum inter-trial intervals. The inter-trial interval for a given trial is randomly determined between these two values.

spontaneous_reaches (list of tuples)

This list contains, for every spontaneous reach, a tuple indicating the timepoint (in Unix time) and which spout was grasped.

resets (list of tuples)

Like spontaneous_reaches above, this list stores, for every premature movement that reset the intertrial interval, the timepoint (in Unix time) and which paw was lifted to cause the reset.