Journal of Neural EngineeringNeurosciencePeer-reviewed journal article
Open source modules for tracking animal behavior and closed-loop stimulation based on Open Ephys and Bonsai
Alessio Paolo BuccinoiD, Mikkel Elle LepperødiD, Svenn-Arne DraglyiD, Philipp Dominik HafligeriD, Marianne FyhniD, Torkel HaftingiD
Abstract
ObjectiveA major goal in systems neuroscience is to determine the causal relationship between neural activity and behavior. To this end, methods that combine monitoring neural activity, behavioral tracking, and targeted manipulation of neurons in closed-loop are powerful tools. However, commercial systems that allow these types of experiments are usually expensive and rely on non-standardized data formats and proprietary software which may hinder user-modifications for specific needs. In order to promote reproducibility and data-sharing in science, transparent software and standardized data formats are an advantage. Here, we present an open source, low-cost, adaptable, and easy to set-up system for combined behavioral tracking, electrophysiology and closed-loop stimulation.\n\nApproachBased on the Open Ephys system (www.open-ephys.org) we developed multiple modules to include real-time tracking and behavior-based closed-loop stimulation. We describe the equipment and provide a step-by-step guide to set up the system. Combining the open source software Bonsai (bonsai-rx.org) for analyzing camera images in real time with the newly developed modules in Open Ephys, we acquire position information, visualize tracking, and perform tracking-based closed-loop stimulation experiments. To analyze the acquired data we provide an open source file reading package in Python.\n\nMain resultsThe system robustly visualizes real-time tracking and reliably recovers tracking information recorded from a range of sampling frequencies (30-1000Hz). We combined electrophysiology with the newly-developed tracking modules in Open Ephys to record place cell and grid cell activity in the hippocampus and in the medial entorhinal cortex, respectively. Moreover, we present a case in which we used the system for closed-loop optogenetic stimulation of entorhinal grid cells.\n\nSignificanceExpanding the Open Ephys system to include animal tracking and behavior-based closed-loop stimulation extends the availability of high-quality, low-cost experimental setup within standardized data formats serving the neuroscience community.
- organism: mouse
- assay: electronic health records
- research focus: benchmarking
- research focus: software / tool
- approach: experimental assay
- Citations
- 48
- FWCI
- 2.23
- Field percentile
- top 12%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Open hardware low-cost system for behavioral experiments simultaneously with electrophysiological recordings.
L. A. A. Aguiar, N. A. P. Vasconcelos, … P. V. Carelli·bioRxiv·Apr 28, 2020
- EthoPy: Reproducible Behavioral Neuroscience Made Simple
Alexandros Evangelou, Maria Diamantaki, … Emmanouil Froudarakis·bioRxiv·Sep 8, 2025
- The NeuroHab: A Low-Cost, Integrated System for Investigation of Neural Correlates of Behaviors
Samuel Crouse, William Johnston, Qian‐Quan Sun·bioRxiv·Aug 15, 2026
- Track-Control, an automatic video-based real-time closed-loop behavioral control toolbox
G.-W. Zhang, L. Shen, … L. I. Zhang·bioRxiv·Dec 11, 2019
- OPETH: Open Source Solution for Real-time Peri-event Time Histogram Based on Open Ephys
András Széll, Sergio Martínez‐Bellver, … Balázs Hangya·Frontiers in NeuroinformaticsPeer-reviewed·May 20, 2020
- An Integrated Platform for in vivo Electrophysiology in Spatial Cognition Experiments
A. Brea Guerrero, M. Oijala, … A. A. Wilber·bioRxiv·Aug 2, 2023