pyoperant.behavior.base module

class pyoperant.behavior.base.BaseExp(name='', description='', debug=False, filetime_fmt='%Y%m%d%H%M%S', light_schedule='sun', idle_poll_interval=60.0, experiment_path='', stim_path='', subject='', panel=None, log_handlers=[], *args, **kwargs)[source]

Bases: object

Base class for an experiment.

Keyword arguments: name – name of this experiment desc – long description of this experiment debug – (bool) flag for debugging (default=False) light_schedule – the light schedule for the experiment. either ‘sun’ or

a tuple of (starttime,endtime) tuples in (hhmm,hhmm) form defining time intervals for the lights to be on

experiment_path – path to the experiment stim_path – path to stimuli (default = <experiment_path>/stims) subject – identifier of the subject panel – instance of local Panel() object

Methods: run() – runs the experiment

check_light_schedule()[source]

returns true if the lights should be on

check_session_schedule()[source]

returns True if the subject should be running sessions

deliver_free_food(value, next_state)[source]

reward function with no frills

food_checker(next_state)[source]
free_food_main()[source]

reset expal parameters for the next day

free_food_post()[source]
free_food_pre()[source]
init_summary()[source]

initializes an empty summary dictionary

log_config()[source]
log_error_callback(err)[source]
panel_reset()[source]
run()[source]
save()[source]
session_main()[source]
session_post()[source]
session_pre()[source]
sleep_main()[source]

reset expal parameters for the next day

sleep_post()[source]
sleep_pre()[source]
write_summary()[source]

takes in a summary dictionary and options and writes to the bird’s summaryDAT