pygama is a Python package for:
Check out the online documentation.
If you are using this software, consider citing!