Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A least-squares offline method to test if tracked gaze points resemble a fixation

Project Description

A least-squares offline method to test if tracked gaze points resemble a fixation.

1. Install

With pip:

$ pip install fixationmodel

2. Usage

A data structure we call pointlist is used for point sequences. It is a list of points, where each point is a list [x, y].

The usage is simple:

>>> import fixationmodel
>>> rawdata = [
    [130.012, 404.231],
    [129.234, 403.478],
    [None, None],
    [133.983, 450.044],
>>> results =
>>> print(results)
    'centroid': [344.682, 200.115],
    'mean_squared_error': 0.000166802

3. API



  • gazepointlist: a list of [x, y] points i.e. a list of lists.

Return dict with following keys:

  • centroid: a list [x, y], the most probable target of the fixation
  • mean_squared_error: the average squared error for a point.

3.2. fixationmodel.version

Gives the current version string:

>>> fixationmodel.version

4. For developers

4.1. Virtualenv

Use virtualenv:

$ virtualenv -p python3.5 fixationmodel-py
$ cd fixationmodel-py
$ source bin/activate
$ deactivate

4.2. Testing

Follow instructions to install pyenv and then either run quick tests:

$ python3.5 test

or comprehensive tests for multiple Python versions in tox.ini:

$ pyenv local 2.6.9 2.7.10 3.2.6 3.3.6 3.4.3 3.5.0
$ eval "$(pyenv init -)"
$ pyenv rehash
$ tox

4.3. Publishing to PyPI

Follow python packaging instructions:

  1. Create an unpacked sdist: $ python sdist
  2. Create a universal wheel: $ python bdist_wheel --universal
  3. Go to PyPI and register the project by filling the package form by uploading fixationmodel.egg-info/PKG_INFO file.
  4. Upload the package with twine:
    1. Sign the dist: $ gpg --detach-sign -a dist/fixa...0.1.2*
    2. Upload: twine upload dist/fixa...0.1.2* (will ask your PyPI password)
  5. Package published!

Updating the package takes same steps except the 3rd.

6. License

MIT License

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.5 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Dec 9, 2015
(4.4 kB) Copy SHA256 Hash SHA256
Source None Dec 9, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting