fixationmodel-py
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 = fixationmodel.fit(rawdata)
>>> print(results)
{
'centroid': [344.682, 200.115],
'mean_squared_error': 0.000166802
}
3. API
3.1. 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.
3.2. fixationmodel.version
Gives the current version string:
>>> fixationmodel.version '1.2.3'
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 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
4.3. Publishing to PyPI
Follow python packaging instructions:
Create an unpacked sdist: $ python setup.py sdist
Create a universal wheel: $ python setup.py bdist_wheel --universal
Go to PyPI and register the project by filling the package form by uploading fixationmodel.egg-info/PKG_INFO file.
Upload the package with twine:
Sign the dist: $ gpg --detach-sign -a dist/fixa...0.1.2*
Upload: twine upload dist/fixa...0.1.2* (will ask your PyPI password)
Package published!
Updating the package takes same steps except the 3rd.
5. Versioning
6. License
Metadata
Release files for fixationmodel 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fixationmodel-0.1.3.tar.gz | 4.4 kB | Without provenance | Details for fixationmodel-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fixationmodel-0.1.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for fixationmodel-0.1.3-py2.py3-none-any.whl |
Total release size: 9.9 kB
Release files / fixationmodel-0.1.3.tar.gz
| Download URL | fixationmodel-0.1.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37ef50093d306a43c222d8a17d0ff04a0d0e7de2e503185de80fb57e750b4ea3
|
|
BLAKE2b-256 checksum How to use checksums |
f4c481d34e30f3a69f2612749d021590318cf3b487fc8626aa59f8ef74df3b27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / fixationmodel-0.1.3-py2.py3-none-any.whl
| Download URL | fixationmodel-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8d8b1fc86c2c14271229ef1777cd48885c03e4057326fb3ad261a62fe1902971
|
|
BLAKE2b-256 checksum How to use checksums |
84392507a65d8ed5f26d3757b73d43fd45535abec8b09ab031e78e33cf608c31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for fixationmodel 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.