Abstract

Building Experiments in PsychoPy by Peirce and MacAskill is essential reading for anyone starting out creating computer-based experiments using PsychoPy. PsychoPy is a collection of Python libraries (Peirce, 2007, 2009), which began life as a means for its inventor (Jonathan Peirce) to display Gabor patches. An open source project, PsychoPy has evolved far beyond its original purpose, to the point where it can now interact with a variety of different hardware devices (e.g., eye-trackers, button boxes) and produce online web-based experiments. So, the time is ripe for a manual that gently guides the reader through from beginner to professional and ultimately to discovering the specialist applications of PsychoPy.
The book is divided into three sections. The first section, For the Beginner, introduces the reader to the graphical interface (the Builder View) and has them creating a perfectly usable Stroop task within about 15 minutes of first picking up the book. The apparent simplicity of this initial foray into PsychoPy soon gives way to more complex tasks like masking images, providing feedback to participants using Python code, and tracking mouse location in a visual search task. Whilst the aim of the book is not to teach the reader Python programming, where code is used it is fully explained, allowing for an intuitive understanding of how it helps achieve the desired effect.
In the second section, the reader moves on to becoming a Professional PsychoPy user. The book now builds upon earlier chapters describing the reasons why you might want randomisation and counterbalancing in your studies, implemented through nested loops, to discuss more complicated randomisation schemes. It provides an in-depth description of the colour space and coordinate systems used for presenting visual stimuli, plus an extensive discussion of why it is important to use frame-based timing (each monitor refresh is a new frame) for ultimate accuracy. Given the authors’ backgrounds in visual psychophysics and saccadic eye movement research, they can be forgiven for spending time discussing the merits of photometers and digital light processing projectors for optimal stimulus delivery. Indeed, these sections expose the reader to the type of considerations that become essential when wanting to accurately deliver visual stimuli.
The final section, For the Specialist, covers a wide range of topics with a focus on visual stimuli. However, non-vision scientists should not be put off as the examples contain many transferrable skills, for example, staircase threshold determination, which has application across a wide range of sensory modalities outside of vision. The chapters on using PsychoPy in fMRI and EEG experiments are good starting points, which deal with critical features like trigger detection through network communication or parallel ports, but unfortunately do not provide details on how PsychoPy interacts with other hardware, for example, button boxes, stimulation devices, which are frequently part of such studies. One other notable omission is a chapter dealing with PsychoPy’s ability to produce web-based experiments, though that topic could probably occupy an entire book.
Throughout Building Experiments in PsychoPy, Peirce and MacAskill make use of real-world examples that enable the reader to not only get to grips with PsychoPy but also to see how it can be used to implement computerised tasks like those examining the big-five personality constructs, using data from open source repositories. Such examples illuminate what could otherwise be a relatively dry subject matter, demonstrating how it is possible to create your own experiments and start collecting data in a relatively short amount of time. However, it also covers the nuances around stimulus delivery, allowing novice PsychoPy users to deliver experimental designs that provide reliable data. The book is extremely well written and an excellent resource for learning about, and teaching others to use, PsychoPy.
