Talk Controlling the equipment of a vision laboratory with Python

Presented by Nora Umbach in Scientific track 2011 on 2011/08/28 from 14:00 to 14:30

Authors: Nora Umbach, Konstantin Sering, & Dominik Wabersich

Keywords: EyeOne Pro photometer, wasco multifunction card, color perception, psychopy, ctypes, achrolab

This talk shows how different needs in a vision laboratory can be met by a self-written Python module. In our case, this includes measuring and calibrating colors, store calibrations and run psychophysical experiments using these calibrated colors. We achieved to use all devices out of Python.

In our vision laboratory, we investigate the perceptual space of achromatic colors (colors ranging from white to black) using psychophysical experiments. The project started out with a vision laboratory, where hardware was already available, but the provided software did not fit our needs. Especially, we needed software that would allow us to control devices and conduct measurements in an automated way.

We wanted to use a single software to run all the equipment in the laboratory and all the stimulus presentations. We decided on using Python since it provides tools for all our needs: (1) We could present stimuli using PsychoPy. (2) We could use Python as an interface to control the photometer and the multifunction card that controls the voltage given to fluorescent tubes. We wrote two Python wrappers that load the runtime libraries (dlls) and give us a simple way to handle the full functionality of our devices.

We summarized all code in a Python module called achrolab that provides all the software we need to run the vision laboratory. The module consists of several classes and two submodules wasco and eyeone (Sering, Wabersich, & Umbach, 2011, this proceedings) that contain wrappers to handle the multifunction card controlling the fluorescent tubes (IODA-PCI12K4EXTENDED PCI 12 bit multifunction card with 4 analogous outputs) and the photometer (EyeOne Pro). achrolab uses the Python module psychopy. The code runs on Windows machines only, since drivers for the hardware are only available for Windows.

This talk shows how we approached controlling the equipment of our laboratory exclusively with Python. We started out with virtually no software and ended in having a module that wraps up all the software and is easy to handle. Experiences with running a laboratory with Python will be presented and discussed in a way to get a more general impression on how to approach this kind of problem for other laboratories as well.


Sering, K., Wabersich, D., & Umbach, N. (2011). Using non-Python supported devices for a vision lab out of Python. To be presented at EuroSciPy 2011, August 25-28, Paris, France