Metadata-Version: 2.5
Name: galax
Version: 0.0.3
Summary: Galactic Dynamics in Jax.
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/galax/issues
Project-URL: Changelog, https://github.com/GalacticDynamics/galax/releases
Project-URL: Discussions, https://github.com/GalacticDynamics/galax/discussions
Project-URL: Homepage, https://github.com/GalacticDynamics/galax
Author-email: galax maintainers <nstarman@users.noreply.github.com>, Adrian Price-Whelan <adrianmpw@gmail.com>, Jake Nibauer <jnibauer@princeton.edu>, Nathaniel Starkman <nstarman@users.noreply.github.com>
License: MIT License
License-File: AUTHORS.rst
License-File: LICENSE.txt
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: astropy>=7.0.0
Requires-Dist: beartype>=0.22.9
Requires-Dist: coordinax<0.24,>=0.23.3
Requires-Dist: dataclassish>=0.8.0
Requires-Dist: diffrax>=0.7
Requires-Dist: diffraxtra>=1.5.2
Requires-Dist: equinox>=0.13.8
Requires-Dist: interpax>=0.3.11
Requires-Dist: is-annotated>=1.0
Requires-Dist: jax>=0.7.2
Requires-Dist: jaxlib>=0.7.2
Requires-Dist: jaxtyping>=0.3.3
Requires-Dist: oncequinox>=0.1.0
Requires-Dist: optimistix>=0.0.11
Requires-Dist: optional-dependencies>=0.4.0
Requires-Dist: optype>=0.14.0
Requires-Dist: packaging>=24.1
Requires-Dist: plotting-backends>=0.1
Requires-Dist: plum>=2.8.0; python_version < '3.14'
Requires-Dist: plum>=2.9.0; python_version >= '3.14'
Requires-Dist: quax>=0.4.3
Requires-Dist: quaxed>=0.10.5
Requires-Dist: tfp-nightly[jax]>=0.25.0
Requires-Dist: typing-extensions>=4.13.2
Requires-Dist: unxt<2,>=1.11.2
Requires-Dist: wadler-lindig>=0.1.7
Requires-Dist: xmmutablemap>=0.2.1
Requires-Dist: zeroth>=1.2.0
Provides-Extra: all
Requires-Dist: astropy>=6.1; extra == 'all'
Requires-Dist: gala>=1.10; extra == 'all'
Requires-Dist: galpy>=1.8; extra == 'all'
Requires-Dist: matplotlib>=3.8; extra == 'all'
Provides-Extra: interop-all
Requires-Dist: astropy>=6.1; extra == 'interop-all'
Requires-Dist: gala>=1.10; extra == 'interop-all'
Requires-Dist: galpy>=1.8; extra == 'interop-all'
Provides-Extra: interop-astropy
Requires-Dist: astropy>=6.1; extra == 'interop-astropy'
Provides-Extra: interop-gala
Requires-Dist: astropy>=6.1; extra == 'interop-gala'
Requires-Dist: gala>=1.10; extra == 'interop-gala'
Provides-Extra: interop-galpy
Requires-Dist: astropy>=6.1; extra == 'interop-galpy'
Requires-Dist: galpy>=1.8; extra == 'interop-galpy'
Provides-Extra: plot-all
Requires-Dist: matplotlib>=3.8; extra == 'plot-all'
Provides-Extra: plot-matplotlib
Requires-Dist: matplotlib>=3.8; extra == 'plot-matplotlib'
Description-Content-Type: text/markdown

<h1 align='center'> galax </h1>
<h2 align="center">Galactic and Gravitational Dynamics</h2>

## Installation

[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]

<!-- [![Conda-Forge][conda-badge]][conda-link] -->

```bash
pip install galax
```

## Documentation

[![Documentation Status][rtd-badge]][rtd-link]

Coming soon. In the meantime, if you've used `gala`, then `galax` should be
familiar!

## Quick example

Let's compute an orbit!

```python
import jax.numpy as jnp

import unxt as u
import coordinax as cx
import galax.coordinates as gc
import galax.dynamics as gd
import galax.potential as gp

w = gc.PhaseSpaceCoordinate(
    t=u.Q(0, "Myr"), q=u.Q([8, 0, 0], "kpc"), p=u.Q([0, 220, 0], "km/s")
)

pot = gp.MilkyWayPotential()

orbit = gd.evaluate_orbit(pot, w, u.Q(jnp.linspace(0, 1, 100), "Gyr"))
print(orbit)
# Orbit(
#     q=<CartesianPos3D: (x, y, z) [kpc]
#         [[ 8.     0.     0.   ]
#          ...
#          [ 7.804 -0.106  0.   ]]>,
#     p=<CartesianVel3D: (x, y, z) [kpc / Myr]
#         [[ 0.     0.225  0.   ]
#          ...
#          [ 0.018  0.23   0.   ]]>,
#     t=Q([0., ..., 1000.], 'Myr')
# )

orbit_sph = orbit.vconvert(cx.vecs.LonLatSphericalPos)
print(orbit_sph)
# Orbit(
#     q=<LonLatSphericalPos: (lon[rad], lat[deg], distance[kpc])
#         [[0.000e+00 3.858e-16 8.000e+00]
#          ...
#          [6.270e+00 3.858e-16 7.805e+00]]>,
#     p=<LonLatSphericalVelocity (lon[rad / Myr], lat[deg / Myr], distance[kpc / Myr])
#         [[ 0.028  0.     0.   ]
#          ...
#          [ 0.03   0.     0.015]]>,
#     t=Quantity(Array([0., ..., 1000.], dtype=float64), unit='Myr')
# )
```

## 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!

Galax uses [`uv`](https://docs.astral.sh/uv) for development dependency
management (make sure you have `uv` version >=0.4.27 installed). For example, to
run the test suite, install the `test` group and run `pytest` with:

```
uv sync --group test
uv run pytest src docs tests
```

### Contributors

See the
[AUTHORS.rst](https://github.com/GalacticDynamics/galax/blob/main/AUTHORS.rst)
file for a complete list of contributors to the project.

The [`GalacticDynamics/galax`](https://github.com/GalacticDynamics/galax)
maintainers would like to thank
[@Michael Anckaert](https://github.com/MichaelAnckaert) for transferring the
`galax` project domain on [`PyPI`][pypi-link] for use by this package. Without
his generosity this package would have had a worse name.

<!-- SPHINX-START -->

<!-- prettier-ignore-start -->
[actions-badge]:            https://github.com/GalacticDynamics/galax/workflows/CI/badge.svg
[actions-link]:             https://github.com/GalacticDynamics/galax/actions
[codecov-badge]:            https://codecov.io/gh/GalacticDynamics/galax/graph/badge.svg?token=PC553LZFFJ
[codecov-link]:             https://codecov.io/gh/GalacticDynamics/galax
[conda-badge]:              https://img.shields.io/conda/vn/conda-forge/galax
[conda-link]:               https://github.com/conda-forge/galax-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
[github-discussions-link]:  https://github.com/GalacticDynamics/galax/discussions
[pypi-link]:                https://pypi.org/project/galax/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/galax
[pypi-version]:             https://img.shields.io/pypi/v/galax
[rtd-badge]:                https://readthedocs.org/projects/galax/badge/?version=latest
[rtd-link]:                 https://galax.readthedocs.io/en/latest/?badge=latest
[zenodo-badge]:             https://zenodo.org/badge/706347349.svg
[zenodo-link]:              https://zenodo.org/doi/10.5281/zenodo.11553324

<!-- prettier-ignore-end -->
