Skip to content

A customizable python program for training mice for and controlling neural electrostimulation via an Intan Recording Controller and Bpod Finite State Machine, to be run on a Raspberry Pi.

License

Notifications You must be signed in to change notification settings

Dadarlat-Lab/stim-reward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stim-reward

A customizable python program for training mice for and controlling neural electrostimulation via an Intan Recording Controller and Bpod Finite State Machine, to be run on a Raspberry Pi.

Prerequisites

  • Raspberry Pi (Tested on 3B+) or other host computer
  • Speaker atatached to host computer
  • Host PC running Intan RHX software
  • Intan Stimulation/Recording Controller (Tested on 128-ch stimulation/recording controller)
  • Bpod Finite State Machine (Tested on v2.2 with latest firmware)
  • 3x Bpod reward pump modules

Setting Up

Intan Controller <--> Host PC <--> Raspberry Pi <--> Bpod State Machine with Poke Modules
                                        ^
                                        |_ we are here

To run this software, please install the required Python modules:

pip3 install -r reqs.txt --upgrade

Running

Configure the TCP command and waveform servers in the Intan RHX software on the host PC, and ensure ports and addresses match in the parameters in stim-reward.py. If you get an error about encoding, just run it again. It seems to be an upstream issue and running it again seems to work fine.

habituation.py is meant for habituating the mice to their environment. The 4-stage process is described in the header of the file, and it is responsible for stages 2 and 3. Stage 4 (the actual experiment trials) is conducted via stim-reward.py, and is the only script that includes stimulation code.

To run habituation.py:

./habituation.py <stage: 2 | 3> <number of trials: >0>

To run stim-reward.py:

./stim-reward.py

and press Ctrl + C to end the session and save the behavioral data.

About

A customizable python program for training mice for and controlling neural electrostimulation via an Intan Recording Controller and Bpod Finite State Machine, to be run on a Raspberry Pi.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages