# bpod-core

A modern Python interface for Bpod Finite State Machines.

#### WARNING
bpod-core is under development and not yet ready for production use.

Bpod Finite State Machines are an open-source platform by
[*Sanworks*](https://sanworks.io/) for controlling behavioral experiments: a
microcontroller-based finite state machine that runs the trial logic in real time and
talks to sensors, valves, and other peripherals with deterministic millisecond-scale
timing. Running the state machine on dedicated microcontroller hardware, rather than a
general-purpose computer, keeps time-critical trial execution isolated from
operating-system scheduling jitter. This makes Bpod particularly well-suited to
closed-loop experiments, where state transitions must be triggered by sensor readings
within a tight, predictable latency.

bpod-core is a Python library for driving Bpod hardware. It grew out of the need for
a modern, well-tested way to work with Bpod devices from Python, and is designed to fit
naturally into everyday research workflows.

This project is maintained by the software development team at the
[*International Brain Laboratory*](https://internationalbrainlab.org/).

## Goals

* **Interface to Bpod Devices:** Provides an interface for interacting with Bpod
  devices.
* **State Machine Management:** Offers capabilities to define, validate, and run state
  machines.
* **Standalone or Library Use:** Can function independently or be integrated as a
  library within other projects.
* **Performance-Oriented:** Designed to be lean and fast.
* **Quality Assurance:** Typed, tested, and documented.

## Non-Goals

* **No GUI:** Does not include a graphical user interface.
* **Limited High-Level Functionality:** Does not provide features such as data
  management, configuration, or calibration.
* **No Specific Module Support:** Does not implement support for specific Bpod modules.
