Sign in
NeurosciencePLoS Computational Biology
Peer-reviewed journal article

Stytra: an open-source, integrated system for stimulation, tracking and closed-loop behavioral experiments

Vilim ŠtihiD, Luigi PetruccoiD, Andreas M. KistiD, Rubén PortuguesiD

Abstract

We present Stytra, a flexible, open-source software package, written in Python, that we designed to cover all the general requirements involved in larval zebrafish behavioral experiments. It allows timed stimulus presentation, interfacing with external devices and simultaneous real-time tracking of position, tail and eye motion in both freely-swimming and head-restrained preparations. It logs in standardized formats all recorded quantities, metadata, and code version to allow full provenance tracking, from data acquisition through analysis to publication. The package is modular and expandable for different experimental protocols and setups. Current releases can be found at https://github.com/portugueslab/stytra. We also provide complete documentation with examples for extending the package to new stimuli and hardware, as well as a schema and parts list for behavioral setups. We showcase Stytra by reproducing two previously behavioral protocols, one with head-restrained and the other with freely-swimming larvae, as well as an experiment in which the software is used in the context of a calcium imaging experiment, where it can trigger and communicate with other acquisition devices. Our aims are to help laboratories with little or no experience in the field to start implementing behavioral experiments and to provide a platform for sharing stimulus protocols to enable easy reproduction of experiments and straightforward validation. In addition, Stytra can easily serve as a base platform to design behavioral experiments in other model organisms.

PDFDOICode

02 /Specification & Classification

Click any tag to browse matching papers
Citations
101
FWCI
4.77
Field percentile
top 4%

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.

Similarity Map
SelectedSame fieldCross-field
THISCummings '26Randlett '23Guilbeault '21Scholz '25Joo '21Pennington '19
73% semantic matchAnimal Behavior & Cognition
Camden E. Cummings, Brandon L. Bastien, Jaqueline A. Martinez+2 more·Biology Open·Apr 7, 2026· 1 citations