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!annoying message
simple tracker experiment
forced retinal location
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!).
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!
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.
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!
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.
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.