{"id":20603536,"url":"https://github.com/galacticdynamics/coordinax","last_synced_at":"2025-10-20T07:04:29.205Z","repository":{"id":221914447,"uuid":"755708966","full_name":"GalacticDynamics/coordinax","owner":"GalacticDynamics","description":"Coordinates in JAX","archived":false,"fork":false,"pushed_at":"2025-09-04T23:23:12.000Z","size":2380,"stargazers_count":25,"open_issues_count":15,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-05T01:15:19.276Z","etag":null,"topics":["coordinate-systems","coordinate-transformation","coordinates","jax","multiple-dispatch","quax","reference-frames","vectors"],"latest_commit_sha":null,"homepage":"https://coordinax.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GalacticDynamics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-10T21:21:00.000Z","updated_at":"2025-08-18T22:33:15.000Z","dependencies_parsed_at":"2024-05-20T20:16:59.004Z","dependency_job_id":"66fcd129-0b52-4858-bf13-4e66b0d70546","html_url":"https://github.com/GalacticDynamics/coordinax","commit_stats":null,"previous_names":["galacticdynamics/vector","galacticdynamics/coordinax"],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/GalacticDynamics/coordinax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GalacticDynamics%2Fcoordinax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GalacticDynamics%2Fcoordinax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GalacticDynamics%2Fcoordinax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GalacticDynamics%2Fcoordinax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GalacticDynamics","download_url":"https://codeload.github.com/GalacticDynamics/coordinax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GalacticDynamics%2Fcoordinax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273992852,"owners_count":25203790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coordinate-systems","coordinate-transformation","coordinates","jax","multiple-dispatch","quax","reference-frames","vectors"],"created_at":"2024-11-16T09:17:43.229Z","updated_at":"2025-10-20T07:04:24.141Z","avatar_url":"https://github.com/GalacticDynamics.png","language":"Python","readme":"\u003ch1 align='center'\u003e coordinax \u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eCoordinates in JAX\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/coordinax/\"\u003e \u003cimg alt=\"PyPI: coordinax\" src=\"https://img.shields.io/pypi/v/coordinax?style=flat\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/coordinax/\"\u003e \u003cimg alt=\"PyPI versions: coordinax\" src=\"https://img.shields.io/pypi/pyversions/coordinax\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://coordinax.readthedocs.io/en/\"\u003e \u003cimg alt=\"ReadTheDocs\" src=\"https://img.shields.io/badge/read_docs-here-orange\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/coordinax/\"\u003e \u003cimg alt=\"coordinax license\" src=\"https://img.shields.io/github/license/GalacticDynamics/coordinax\" /\u003e \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/GalacticDynamics/coordinax/actions\"\u003e \u003cimg alt=\"CI status\" src=\"https://github.com/GalacticDynamics/coordinax/workflows/CI/badge.svg\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://coordinax.readthedocs.io/en/\"\u003e \u003cimg alt=\"ReadTheDocs\" src=\"https://readthedocs.org/projects/coordinax/badge/?version=latest\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/GalacticDynamics/coordinax\"\u003e \u003cimg alt=\"codecov\" src=\"https://codecov.io/gh/GalacticDynamics/coordinax/graph/badge.svg\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://scientific-python.org/specs/spec-0000/\"\u003e \u003cimg alt=\"ruff\" src=\"https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811\u0026color=%235CA038\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://docs.astral.sh/ruff/\"\u003e \u003cimg alt=\"ruff\" src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\" /\u003e \u003c/a\u003e\n    \u003ca href=\"https://pre-commit.com\"\u003e \u003cimg alt=\"pre-commit\" src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\" /\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nCoordinax enables calculations with coordinates in\n[JAX](https://jax.readthedocs.io/en/latest/). Built on\n[Equinox](https://docs.kidger.site/equinox/) and\n[Quax](https://github.com/patrick-kidger/quax).\n\n## Installation\n\n[![PyPI platforms][pypi-platforms]][pypi-link]\n[![PyPI version][pypi-version]][pypi-link]\n\n\u003c!-- [![Conda-Forge][conda-badge]][conda-link] --\u003e\n\n```bash\npip install coordinax\n```\n\n## Documentation\n\n[![Read The Docs](https://img.shields.io/badge/read_docs-here-orange)](https://coordinax.readthedocs.io/en/)\n\n## Quick example\n\n```python\nimport jax.numpy as jnp\nimport unxt as u\nimport coordinax as cx\n\nq = cx.CartesianPos3D(\n    x=u.Quantity(jnp.arange(0, 10.0), \"kpc\"),\n    y=u.Quantity(jnp.arange(5, 15.0), \"kpc\"),\n    z=u.Quantity(jnp.arange(10, 20.0), \"kpc\"),\n)\nprint(q)\n# \u003cCartesianPos3D: (x, y, z) [kpc]\n#     [[ 0.  5. 10.]\n#      [ 1.  6. 11.]\n#      ...\n#      [ 8. 13. 18.]\n#      [ 9. 14. 19.]]\u003e\n\nq2 = cx.vconvert(cx.SphericalPos, q)\nprint(q2)\n# \u003cSphericalPos: (r[kpc], theta[rad], phi[rad])\n#     [[11.18   0.464  1.571]\n#      [12.57   0.505  1.406]\n#      ...\n#      [23.601  0.703  1.019]\n#      [25.259  0.719  0.999]]\u003e\n\np = cx.CartesianVel3D(\n    x=u.Quantity(jnp.arange(0, 10.0), \"km/s\"),\n    y=u.Quantity(jnp.arange(5, 15.0), \"km/s\"),\n    z=u.Quantity(jnp.arange(10, 20.0), \"km/s\"),\n)\nprint(p)\n# \u003cCartesianVel3D: (x, y, z) [km / s]\n#     [[ 0.  5. 10.]\n#      [ 1.  6. 11.]\n#      ...\n#      [ 8. 13. 18.]\n#      [ 9. 14. 19.]]\u003e\n\np2 = cx.vconvert(cx.SphericalVel, p, q)\nprint(p2)\n# \u003cSphericalVel: (r[km / s], theta[km rad / (km s)], phi[km rad / (km s)])\n#     [[ 1.118e+01 -3.886e-16  0.000e+00]\n#      [ 1.257e+01 -1.110e-16  0.000e+00]\n#      ...\n#      [ 2.360e+01  0.000e+00  0.000e+00]\n#      [ 2.526e+01 -2.776e-16  0.000e+00]]\u003e\n\n\n# Transforming between frames\nicrs_frame = cx.frames.ICRS()\ngc_frame = cx.frames.Galactocentric()\nop = cxf.frame_transform_op(icrs_frame, gc_frame)\nq_gc, p_gc = op(q, p)\nprint(q_gc, p_gc, sep=\"\\n\")\n# \u003cCartesianPos3D: (x, y, z) [kpc]\n#     [[-1.732e+01  5.246e+00  3.614e+00]\n#      ...\n#      [-3.004e+01  1.241e+01 -1.841e+00]]\u003e\n# \u003cCartesianVel3D: (x, y, z) [km / s]\n#      [[  3.704 250.846  11.373]\n#       ...\n#       [ -9.02  258.012   5.918]]\u003e\n\ncoord = cx.Coordinate({\"length\": q, \"speed\": p}, frame=icrs_frame)\nprint(coord)\n# Coordinate(\n#     KinematicSpace({\n#        'length': \u003cCartesianPos3D: (x, y, z) [kpc]\n#             [[ 0.  5. 10.]\n#              ...\n#              [ 9. 14. 19.]]\u003e,\n#        'speed': \u003cCartesianVel3D: (x, y, z) [km / s]\n#             [[ 0.  5. 10.]\n#              ...\n#              [ 9. 14. 19.]]\u003e\n#     }),\n#     frame=ICRS()\n# )\n\nprint(coord.to_frame(gc_frame))\n# Coordinate(\n#     KinematicSpace({\n#        'length': \u003cCartesianPos3D: (x, y, z) [kpc]\n#             [[-1.732e+01  5.246e+00  3.614e+00]\n#              ...\n#              [-3.004e+01  1.241e+01 -1.841e+00]]\u003e,\n#        'speed': \u003cCartesianVel3D: (x, y, z) [km / s]\n#             [[  3.704 250.846  11.373]\n#              ...\n#              [ -9.02  258.012   5.918]]\u003e\n#     }),\n#     frame=Galactocentric( ... )\n# )\n```\n\n## Citation\n\n[![DOI][zenodo-badge]][zenodo-link]\n\nIf you found this library to be useful in academic work, then please cite.\n\n## Development\n\n[![Actions Status][actions-badge]][actions-link]\n[![Documentation Status][rtd-badge]][rtd-link]\n[![codecov][codecov-badge]][codecov-link]\n[![SPEC 0 — Minimum Supported Dependencies][spec0-badge]][spec0-link]\n[![pre-commit][pre-commit-badge]][pre-commit-link]\n[![ruff][ruff-badge]][ruff-link]\n\nWe welcome contributions!\n\n\u003c!-- prettier-ignore-start --\u003e\n[actions-badge]:            https://github.com/GalacticDynamics/coordinax/workflows/CI/badge.svg\n[actions-link]:             https://github.com/GalacticDynamics/coordinax/actions\n[codecov-badge]:            https://codecov.io/gh/GalacticDynamics/unxt/graph/badge.svg\n[codecov-link]:             https://codecov.io/gh/GalacticDynamics/unxt\n[pre-commit-badge]:         https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\n[pre-commit-link]:          https://pre-commit.com\n[pypi-link]:                https://pypi.org/project/coordinax/\n[pypi-platforms]:           https://img.shields.io/pypi/pyversions/coordinax\n[pypi-version]:             https://img.shields.io/pypi/v/coordinax\n[rtd-badge]:                https://readthedocs.org/projects/coordinax/badge/?version=latest\n[rtd-link]:                 https://coordinax.readthedocs.io/en/latest/?badge=latest\n[ruff-badge]:               https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\n[ruff-link]:                https://docs.astral.sh/ruff/\n[spec0-badge]:              https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811\u0026color=%235CA038\n[spec0-link]:               https://scientific-python.org/specs/spec-0000/\n[zenodo-badge]:             https://zenodo.org/badge/DOI/10.5281/zenodo.15320465.svg\n[zenodo-link]:              https://zenodo.org/doi/10.5281/zenodo.10850557\n\n\u003c!-- prettier-ignore-end --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalacticdynamics%2Fcoordinax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalacticdynamics%2Fcoordinax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalacticdynamics%2Fcoordinax/lists"}