Bonsai

Overview

Bonsai is an open-source event-based data acquisition and experimental control framework for neuroscience, developed from 2014 at the Champalimaud Centre for the Unknown in Lisbon and now maintained as a community project. It uses a visual dataflow programming model to combine streams from cameras, electrophysiology amplifiers, and digital I/O into reusable operator graphs. Bonsai is widely used for closed-loop experiments and behavioural task control, with native integration for Neuropixels probes (via Open Ephys and SpikeGLX), DeepLabCut, and Arduino-based hardware. Data collected with Bonsai is routinely packaged for deposit to DANDI Archive in NWB format. The IBL used Bonsai for behavioural task control in the Brain Wide Map project.

Connections

  • relatedTo: DANDI Archive (Bonsai-collected datasets deposited to DANDI; conversion tooling exists for Bonsai output to NWB)
  • relatedTo: NWB (NWB is the standard output format for Bonsai experimental data deposited in open archives)
  • relatedTo: IBL (IBL Brain Wide Map used Bonsai for behavioural task control across all recording sites)
  • relatedTo: NERF (NERF develops Neuropixels hardware; Bonsai is a primary acquisition interface for Neuropixels)

Resources