Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heatmaps do not work #10

Open
anshvarts opened this issue Aug 19, 2017 · 2 comments
Open

heatmaps do not work #10

anshvarts opened this issue Aug 19, 2017 · 2 comments

Comments

@anshvarts
Copy link

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

@JARS29
Copy link

JARS29 commented Oct 5, 2017

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!

jfrey-xx added a commit to jfrey-xx/PyGazeAnalyser that referenced this issue Sep 6, 2018
@cdragicevic
Copy link

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)_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants