xiaoxiong2n wrote
Dear Dr. Sanders,
I am now using Bopod to run the auditory go/no-go behavior in the head-fixed mice. The behavior runs well. But I also would like to monitor the mouse licking event during the whole session, not just during the state transition. So I am wondering whether there is a “timer” function in Bpod to monitor the specified event every 10 ms.
Best regards,
Xiong
Hi Xiong
Regardless of whether a lick event causes a state transition, it is captured and returned with your data.
When you run RawEvents = RunStateMachine(), RawEvents.Events should contain a numerical code for each lick event during the trial, and RawEvents.EventTimestamps should contain the time of each lick. The event codes are then packaged in a human-readable format when you run AddTrialEvents().
If your protocol file is efficiently written (e.g. the example protocols included with Bpod), and your computer is reasonably fast, the interval between trials should be 7-10ms. During this time events are returned from the state machine, the next trial's state machine is computed and transmitted to the Bpod device, and online plots are updated. With the current software, you would not be able to capture licks during the 7-10ms inter-trial interval. An update in the near future should reduce that "dead-time" to 1-2ms, but it cannot be completely eliminated since Bpod's microcontroller has a single CPU core, and no straightforward support for multi-threading.
I hope this helps!
-Josh