Department of Experimental Psychology, University of Oxford, Oxford, United Kingdom; Champalimaud Neuroscience Program, Champalimaud Centre for the Unknown, Lisbon, Portugal
Department of Physiology Anatomy & Genetics, University of Oxford, Oxford, United Kingdom
Sampath KT Kapanaiah
Institute of Applied Physiology, Ulm University, Ulm, Germany
Joan Esteve-Agraz
Instituto de Neurociencias (Universidad Miguel Hernández-Consejo Superior de Investigaciones Científicas), Sant Joan d’Alacant, Spain
Mariangela Panniello
Department of Physiology Anatomy & Genetics, University of Oxford, Oxford, United Kingdom; Institute of Neuroscience and Psychology, University of Glasgow, Glasgow, United Kingdom
Department of Physiology Anatomy & Genetics, University of Oxford, Oxford, United Kingdom; Institute of Neuroscience and Psychology, University of Glasgow, Glasgow, United Kingdom
Dennis Kätzel
Institute of Applied Physiology, Ulm University, Ulm, Germany
Champalimaud Neuroscience Program, Champalimaud Centre for the Unknown, Lisbon, Portugal; Department of Neuroscience and Neurology, Zuckerman Mind Brain Behavior Institute, Columbia University, New York, United States
Department of Experimental Psychology, University of Oxford, Oxford, United Kingdom; Wellcome Centre for Integrative Neuroimaging, University of Oxford, Oxford, United Kingdom
Laboratory behavioural tasks are an essential research tool. As questions asked of behaviour and brain activity become more sophisticated, the ability to specify and run richly structured tasks becomes more important. An increasing focus on reproducibility also necessitates accurate communication of task logic to other researchers. To these ends, we developed pyControl, a system of open-source hardware and software for controlling behavioural experiments comprising a simple yet flexible Python-based syntax for specifying tasks as extended state machines, hardware modules for building behavioural setups, and a graphical user interface designed for efficiently running high-throughput experiments on many setups in parallel, all with extensive online documentation. These tools make it quicker, easier, and cheaper to implement rich behavioural tasks at scale. As important, pyControl facilitates communication and reproducibility of behavioural experiments through a highly readable task definition syntax and self-documenting features. Here, we outline the system’s design and rationale, present validation experiments characterising system performance, and demonstrate example applications in freely moving and head-fixed mouse behaviour.