FISCHER LAB
DEPARTMENT OF PSYCHOLOGICAL & BRAIN SCIENCES
JOHNS HOPKINS UNIVERSITY
125 AMES HALL
3400 NORTH CHARLES ST.
BALTIMORE, MD 21218

Below is MATLAB code needed in a script/function file in order to get eye position and pupil area from Eyelink.

(Note: Follow the instructions on the "Installing Eyelink" page, if you want to use your laptop as the Display PC, aka, run experiments from your laptop).

For more (and better!) information about the code and functions:

  • type help and then the function name in the command window.

  • play around with some demos

    • Go to this path on MATLAB: PsychToolbox>PsychHardware> EyelinkToolbox>EyelinkDemos

    • Select one of the folders (probably not notOSXed)

    • Run one of the m-files

    • If you come across an error make sure MATLAB is in the actual folder where the m-file is (if it isn't it might be trying to load an image that "doesn't exist" because it's not in your path)

  • visit this website: http://docs.psychtoolbox.org/Eyelink

All the scripts below are in this MATLAB file: eyelinkCodes.m

An example of how this code is incorporated in an actual script: 

eyetrackerpupil.m

 

Highly recommended: read explanation for the code on this PAGE.

Basic Eyelink Code