PsychoPy2: Experiments in behavior made easy.

Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. · 2019

Read PsychoPy2: Experiments in behavior made easy. by Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. (2019) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/europmc-pmc6420413.txt.

Introduction

Peirce and co-authors describe PsychoPy2 in Behavior Research Methods. PsychoPy is a tool for building behavior experiments with exact timing. It has grown over ten years into a standard for psychology and neuroscience labs.

Users can write experiments in Python or build them with a graphical Builder. Builder lets researchers with little coding still run precise studies. New features include more stimulus types and better hardware timing. The tool also backs open science, with sharing and reproducibility built in. The authors present it as a bridge between ease and control.

Catalog record

CREATORPeirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK.
YEAR2019
COLLECTIONPAPERS
FORMATTXT
FILE SIZE41 KB
LICENSECC BY 4.0
RIGHTSCC BY
SOURCEEurope PMC

Source: https://europepmc.org/articles/PMC6420413

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

PsychoPy2: Experiments in behavior made easy By Jonathan Peirce, Jeremy R. Gray, Sol Simpson, Michael MacAskill, Richard Höchenberger, Hiroyuki Sogo, Erik Kastman, Jonas Kristoffer Lindeløv Published in: Behavior Research Methods DOI: 10.3758/s13428-018-01193-y ABSTRACT PsychoPy is an application for the creation of experiments in behavioral science (psychology, neuroscience, linguistics, etc.) with precise spatial control and timing of stimuli. It now provides a choice of interface; users can write scripts in Python if they choose, while those who prefer to construct experiments graphically can use the new Builder interface. Here we describe the features that have been added over the last 10 years of its development. The most notable addition has been that Builder interface, allowing users to create studies with minimal or no programming, while also allowing the insertion of Python code for maximal flexibility. We also present some of the other new features, including further stimulus options, asynchronous time-stamped hardware polling, and better support for open science and reproducibility. Tens of thousands of users now launch PsychoPy every month, and more than 90 people have contributed to the code. We discuss the current state of the project, as well as plans for the future. Computers are an incredibly useful, almost ubiquitous, feature of the modern behavioral research laboratory, freeing many scientists from the world of tachistoscopes and electrical engineering. Scientists have a large range of choices available, in terms of hardware (e.g., mouse vs. touchscreen) and operating system (Mac, Windows, Linux, or mobile or online platforms), and they no longer need to have a degree in computer science to make their experiment run with frame-by-frame control of the monitor. A wide range of software options are also available for running experiments and collecting data, catering for various needs. There are commercial products, such as E-Prime (Psychology Software Tools Inc., Sharpsburg, PA, USA), Presentation (Neurobehavioral Systems Inc., Berkeley, California, USA), Experiment Builder (SR Research Ltd., Canada), and Psykinematrix (Kybervision, LLC, Japan). A relatively new possibility, however, has been the option to use free open-source products, provided directly by academics writing tools for their own labs and then making them freely available to others. The most widely used example, to date, began as a set of C routines, called VideoToolbox, written by Denis Pelli, initially to carry out studies in vision science (Pelli, 1997). David Brainard wrote MATLAB wrappers around the VideoToolbox library, with some additional pure MATLAB code, and called the package Psychophysics Toolbox (Brainard, 1997). This has now gone through several iterations and substantial rewriting, especially by Mario Kleiner in the most recent version, Psychtoolbox 3 (Kleiner, Brainard, & Pelli, 2007). Psychtoolbox shows how successful these projects can be. After 20 years, it is still in active development and has been used extensively in research. It also shows how popular the open-source movement has become; in 2004, the Psychophysics Toolbox article (Brainard, 1997) received 123 citations (according to Google Scholar), whereas in 2018 it received 1,570. Open-source packages have several attractive features beyond being free. Having access to all the source code means that a scientist can examine what is happening “under the hood” and can extend or adapt the code themselves if the package does not already have the features or performance they need. Most open-source packages are written in high-level interpreted languages, typically MATLAB or Python. This has made it relatively easy to provide support for all platforms, so the scientist can develop and run the same study on any machine. Most important to many people, however, is the principle of openness and the sense that this is good practice for replicable research. In terms of the choice of available scripting languages, while there are again many options (e.g., R, MATLAB, Mathematica, or Java), Python is one of the most popular languages in the world at the time of writing. The PopularitY of Programming Language project (PYPL) has analyzed Google searches for programming tutorials and found that over 25% of searches are for Python tutorials, as compared with 2.5% for MATLAB and 4% for R (see http://pypl.github.io/PYPL.html for up-to-date statistics). Python is so useful as a scripting language that MacOS and many flavors of Linux provide it as standard in their operating systems. That popularity means that the language receives a great deal of support from hardware manufacturers and programmers from all spheres. The PsychoPy project began in 2002, as a Python library to conduct visual neuroscience experiments in Jonathan Peirce’s lab. It developed a small following of Python enthusiasts in the field, and gradually it grew to provide further stimuli and features (Peirce, 2007, 2009). At that point, PsychoPy provided a useful set of stimuli and methods and a basic editor with which to write code, but it required users to program their experiments, which made it inaccessible to nonprogrammers, including most undergraduate psychology students. The question was how to enable nonprogrammers to use PsychoPy. Ideally, the package should be accessible enough for typical undergraduates in psychology (who are often quite averse to programming), while also offering the flexibility required for professional researchers to build a range of precise experiments. This led to the addition of a graphical experiment creation interface called the Builder, the defining feature in the development of PsychoPy2. In addition to the Builder, which freed users from the need to be computer programmers, a large number of improvements and new features have been added. Additionally, PsychoPy has adopted a more robust development and testing workflow and has benefited from the growth of a supportive online community. With the bulk of that phase of development now complete—the Builder interface has become a relatively stable tool and has shown itself capable of running a wide range of studies—this article provides a brief summary of the features and changes that have come about over the last 10 years of development of PsychoPy. It is beyond the scope of this article to teach readers how to use the software. For that there are numerous didactic resources available, such as YouTube videos (e.g., https://www.youtube.com/playlist?list=PLFB5A1BE51964D587), the demo menus that are built into the application, the extensive online documentation at http://www.psychopy.org, and even a textbook (Peirce & MacAskill, 2018). OTHER PACKAGES At the time that the core PsychoPy library was written, the other comparable packages were Vision Egg (Straw, 2008) and PyEPL (Geller, Schlefer, Sederberg, Jacobs, & Kahana, 2007), both of which subsequently ceased development. Since 2008, numerous additional libraries have been created in Python, such as Expyriment (Krause & Lindemann, 2014), PyGaze (Dalmaijer, Mathôt, & Van der Stigchel, 2014), mPsy (https://wisions.github.io/mPsy/), and SMILE (http://smile-docs.readthedocs.io/). In comparison to these, PsychoPy offers a broader list of stimulus options, experimental designs, response options (such as rating scales), and hardware support, as well as a larger community of active developers. Most critically, however, the other libraries do not offer a graphical interface to create studies, which limits their suitability for undergraduate teaching. Another Python-based application, OpenSesame (Mathôt, Schreij, & Theeuwes, 2012), was, however, developed around the same time as the PsychoPy Builder interface. PsychoPy and OpenSesame remain, to our knowledge, the most versatile open-source experiment-building packages currently available, and we compare them in the following section. There was also an open-source Macintosh application called PsyScopeX (http://psy.ck.sissa.it/ ), buCupdate since 2015. BUILDER The idea

Read the complete text