Software tools to manage and analyze gaze data from eye-trackers
Project description
The Python package gazelib provides software tools to manage and analyze gaze data from eye-trackers.
Gazelib is developed at Infant Cognition Laboratory at University of Tampere.
1. Install
With pip:
$ pip install gazelib
2. Usage
3. API
The API provides the following methods:
add_key
border_violation
combine_coordinates
duration
first_gazepoints
first_gazepoints_by_time
gaze_inside_aoi
gaze_inside_aoi_percentage
gazepoints_after_time
gazepoints_containing_value
gazepoints_not_containing_value
get_key
get_value
group
group_lists
inside_aoi
interpolate_using_last_good_value
load_json
load_csv_as_dictlist
longest_non_valid_streak
mean_of_valid_values
median_filter
median_filter_data
replace_value
SRT_index
split_at_change_in_value
valid_gaze_percentage
version
write_json
write_fancy_json
4. For developers
Tips for the developers of the package.
4.1. Use Git
To develop, clone the repository from GitHub:
$ git clone https://github.com/infant-cognition-tampere/gazelib
Make changes to files, add them to commit, and do commit:
(edit README.rst) $ git add README.rst $ git commit -m "Improved documentation"
List files that are not added or not committed:
$ git status
Push local commits to GitHub:
$ git push
Ignore some files by editing .gitignore:
$ nano .gitignore
4.2. Virtualenv
Manage python versions and requirements by using virtualenv:
$ cd gazelib $ virtualenv -p python3.5 env $ source env/bin/activate ... $ deactivate
4.3. Testing
Follow instructions to install pyenv and then either run quick tests:
$ python3.5 setup.py test
or run comprehensive tests for multiple Python versions listed in tox.ini:
$ pyenv local 2.6.9 2.7.10 3.1.5 3.2.6 3.3.6 3.4.3 3.5.0 $ eval "$(pyenv init -)" $ pyenv rehash $ tox
Install new pyenv environments for example by:
$ pyenv install 3.5.0
Validate README.rst at http://rst.ninjs.org/
4.4. 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 gazelib.egg-info/PKG_INFO file.
Upload the package with twine:
Sign the dist: $ gpg --detach-sign -a dist/gazelib-1.2.3.tar.gz and $ gpg --detach-sign -a dist/gazelib-1.2.3-py2.py3-none-any.whl
Upload: twine upload dist/gazelib-1.2.3* (will ask your PyPI password)
Package published!
Updating the package takes same steps except the 3rd.
4.5 Version release
Change version string in gazelib/version.py and setup.py to '1.2.3'
Run tox tests. See 4.3. Testing.
Git commit: $ git commit --all -m "v1.2.3 release"
Create tag: $ git tag -a 1.2.3 -m "v1.2.3 stable"
Push commits and tags: $ git push && git push --tags
Publish to PyPI. See 4.4. Publishing to PyPI.
5. Versioning
6. License
Project details
Release history Release notifications | RSS feed
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 gazelib-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2eaf7d05c5e51d2f1a7f1f68682000974cf132d7b07d5a42a08b4653ff5b11b |
|
MD5 | 2c221e3550ae8d6518d934c4d208caad |
|
BLAKE2b-256 | 094eb243207f06407a1a1163d558650df482c35c3bc667f144a40d8ce8e1f488 |