{ "info": { "author": "Matias Gra\u00f1a, Enrique Toomey, Slava Kerner", "author_email": "matias@satellogic.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "Quaternions library\n===================\n\n[![Coverage Status](https://coveralls.io/repos/github/satellogic/quaternions/badge.svg)](https://coveralls.io/github/satellogic/quaternions)\n[![Build Status](https://travis-ci.org/satellogic/quaternions.svg?branch=add_travis_ci)](https://travis-ci.org/satellogic/quaternions)\n\nThis is a library for dealing with quaternions in python in a unified way.\n\nTo install it:\n\n```bash\n$ pip install satellogic_quaternions\n```\n\nExamples of code:\n\n```python\nIn [1]: from quaternions import Quaternion\n\nIn [2]: q1 = Quaternion(1, 2, 3, 4)\n\nIn [3]: q2 = Quaternion(2, 3, 5, 8)\n\nIn [4]: q1 + q2\nOut[4]: Quaternion(3, 5, 8, 12)\n\nIn [5]: q1 * q2\nOut[5]: Quaternion(-51, 3, 15, 15)\n\nIn [6]: q1 / q2\nOut[6]: Quaternion(0.53921568627450989, 0.049019607843137247, -0.029411764705882353, 0.0098039215686274439)\n\nIn [7]: print(q1)\n(1+2i+3j+4k)\n```\n\n~~Most of~~ all the quaternions we use are unitary (not like the example above)\n\n```python\nIn [8]: q1.is_unitary()\nOut[8]: False\n\nIn [9]: q1 / q1.norm()\nOut[9]: Quaternion(0.18257418583505536, 0.36514837167011072, 0.54772255750516607, 0.73029674334022143)\n\nIn [10]: q1 /= q1.norm()\n\nIn [11]: q1.is_unitary()\nOut[11]: True\n```\n\nUsually, quaternions are used for rotating vectors. This is done with `numpy`:\n```python\nIn [12]: q1.matrix\nOut[12]:\narray([[-0.66666667, 0.66666667, 0.33333333],\n [ 0.13333333, -0.33333333, 0.93333333],\n [ 0.73333333, 0.66666667, 0.13333333]])\n\nIn [14]: q1.matrix.dot([2, 3, -4])\nOut[14]: array([-0.66666667, -4.46666667, 2.93333333])\n\nIn [16]: q1.matrix.dot([1, 0, 0])\nOut[16]: array([-0.66666667, 0.13333333, 0.73333333])\n```\n\nA unitary quaternion matrix is unitary. The inverse is the transpose and it is also the\nmatrix of the inverse quaternion. And the inverse quaternion of a unitary quaternion is\nthe conjugate:\n\n```python\nIn [17]: q1.conjugate()\nOut[17]: Quaternion(0.18257418583505536, -0.36514837167011072, -0.54772255750516607, -0.73029674334022143)\n\nIn [18]: q1\nOut[18]: Quaternion(0.18257418583505536, 0.36514837167011072, 0.54772255750516607, 0.73029674334022143)\n\nIn [19]: q1 * q1.conjugate()\nOut[19]: Quaternion(0.99999999999999978, 0.0, 0.0, 0.0)\n\nIn [20]: q1.conjugate().matrix\nOut[20]:\narray([[-0.66666667, 0.13333333, 0.73333333],\n [ 0.66666667, -0.33333333, 0.66666667],\n [ 0.33333333, 0.93333333, 0.13333333]])\n```\n\nLicense\n=======\n\nquaternions is Satellogic SA Copyright 2017. All our code is GPLv3 licensed.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "satellogic-quaternions", "package_url": "https://pypi.org/project/satellogic-quaternions/", "platform": "", "project_url": "https://pypi.org/project/satellogic-quaternions/", "project_urls": null, "release_url": "https://pypi.org/project/satellogic-quaternions/0.1.5/", "requires_dist": [ "numpy", "hypothesis; extra == 'dev'" ], "requires_python": "", "summary": "This is a library for dealing with quaternions in Python in a unified way.", "version": "0.1.5" }, "last_serial": 3811125, "releases": { "0.1.3.dev0": [ { "comment_text": "", "digests": { "md5": "54fe574673525e6ab67fa5252d343838", "sha256": "fd0bb88721424cc10375d9af66f0d20d8481c5b56413ec2c4c6236c194ad3558" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.3.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "54fe574673525e6ab67fa5252d343838", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8548, "upload_time": "2017-11-08T20:20:55", "url": "https://files.pythonhosted.org/packages/2e/73/364a9e642718619be4bb06db14c6cab62fa75685d376d11196438c39c463/satellogic_quaternions-0.1.3.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c49505a812578cfae5252587d8dc09f1", "sha256": "2f525aa28cd88f1e90b4e8a7415d7e3072d3f49188d9a053764af0d0a7dd61c5" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.3.dev0.tar.gz", "has_sig": false, "md5_digest": "c49505a812578cfae5252587d8dc09f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6125, "upload_time": "2017-11-08T20:20:58", "url": "https://files.pythonhosted.org/packages/10/67/8a3dbb5d0b89e5d154805ee96a9b76bd406e91f30c9b3392354911ff546f/satellogic_quaternions-0.1.3.dev0.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "4ccc1b4696e265ff13fd3e096639097f", "sha256": "5ce6f435b4817e37c9d0296ee6667664fe41febc4e65fac50d2af1527848bcd3" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "4ccc1b4696e265ff13fd3e096639097f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9993, "upload_time": "2017-11-25T20:13:31", "url": "https://files.pythonhosted.org/packages/d1/34/91cce0c3c551c6c0edfbea24ab19ccce60bb09fb69f95735d3c66cbdf828/satellogic_quaternions-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c110538baba6d55a1b1e7fd3ac659a8f", "sha256": "409a17a033b6bc62bfa3d9f92c520495a3f173ed6cd6d2f1fbe537c631e27f69" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.4.tar.gz", "has_sig": false, "md5_digest": "c110538baba6d55a1b1e7fd3ac659a8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7217, "upload_time": "2017-11-25T20:13:32", "url": "https://files.pythonhosted.org/packages/68/8e/bd4e0c1051aeba9713bbe2494d79ab3585c382b8d57a99a381d7e3a5a45c/satellogic_quaternions-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "092838d42d4ff7d3a5d95eea96a0dc04", "sha256": "de8cff624ecac838153a3524ca75ea9e3d928075961c90532e4ef57d97ada7f9" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "092838d42d4ff7d3a5d95eea96a0dc04", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11297, "upload_time": "2017-11-29T18:25:49", "url": "https://files.pythonhosted.org/packages/d6/05/d25da5854db4a049e8b7e035757d1e727b8e9f4c270ead170273fae6b89d/satellogic_quaternions-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5c3cdcf43d11ef3304a111511bd85c6", "sha256": "ccfe83877927da955609e07efc007763f597e758c1a5dfe17fbaee977a983b88" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e5c3cdcf43d11ef3304a111511bd85c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9062, "upload_time": "2017-11-29T18:25:50", "url": "https://files.pythonhosted.org/packages/ec/94/31d4422c59d7f83ffd2af190612b8cfdfac2c521ad5ea125b8e1165c8a4f/satellogic_quaternions-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "092838d42d4ff7d3a5d95eea96a0dc04", "sha256": "de8cff624ecac838153a3524ca75ea9e3d928075961c90532e4ef57d97ada7f9" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "092838d42d4ff7d3a5d95eea96a0dc04", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11297, "upload_time": "2017-11-29T18:25:49", "url": "https://files.pythonhosted.org/packages/d6/05/d25da5854db4a049e8b7e035757d1e727b8e9f4c270ead170273fae6b89d/satellogic_quaternions-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5c3cdcf43d11ef3304a111511bd85c6", "sha256": "ccfe83877927da955609e07efc007763f597e758c1a5dfe17fbaee977a983b88" }, "downloads": -1, "filename": "satellogic_quaternions-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e5c3cdcf43d11ef3304a111511bd85c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9062, "upload_time": "2017-11-29T18:25:50", "url": "https://files.pythonhosted.org/packages/ec/94/31d4422c59d7f83ffd2af190612b8cfdfac2c521ad5ea125b8e1165c8a4f/satellogic_quaternions-0.1.5.tar.gz" } ] }