You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm trying to produce a heatmap from an EyeTribe data file. The data seems to load and parse correctly, but gazeplotter.draw_heatmap keeps throwing TypeErrors.
import eyetribereader, gazeplotter, detectors
sub = eyetribereader.read_eyetribe("**********/subject-502.tsv", "start_trial", "stop_trial")
t = sub[15]
fixations = detectors.fixation_detection(t['x'], t['y'], t['time'])
gazeplotter.draw_heatmap(fixations[1], (1280, 1024))
In Python 2.7.13, this results in:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gazeplotter.py", line 227, in draw_heatmap
heatmap[y:y+gwh,x:x+gwh] += gaus * fix['dur'][i]
TypeError: slice indices must be integers or None or have an __index__ method
And in Python 3.6.0, it gives:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "************/PyGazeAnalyser/pygazeanalyser/gazeplotter.py", line 199, in draw_heatmap
heatmap = numpy.zeros(heatmapsize, dtype=float)
TypeError: 'float' object cannot be interpreted as an integer
Can you tell what I'm doing wrong? I'm on Arch Linux, with matplotlib 2.0.0 and numpy 1.12.0.
The text was updated successfully, but these errors were encountered:
I have the same problem with Python 2.7.14, Matplotlib 2.0.2 and Numpy -1.13.3, running on Windows 10.
do you fix it ?
My script perfectly draw scanpath, fixation and raw data from the same package...
Only with the heatmap there is problem
Traceback (most recent call last):
File "C:\Users\Inf-CG\Documents\eye-tracker\probe.py", line 38, in
draw_heatmap(Efix, scrsize,imagefile='lecture.jpg',durationweight=True,alpha=0.5,savefilename=os.path.dirname(file))
File "C:\Users\Inf-CG\Documents\eye-tracker\gazeplotter.py", line 227, in draw_heatmap
heatmap[y:y+gwh,x:x+gwh] += gaus * fix['dur'][i]
TypeError: slice indices must be integers or None or have an index method
Hello! I'm trying to produce a heatmap from an EyeTribe data file. The data seems to load and parse correctly, but
gazeplotter.draw_heatmap
keeps throwing TypeErrors.In Python 2.7.13, this results in:
And in Python 3.6.0, it gives:
Can you tell what I'm doing wrong? I'm on Arch Linux, with
matplotlib
2.0.0 andnumpy
1.12.0.The text was updated successfully, but these errors were encountered: