Open anshvarts opened 7 years ago
Solved! You need to add int() into the line 227 of gazeplotter.py Instead: heatmap[y:y+gwh,x:x+gwh] += gaus * fix['dur'][i]
You should have: heatmap[int(y):int(y+gwh),int(x):int(x+gwh)] += gaus * fix['dur'][i]
It works for me!
I also have a problem with the function, though it is another error:
_/content/gazeplotter.py in draw_display(dispsize, imagefile) 408 # draw the image on the screen 409 screen[y:y+h,x:x+w,:] += img --> 410 # dots per inch 411 dpi = 100.0 412 # determine the figure size in inches
ValueError: operands could not be broadcast together with shapes (768,768,3) (768,1024,3) (768,768,3)_
It is the issue from ECEM workshop
File "/Applications/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile execfile(filename, namespace)
File "/Applications/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile builtins.execfile(filename, *where)
File "/Users/AShvarts/Documents/pyton/ECEMWorkshop/afternoon/analysis_mine.py", line 145, in
savefilename=plotpath)
File "pygazeanalyser/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