Open hardware · Real-time tracking · Drosophila
Every fly.Every second.
Ethoscopes are small, open-source machines that film, track and interact with fruit flies in real time. Build them from a Raspberry Pi, a camera and 3D-printed parts, run dozens from one browser, and analyse the data in R or Python.
01Hardware
Print every part.
An ethoscope is a Raspberry Pi with a camera, held in a 3D-printed case above an arena of glass tubes or a custom chamber. An infrared-sensitive camera keeps tracking through the night.
All files are in the repository, ready to print. The original paper also describes ethoscopes built from LEGO.

02Real-time tracking
It doesn't just watch. It acts.
Each fly is tracked live on the Raspberry Pi, so the machine can respond to what an individual animal is doing: rotate its tube to keep it awake, deliver an odour, or switch on a light for optogenetics.
Modules run on one Arduino-based board with motors, valves and LEDs. Sleep deprivation, odour delivery and optogenetics are documented in the manual.

03The node
Dozens of machines. One browser.
A single computer, the node, finds every ethoscope on the network, starts and stops experiments and collects the data. Everything is controlled from a web browser.
In the original study one lab ran up to 70 ethoscopes, tracking 1,400 flies at the same time.

04Throughput
Built to scale.
Each machine is cheap and independent, so capacity grows one ethoscope at a time. Data from every machine land in one place, ready for analysis.

05Analysis
From tracking to figures.
Two open toolkits read ethoscope data directly: ethoscopy for Python and rethomics for R. Both score sleep from movement, handle metadata for hundreds of animals, and plot activity, sleep and circadian rhythms. ethoscope-lab bundles ethoscopy in a ready-made JupyterLab.
Pythonethoscopy
import ethoscopy as etho
from functools import partial
meta = etho.link_meta_index("metadata.csv", "results/")
data = etho.load_ethoscope(
meta, FUN=partial(etho.sleep_annotation, rule="k")
)
df = etho.behavpy(data, meta, canvas="seaborn")
df = df.curate_dead_animals()
df.plot_overtime(variable="asleep", facet_col="genotype")Rrethomics
library(scopr); library(sleepr); library(ggetho)
metadata <- link_ethoscope_metadata(metadata, result_dir = "results")
dt <- load_ethoscope(metadata, FUN = sleep_annotation)
ggetho(dt, aes(z = asleep)) + stat_tile_etho()
▶The film · 1:54
Two minutes on how ethoscopes work.
Music: “Flight of the Bumblebee” (N. Rimsky-Korsakov, arr. G. Poffenbarger), performed by the Concert Band of the United States Air Force Band of the Rockies. Public domain (U.S. government work), via Wikimedia Commons. Edited.
06Open source
Open, end to end.
Every part of the platform is public: the machines, the software that runs them and the tools that analyse their data. The software is released under GPL-3.0.
Python · JavaScript
ethoscope
Device and node software, tracking, web interface, firmware and 3D-printable parts.
Python
ethoscopy
Python analysis: sleep, activity, circadian rhythms and hidden Markov models, in JupyterLab.
R · CRAN
rethomics
R framework for high-throughput behavioural data: behavr, scopr, sleepr, ggetho, zeitgebr, damr.
07Publications
Used in labs around the world.
The ethoscope paper has been cited by 133 publications, 116 of them from other groups, with authors in 35 countries.
If you use ethoscopes, please cite
Geissmann Q, Garcia Rodriguez L, Beckwith EJ, French AS, Jamasb AR, Gilestro GF (2017). Ethoscopes: an open platform for high-throughput ethomics. PLoS Biology 15(10): e2003026.doi:10.1371/journal.pbio.2003026
Get started