Using PsychoPy in Animal Research
Using PsychoPy to create animal behaviour paradigms
Animal behaviour research aims to understand how different animals interact with each other and their environment, whilst behavioural neuroscience investigates the mechanisms underlying such interactions, how they might be impaired in different scenarios or under different disorders, and how different treatments or interventions might prevent or reverse such impairments.
Behaviour can be studied simply by observing animals in their natural environment, but this offers limited insight into underlying physiological processes. More targeted paradigms allow direct measurement; for example, the novel-object-recognition test investigates short-term memory by exploiting rodents’ natural curiosity: usually, animals spend more time investigating a novel object than a familiar (previously-presented) one, but this does not happen if they have already forgotten about the familiar one.
Most assume animal behavioural paradigms require expensive and niche material, such as operant chambers or very cumbersome and complex coding. However, whilst learning and cognitive tasks do need specialised systems, many paradigms investigate innate responses to stimuli that can be built in PsychoPy. You only need a camera and a projector or speaker; that’s easy!
As part of my PhD Placement with Open Science Tools, I developed a set of animal behavioural experiment demos, each based on published methodologies and adaptable across research questions and species. Full documentation and references are included with each demo:
- Looming visual stimulus demo
- Optomotor (or optokinetic) assay demo
- Acoustic startle demo
- Zebrafish hunting assay demo
- Zebrafish predator fear task demo
About the stimuli and behaviours
Through this project, I learned about a range of rodent and zebrafish behaviours and the stimuli used to study them.
Some stimuli trigger similar physiological responses across species. For example, a looming visual stimulus mimics an approaching predator and triggers a escape response in zebrafish and defensive behaviours in mice.
The same is true for the optomotor assay. In free-swimming zebrafish, it elicits a reflective swimming towards the direction of motion, and if shown 360º around a restrained fish, it becomes an optokinetic assay driving directive fictive swimming. The same separation applies to mice, with free-moving mice being tested in optomotor assays and head-fixed in optokinetic assays.
The startle response, triggered by loud noise, vibration, or bright light, is also conserved across species. This demo follows a mice protocol that uses white noise and also tests prepulse inhibition: the reduction in startle response when a softer acoustic stimulus precedes it, which is a proxy for the ability to filter irrelevant sensory information. Zebrafish also experience startle responses (they take a C-bend body shape) and prepulse inhibition, so this demo can easily be adapted for them.
Other behaviours are more species-specific. Zebrafish larvae naturally hunt paramecia, so free-swimming hunting behaviour can be studied by feeding them while recording. However, many experiments (imaging, electrophysiology, optogenetics) require restrained larvae. Since zebrafish respond to small moving dots with a hunting response, this can be used to study hunting behaviour in restrained larvae. I have replicated this hunting assay in this PsychoPy demo.
In addition, zebrafish are preyed upon by the Indian leaf fish, and showing its image can elicit a fear response. I have created a demo of this aversive response, found here, based on a follow-up study.
Have a go!
You can download the demos, modify them as needed, and run them in your own setup. Let us know if you have any questions or suggestions! We are always available in Discourse.
You can also create your own animal behaviour experiments and make them available to the rest of the users to help the scientific community. A few months ago we ran a workshop on how to create experiments for rodent learning; you can find its openly available material here. Have fun!