Skip to main content

A library for classifying raw eye gaze data into discrete events like saccades and fixations.

Project description

pyfixation is a Python package for classifying raw eye gaze data into discrete events like saccades and fixations. This package can be used online in real-time or offline after data has been collected.

Algorithms

  • DispersionFP implements standard I-DT algorithm.

  • VelocityFP uses a Savitzky-Golay filter to calculate velocity.

Examples

Here’s a basic example of how to use the dispersion based algorithm:

from pyfixation import DispersionFP

px_per_mm = 3.55

fp = DispersionFP( px_per_mm, sample_rate = 500 )

f = open( 'gazedata.txt', 'r' )
for line in f.readlines():
        gaze_found, gaze_x, gaze_y = map( float, line.split( '\t' ) )
        print fp.detect_fixation( gaze_found, gaze_x, gaze_y )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyFixation-0.3.1.tar.gz (7.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page