Building Robust Neuroscience Experiments with Python and PsychoPy

Building Robust Neuroscience Experiments with Python and PsychoPy

Learn to build modular experiments with Python and PsychoPy using software engineering best practices like automated testing, data validation, and continuous integration.


Building Robust Neuroscience Experiments with Python and PsychoPy
Authors
Dr. Ole Bialas | Dr. Nicholas Del Grosso

This course provides an introduction to building and designing experiments with Python and the PsychoPy library. Going beyond mere scripting, you’ll learn how to create modular applications that are easy to understand, maintain and reuse. The course explores tools and best practices from sofware engineering like automated testing with PyTest, data validation with Pydantic, and continuous integration with GitHub Actions. While exploring several advanced topics, you don’t have to be a seasoned programmer or experimenter to get a lot out of this course!

Credits

Dr. Ole Bialas
Dr. Nicholas Del Grosso

Installation

To run the course materials on your own machine, it is recommended that you:

Download the pixi.toml file and install the environment:

pixi install --manifest-path pixi.toml
pixi shell

Download the environment.yml file and install the environment:

conda env create -f environment.yml
conda activate psychopy

Note that this environment only installs the basic Python dependencies and NOT Psychopy itself. For instructions on how to install Psychopy, the official website is the best resource: https://www.psychopy.org/download.html .

On Windows, you should be able to simply install the psychopy package from PyPI. On Linux however, there are a few additional steps required.