Sanjay's eyelink data analysis tools
Tools to help analyse data from the eyelink eye tracker
Download functions from the whole library 'zip' file at the top of the matlib page.
EDF file (eyelink data file) - contains raw traces and events, encoded in internal binary format |
EDF2ASC - this is a DOS program that converts binary EDF files into ASCII (text) format (extension .asc) which is essentially a badly organised table of samples and events in time order. EDF2ASC appears only to work on older versions of Windows, or on the Eyelink PC itself. |
readEDFASC - my Matlab script that reads the ASC file into a MATLAB struct-array.
It will break down the data into trials if you have used 'start_recording' and 'end_recording'
in your task code.
s = readEDFASC('data.asc');If you specify an EDF file, the script will try to run EDF2ASC.EXE which should be on the DOS path. The resulting Struct-array has one element for each trial, and each trial i has fields:
|
viewSaccades - my Matlab script to display each trial's eye data, and allows you to mark / select them. If you provide event names, it will also display those events on the traces. |
snipSaccades - This script is quite complicated, but allows you to epoch pupil and
saccade data based on trial events. It can perform
|
Statistics! Aside from standard anova, I have written the following:
|
Pupil analysis pathway: example
Start with an EDF file for each subject. The EDF file should be run through "edf2asc", the converter provided by Eyelink, which results in an ASC file for each subject.
NC = 4; NS = 10; % number of subjects / conditions For i=1:NS % for each subject s=readEDFASC(‘file’) % load eye data c=load( condition_file{i} ) % load conditions P=snipSaccades(s, ‘startevent’, ‘endevent’, ‘pupil’, true, ...) mP(i,:,:) = groupMeans(P, c.conditions)’ End errorBarPlot(permute(mP,[1 3 2])) [~,p]=permutationOLS(reshape(mP,NC*NS,[]), kron(ones(1,NS),1:NC)’, CONTRASTS, kron(1:NS,ones(1,NC))’ ) |