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
670 stars 211 forks source link

OpenGaze, implementation of blink data and get_sample methods #176

Open DerickALagunes opened 7 months ago

DerickALagunes commented 7 months ago

I have modified the opengaze.py to implement the new blink data from the GazePoint API changes in 2015:

Refer to this post: https://www.gazept.com/blog/analysis/gazepoint-analysis-v3-0-0-blink-tracking/

I added the data header for: 'BKID', 'BKDUR' & 'BKPMIN'

And the class method "enable_send_blink" which sends the signal to retrieve Blink data from the GazePoint API. This method is also called at the end of the constructor by default but can be controlled too.

I have also implemented a "get_sample" method by using a list variable "_data_stream" created in the constructor, the list appends the lines created at the _log_sample method, this funtionalyty can be turn on by the user at the constructor with a boolean value "data_stream"

Hope this functionality is uselful for researchers, it was for me because i had to make use of blink metrics.