==========
PyFixation
==========

``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 )