esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
671 stars 211 forks source link

implemented pupil_size() for libtobii #46

Closed scattenlaeufer closed 8 years ago

scattenlaeufer commented 8 years ago

I implemented pupil_size() for Tobii eye tracker. It follows the example of sample() in libtobii and the output is formated the same way it is in libeyelink.

smathot commented 8 years ago

Hi,

Thanks for these additions. The pupil_size() implementation should definitely go in (assuming that it works; I don't have a Tobii to check). But I'm not sure about the other functions. The problem is that all eye trackers should have the same API; that is, either all eye trackers should support eye_position_3d, gaze_position_3d, and gaze_vector (in which case BaseEyeTracker needs to be modified), or none of them should.

Personally, I think that these new functions are too Tobii-specific to be added to the API. @esdalmaijer, what do you think?

Cheers, Sebastiaan

scattenlaeufer commented 8 years ago

That all the stuff for gaze_vector() ended up in this pull request, was due to the fact that I didn't put that in its own branch. I fixed that and now only the implementation of pupil_size() is part of it.

At least on our machine this code works. Since I don't have access to more than this one machine, I am not able to test it properly on a bigger variety of Tobii machines. But since it only takes the values measured by the tracker itself out of Tobii's GazeDataItem there should be no problem using this code with every tracker using the Tobii SDK.

esdalmaijer commented 8 years ago

Thanks for that! Haven't had a Tobii for a while now, so I'm going by your word here ;)