title: Bonsai: an event-based framework for processing and controlling data streams.
abstract: The design of modern scientific experiments requires the control and monitoring of many different data streams. However, the serial execution of programming instructions in a computer makes it a challenge to develop software that can deal with the asynchronous, parallel nature of scientific data. Here we present Bonsai, a modular, high-performance, open-source visual programming framework for the acquisition and online processing of data streams. We describe Bonsai's core principles and architecture and demonstrate how it allows for the rapid and flexible prototyping of integrated experimental designs in neuroscience. We specifically highlight some applications that require the combination of many different hardware and software components, including video tracking of behavior, electrophysiology and closed-loop control of stimulation.
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Gonçalo
authors.initials: G
authors.lastname: Lopes
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Niccolò
authors.initials: N
authors.lastname: Bonacchi
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: João
authors.initials: J
authors.lastname: Frazão
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal ; Departamento de Ciência dos Materiais, CENIMAT/I3N and CEMOP/Uninova Lisbon, Portugal.
authors.forename: Joana P
authors.initials: JP
authors.lastname: Neto
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Bassam V
authors.initials: BV
authors.lastname: Atallah
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Sofia
authors.initials: S
authors.lastname: Soares
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Luís
authors.initials: L
authors.lastname: Moreira
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Sara
authors.initials: S
authors.lastname: Matias
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Pavel M
authors.initials: PM
authors.lastname: Itskov
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Patrícia A
authors.initials: PA
authors.lastname: Correia
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Roberto E
authors.initials: RE
authors.lastname: Medina
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Lorenza
authors.initials: L
authors.lastname: Calcaterra
authors.affiliation: Department of Cell and Developmental Biology, University College London London, UK.
authors.forename: Elena
authors.initials: E
authors.lastname: Dreosti
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Joseph J
authors.initials: JJ
authors.lastname: Paton
authors.affiliation: Champalimaud Neuroscience Programme, Champalimaud Centre for the Unknown Lisbon, Portugal.
authors.forename: Adam R
authors.initials: AR
authors.lastname: Kampff
keywords: behavior control; data acquisition system; data stream processing; electrophysiology; open-source; parallel processing; rapid prototyping; video tracking