Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Pygaze Analyser Empty Fixations & Saccades (Opengaze)


I've been trying to figure out the pygaze analyser and from looking around on the forum I've managed to get this far:

from pygazeanalyser.opengazereader import read_opengaze
from pygazeanalyser.gazeplotter import draw_heatmap
from pygazeanalyser.gazeplotter import draw_scanpath

theData = read_opengaze("C:\Users...filepath...\data.tsv", "START_TRIAL")
fixations = theData[0]['events']['Efix']
saccades = theData[0]['events']['Esac']
display = [1024, 768]
imageFile = "C:\Users...filepath...\image.jpg"

draw_heatmap(fixations, dispsize=display, imagefile=imageFile, durationweight=True, alpha=0.5, savefilename="C:\Users...filepath...\Heatmap")
draw_scanpath(fixations, saccades, dispsize=display, imagefile=imageFile, alpha=0.5, savefilename="C:\Users...filepath...\Scanpath")

Running this returns the image with no errors, but there is no heatmap or scanpath on the images. (The heatmap is tinted blue but no actual results on it). In the variable explorer I've noticed fixations and saccades are both empty, is there a step I'm missing? Also, running read_opengaze alone and looking at the results I see an array for trackertime, time, y, x, and size. 'msg' has values in it as well, and 'Sfix' has a single value. Efix, Eblk, Sblk, Esac, Ssac, are empty. I have tried various data files but they seem to give similar results.

Eyetracking data is from opengaze and I'm running this on Spyder.

Thanks in advance!


  • Hi Brandon,

    I'm not all that familiar with the pygaze analyzer, but I think you select only the first trial/fixation of your data (with [0] you index the first item only)

    If you only have a single fixation, you won't see much in the heatmap and the scanpath will also be rather short. So, what happens if you select all data?

    Again, I don't know any of these functions, so maybe this doesn't make any sense.


Sign In or Register to comment.