PyGaze
The open-source toolbox for eye tracking

PyGaze - documentation - examples

On this page you will find examples of software that is created using PyGaze. A brief explanation and a download link is provided for each example. The download is a simple zip archive that contains all of the scripts and resources (think of images, sounds, text files, a maiden's blood etc.). Feel free to rip off and modify everything you find below. Also, if you have a really cool experiment, please share!

contents

annoying message
simple tracker experiment
forced retinal location
shooting game
slide show
share

annoying message

This is a good example if you're looking for something really simple. It shows you how to use Display and Screen objects. The most rewarding part is the utter agony you bestow upon your colleagues when you show the example (warning: screen flickers fast, don't use on epileptics!).

annoying_message.zip

simple tracker experiment

The simple tracker experiment is a fully functional experiment that uses almost every basic class PyGaze has to offer. If you're new at using PyGaze and you're eager to learn how to set up your own experiment, this would be a very good place to start!

simple_tracker_experiment.zip

forced retinal location

A forced retinal location is a cutout through which stimuli are visible (outside of the cutout, the display is blurred). The FRL is a really nifty tool, and a very good example of how gaze contingent paradigms can be used in research (see this paper by Lignau, Schwarzbach, and Vorberg from 2008). In our example, we show a couple of screenshots through a central FRL. If you want to drive yourself (and/or some innocent victim) really nuts, set the FRL location to an eccentric one (e.g. 'topleft') and set the FRL distance to a rather high number.
NOTE: the FRL works via PsychoPy's Aperture class, which does not work on some systems. The solution is rather easy: switch to a PyGame disptype.

frl_reading.zip

shooting game

Eye tracking research does not have to be boring! A demo we often use at Utrecht University, is a simple gaze-based shooting game. Players aim by simply looking at the screen, and shoot by pressing the space bar. The screen flashes green if the yellow target is hit, or red when it is missed, while the score is continuously updated. You can even start a competition among friends and/or colleagues, since the game stores and updates high scores!

shooting_game.zip

slide show

This experiment is really simple: it shows an image, while recording gaze data. Despite its simplicity, you can do very interesting research with it! An analysis script, using the PyGazeAnalyser, is also available. More information on both this experiment, and PyGazeAnalyser can be found here.

slideshow.zip
slideshow_analysis.zip

share

If you have an experiment (or any other piece of software) that you feel the world could benefit from, we would love to include in on our site! It would be a great help to all PyGaze users, and you would make our Hall of Fame! You can fill out our contact form, indicating that you wish to share your example with us. After that, we'll get in touch with you.

© copyright 2013-2014, Edwin S. Dalmaijer