ddetommaso / TobiiGlassesPySuite

A Python based software suite for designing eye-tracking studies with the Tobii Pro Glasses 2
GNU General Public License v3.0
14 stars 8 forks source link

Saccades #6

Closed geande closed 2 years ago

geande commented 2 years ago

First off, thank you for this extensive library.

I am curious if there is any functionality for measuring saccades. I see that some of the codebase has some notion of adding saccades, but I am wondering if you have any advice on how to actually extract saccades.

Cheers!

ddetommaso commented 2 years ago

Hi @geande,

in the current version of the suite there is not a method for extracting saccades but as you guessed correctly the base model already provides the method to add them.

A quick solution would be to add the saccades by modifying the method filter of the class FilterDT to add the event of a saccade whenever is detected following the dispersion threshold algorithm .

As you can see the method for adding a saccade is already present in https://github.com/ddetommaso/TobiiGlassesPySuite/blob/3150299e775a1f8e2e73bd0b010676d3c7234a6a/tobiiglasses/filters/models.py#L45

Alternatively to the DT algorithm, it's also possible to implement another class for filtering saccades based on other state-of-the-art algorithms.