pyoperant.behavior.shape module

class pyoperant.behavior.shape.Shaper(panel, log, parameters, error_callback=None)[source]

Bases: object

Run a shaping routine in the operant chamber that will teach an to peck the center key to hear a stimulus, then peck one of the side keys for reward. training sequence: Block 1: Hopper comes up on VI (stays up for 5 s) for the first day

that the animal is in the apparatus. Center key flashes for 5 sec, prior to the hopper access. If the center key is pressed while flashing, then the hopper comes up and then the session jumps to block 2 immediately.
Block 2: The center key flashes until pecked. When pecked the hopper comes up for
4 sec. Run 100 trials.
Block 3: The center key flashes until pecked, then either the right or left (p = .5)
key flashes until pecked, then the hopper comes up for 3 sec. Run 100 trials.
Block 4: Wait for peck to non-flashing center key, then right or left key flashes
until pecked, then food for 2.5 sec. Run 100 trials.
block_name(block_num)[source]
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]
reward(value, next_state)[source]
run_shape(start_state='block1')[source]
sleep_main()[source]

reset expal parameters for the next day

sleep_post()[source]
sleep_pre()[source]
class pyoperant.behavior.shape.Shaper2AC(panel, log, parameters, error_callback=None)[source]

Bases: pyoperant.behavior.shape.Shaper

Run a shaping routine in the operant chamber that will teach an to peck the center key to hear a stimulus, then peck one of the side keys for reward. training sequence: Block 1: Hopper comes up on VI (stays up for 5 s) for the first day

that the animal is in the apparatus. Center key flashes for 5 sec, prior to the hopper access. If the center key is pressed while flashing, then the hopper comes up and then the session jumps to block 2 immediately.
Block 2: The center key flashes until pecked. When pecked the hopper comes up for
4 sec. Run 100 trials.
Block 3: The center key flashes until pecked, then either the right or left (p = .5)
key flashes until pecked, then the hopper comes up for 3 sec. Run 100 trials.
Block 4: Wait for peck to non-flashing center key, then right or left key flashes
until pecked, then food for 2.5 sec. Run 100 trials.
class pyoperant.behavior.shape.Shaper3AC(panel, log, parameters, error_callback=None)[source]

Bases: pyoperant.behavior.shape.Shaper

run a shaping routine for 3AC the operant chamber termial proc: peck center key for stimulus presentation then peck one of three keys L-C-R, or give no response. Training sequence invoked as: Block 1: Hopper comes up on VI (stays up for 5 s) for the first day

that the animal is in the apparatus. Center key flashes for 5 sec, prior to the hopper access. If the center key is pressed while flashing, then the hopper comes up and then the session jumps to block 2 immediately.
Block 2: The center key flashes until pecked. When pecked the hopper comes up for
4 sec. Run 100 trials.
Block 3: The center key flashes until pecked, then either the right, left, or center
key flashes (p=0.333) until pecked, then the hopper comes up for 3 sec. Run 150 trials.
Block 4: Wait for peck to non-flashing center key, then right, center,or left key flashes
until pecked, then food for 2.5 sec. Run 150 trials.
class pyoperant.behavior.shape.Shaper3ACMatching(panel, log, parameters, get_stimuli, error_callback=None)[source]

Bases: pyoperant.behavior.shape.Shaper3AC

class pyoperant.behavior.shape.ShaperFemalePref(panel, log, parameters, error_callback=None)[source]

Bases: pyoperant.behavior.shape.Shaper

run a shaping routine for female pecking preferencein the operant chamber termial proc: peck one of the side keys for stimulus presentation followed by reward. Training sequence invoked as: Block 1: Hopper comes up on VI (stays up for 5 s) for the first day

that the animal is in the apparatus. Left and right keylights flash for 5 sec, prior to the hopper access. If either L or R key is pressed while flashing, then the hopper comes up and the session jumps to block 2 immediately.
Block 2: randomly choose either L or R key to flash until pecked. When pecked the hopper
comes up for 4 sec.
Block 3: Wait for peck to non-flashing L or R key (chosen at random). When pecked,
give food for 2.5 sec.
class pyoperant.behavior.shape.ShaperGoNogo(panel, log, parameters, error_callback=None)[source]

Bases: pyoperant.behavior.shape.Shaper

accomodate go/nogo terminal procedure along with one or two hopper 2choice procedures Go/Nogo shaping works like this: Block 1: Hopper comes up on VI (stays up for 5 s) for the first day

that the animal is in the apparatus. Center key flashes for 5 sec, prior to the hopper access. If the center key is pressed while flashing, then the hopper comes up and then the session jumps to block 2 immediately.
Block 2: The center key flashes until pecked. When pecked the hopper comes up for
4 sec. Run 100 trials.
Block 3: Wait for a peck to non-flashing center key, when you get it, the hopper
comes up for 2.5 sec. Run 100 trials.
NOTE: when you run the go/nog procedure in a 2 hopper apparatus, it uses only the
right hand key and hopper. If you do this often, you may want to add the facility for use of the left hand key and hopper.