Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GalacticDynamics/coordinax
Coordinates in JAX
https://github.com/GalacticDynamics/coordinax
coordinate-systems coordinate-transformation coordinates jax
Last synced: 11 days ago
JSON representation
Coordinates in JAX
- Host: GitHub
- URL: https://github.com/GalacticDynamics/coordinax
- Owner: GalacticDynamics
- License: mit
- Created: 2024-02-10T21:21:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-19T18:09:52.000Z (12 days ago)
- Last Synced: 2024-06-20T06:42:59.946Z (12 days ago)
- Topics: coordinate-systems, coordinate-transformation, coordinates, jax
- Language: Python
- Homepage:
- Size: 376 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Lists
- awesome-equinox - coordinax - Coordinates in JAX <img src="https://img.shields.io/github/stars/GalacticDynamics/coordinax?style=social" align="center"> (Models and Projects)
README
coordinax
Coordinates in JAX
Coordinax enables calculations with coordinates in
[JAX](https://jax.readthedocs.io/en/latest/). Built on
[Equinox](https://docs.kidger.site/equinox/) and
[Quax](https://github.com/patrick-kidger/quax).## Installation
[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]```bash
pip install coordinax
```## Documentation
[![Documentation Status][rtd-badge]][rtd-link]
Coming soon. In the meantime, if you've used `astropy.coordinates`, then
`coordinax` should be fairly intuitive.## Quick example
```python
import coordinax as cx
import jax.numpy as jnp
from unxt import Quantityq = cx.CartesianPosition3D(
x=Quantity(jnp.arange(0, 10.0), "km"),
y=Quantity(jnp.arange(5, 15.0), "km"),
z=Quantity(jnp.arange(10, 20.0), "km"),
)
print(q)
#q2 = cx.represent_as(q, cx.SphericalPosition)
print(q2)
#p = cx.CartesianVelocity3D(
d_x=Quantity(jnp.arange(0, 10.0), "m/s"),
d_y=Quantity(jnp.arange(5, 15.0), "m/s"),
d_z=Quantity(jnp.arange(10, 20.0), "m/s"),
)
print(p)
#p2 = cx.represent_as(p, cx.SphericalVelocity, q)
print(p2)
#
```## Citation
[![DOI][zenodo-badge]][zenodo-link]
If you found this library to be useful in academic work, then please cite.
## Development
[![Actions Status][actions-badge]][actions-link]
We welcome contributions!
[actions-badge]: https://github.com/GalacticDynamics/coordinax/workflows/CI/badge.svg
[actions-link]: https://github.com/GalacticDynamics/coordinax/actions
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/coordinax
[conda-link]: https://github.com/conda-forge/coordinax-feedstock[pypi-link]: https://pypi.org/project/coordinax/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/coordinax
[pypi-version]: https://img.shields.io/pypi/v/coordinax
[rtd-badge]: https://readthedocs.org/projects/coordinax/badge/?version=latest
[rtd-link]: https://coordinax.readthedocs.io/en/latest/?badge=latest
[zenodo-badge]: https://zenodo.org/badge/755708966.svg
[zenodo-link]: https://zenodo.org/doi/10.5281/zenodo.10850557