See video demo of fixCont.py on YouTube
py_stimuli is an iohub eye-tracking/joystick-compatible movie player.
Presentation of movies can be contingent on central fixation. Currently, setup for an EyeLink(C) 1000 Desktop System. To use a different eye tracker implementation, change the iohub_tracker_class_path and eyetracker_config dict script variables.
Currently, loading raw (uncompressed) videos, future versions should read compressed movies-
video: H.264 compressed,
audio: Linear PCM
Ideally, the included fonts should be installed (placed in ~/.fonts).
These scripts make use of the following toolboxes:
Psychopy http://www.psychopy.org/
- requires recent version that includes visual.MovieStim3() module, (which relies on MoviePy).
PyGaze http://www.pygaze.org/
Proprietary tools:
PyLink (for use of EyeLink eyetracker) http://www.psychopy.org/api/hardware/pylink.html
PyGame - http://www.pygame.org/
Xbox Controller - Depends on Xbox 360 controller support for Python (xbox.py - Steven Jacobs) https://github.com/FRC4564/Xbox
Parallel port output - Current stimulus ID (in binary form) provided via parallel port, accessed using PyParallel library https://github.com/pyserial/pyparallel (see tutorial)
Log file - .csv file summarizing stimulus presentation order and behavioral response for each trial (including reaction time).
- Defines constant variables for each experiment (e.g. display size).
- Script for executing actual experiment.
Python for Experimental Psychologists by Edwin S. Dalmaijer
Making Games with Python & Pygame by Al Sweigart
Created by Dr Adam Jones
Department of Neurosurgery,
University of Iowa,
Iowa City IA, USA