Casting issues with anaylising data from EyeLink(numpy and gazeplotter.py error)
I'm trying to run analysis from an EyeLink file that has been converted from .edf to .asc. I'm using analysis.py found here https://github.com/esdalmaijer/PyGazeAnalyser , if anybody is familiar. I had previously used this to run analysis on data gotten from using an EyeTribe, which worked fine. I've edited parts of the analysis.py script to work with EyeLink. However, when I go to run the script, I get the following error:
cannot cast ufunc add output from dtype('float32') to dtype('uint8')
This points to line 402 in gazeplotter.py which reads:
screen[y:y+h,x:x+w,:] += img
Looking around online it seems that numpy became more strict on implicit casting and no longer allows casts between floating points and integers. I've tried downgrade to older numpy versions but that's sprang up different problems. There seems to be a number of solutions online, and I think I need to edit gazeplotter.py in some way but I'm not quite sure how.
Apologies if this isn't specific enough. If anybody has used PyGazeAnalyser on EyeLink data and encountered the same I'd love to hear from you.