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.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 101
- FWCI
- 4.77
- Field percentile
- top 4%
- Organism
- Assay
- Research Focus
- Approach
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
- StrIPETrack: a real-time, ROI-flexible tracking platform for high-throughput zebrafish behavior
Camden E. Cummings, Brandon L. Bastien, … Summer B. Thyme·Biology OpenPeer-reviewed·Apr 7, 2026
- pi_tailtrack: A compact, inexpensive, and open-source behaviour-tracking system for head-restrained zebrafish
Owen Randlett·Journal of Experimental BiologyPeer-reviewed·Oct 11, 2023
- BonZeb: Open-source, modular software tools for high-resolution zebrafish tracking and analysis
Nicholas C. Guilbeault, Jordan Guerguiev, … Tod R. Thiele·Scientific ReportsPeer-reviewed·Apr 14, 2021
- Plug-and-Play automated behavioral tracking of zebrafish larvae with DeepLabCut and SLEAP: pre-trained networks and datasets of annotated poses
Leandro A. Scholz, Tessa Mancienne, … Conrad C.Y. Lee·bioRxiv·Jun 4, 2025
- A Customizable Low-Cost System for Massively Parallel Zebrafish Behavior Phenotyping
William J. Joo, Michael D. Vivian, … Summer B. Thyme·Frontiers in Behavioral NeurosciencePeer-reviewed·Jan 17, 2021
- ezTrack: An open-source video analysis pipeline for the investigation of animal behavior
Zachary T. Pennington, Zhe Dong, … Denise J. Cai·Scientific ReportsPeer-reviewed·Dec 27, 2019