bpod_core.bpod.flexio#
Classes implementing the FlexIO subsystem.
Classes#
- class bpod_core.bpod.flexio.FlexIO #
Bases:
AbstractFlexIOLocal FlexIO implementation with direct hardware access.
- reset() #
Reset the FlexIO subsystem to its default settings.
- Overrides:
- property analog_sampling_rate: int #
Sampling rate for channels configured as analog input, in Hz (1-1000).
The interval between samples is a whole number of state machine cycles (100 µs on a Bpod 2+), so other rates are rounded: 300 Hz, for example, becomes 303.03 Hz. Analog timestamps are based on the actual rate. The rate is fixed from the first trial until the Bpod is closed and reopened.
Functions#
- bpod_core.bpod.flexio.is_flexio_threshold_ambiguous(channel_types, index) #
Whether channel index's analog-threshold event codes are ambiguous.
Firmware numbers analog-threshold events by rank among
ANALOG_INPUTchannels only, not by physical channel index, while every other FlexIO event (digital transitions, etc.) is numbered by fixed physical position. The two schemes only agree when channel index is preceded exclusively by otherANALOG_INPUTchannels; otherwise its Trig0/Trig1 codes collide with another channel's fixed-position event codes, an upstream firmware quirk also present in MATLAB.- Return type: