PyGaze an open-source toolbox for programming of eye-tracking experiments

Edwin S. Dalmaijer, Sebastiaan MathĂ´t, Stefan Van der Stigchel

The PyGaze toolbox is an open-source software package for Python, a high-level programming language. It is designed for creating eye-tracking experiments in Python syntax with the least possible effort, and offers programming ease and script readability without constraining functionality and flexibility. PyGaze can be used for visual and auditory stimulus presentation, for response collection via keyboard, mouse, joystick, and other external hardware, and for online detection of eye movements based on a custom algorithm.

Full Abstract – PDF

For a complete eye-tracking experiment, at least two external packages are required: one for communication with the eye-tracker and one for experiment processes. The latter is either PsychoPy (Peirce, 2007, 2009) or PyGame, whereas the former depends on a user’s preferred setup. Both PyGame and PsychoPy are complete libraries for controlling  computer displays, keyboards, mouses, joysticks, and other external devices, as well as internal timing. The main difference between the two is that PsychoPy supports hardware-accelerated graphics through OpenGL. In practice, this means that a great number of complicated stimuli, such as drifting Gabors, can be created within the time needed for a single frame refresh. In addition, PsychoPy retrieves millisecond-accurate information on the actual refresh time. This makes PsychoPy the package of choice for complex paradigms that require heavy processing or a high degree of temporal precision, e.g. dot motion displays. The drawback is that PsychoPy requires a graphics card that supports OpenGL drivers and multi-texturing (Peirce, 2007). This should not be a problem for most modern computers, but there are systems on which this functionality is not available; think of rather old computers or the Raspberry Pi. To provide support for these systems, non-OpenGL PyGame functions have been built into PyGaze as well. To switch between PyGame and PsychoPy, all a user has to do is change one constant

Click here for reuse options!
Copyright 2015 ECI Networks