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.
Install
With pip:
$ pip install fixationmodel
Usage
The data structure pointlist is used thoroughly. 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 = fixationmodel.fit(rawdata) >>> print(results) { 'centroid': [344.682, 200.115], 'mean_squared_error': 0.000166802 }
API
fixationmodel.fit(gazepointlist)
Parameter:
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.
fixationmodel.version
For developers
Use virtualenv:
$ virtualenv -p python3.5 fixationmodel-py $ cd fixationmodel-py $ source bin/activate ... $ deactivate
Testing
Follow instructions to install pyenv and then either run quick tests:
$ python3.5 setup.py 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
Versioning
License
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
Built Distribution
Hashes for fixationmodel-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03bb3d7ea2d6539bf746adcb0121fa8ad8916d3a7ac735b8ebec38a637e19286 |
|
MD5 | e328173a0206b3b6e45e1acc3613e57f |
|
BLAKE2b-256 | 1dcbc0319ba80588484020434651ed41179695584a5525d2c58f23f003c67960 |