Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/galacticdynamics/galax
Galactic and Gravitational Dynamics in Python (+ GPU and autodiff)
https://github.com/galacticdynamics/galax
astrodynamics astronomy astrophysics auto-differentiation dynamical-systems dynamics galaxy gpu-acceleration jax
Last synced: about 2 hours ago
JSON representation
Galactic and Gravitational Dynamics in Python (+ GPU and autodiff)
- Host: GitHub
- URL: https://github.com/galacticdynamics/galax
- Owner: GalacticDynamics
- License: mit
- Created: 2023-10-17T19:11:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-14T21:15:22.000Z (1 day ago)
- Last Synced: 2024-11-14T22:21:56.185Z (1 day ago)
- Topics: astrodynamics, astronomy, astrophysics, auto-differentiation, dynamical-systems, dynamics, galaxy, gpu-acceleration, jax
- Language: Python
- Homepage:
- Size: 4.5 MB
- Stars: 33
- Watchers: 3
- Forks: 6
- Open Issues: 57
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.txt
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
galax
Galactic and Gravitational Dynamics
## Installation
[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-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 coordinax as cx
import galax.coordinates as gc
import galax.dynamics as gd
import galax.potential as gp
import jax.numpy as jnp
from unxt import Quantityw = gc.PhaseSpacePosition(
q=Quantity([8, 0, 0], "kpc"),
p=Quantity([0, 220, 0], "km/s"),
t=Quantity(0, "Myr"),
)pot = gp.MilkyWayPotential()
orbit = gd.evaluate_orbit(pot, w, Quantity(jnp.linspace(0, 1, 100), "Gyr"))
print(orbit)
# Orbit(
# q=,
# p=,
# t=Quantity['time'](Array([0., ..., 1000.], dtype=float64), unit='Myr'),
# potential=MilkyWayPotential(...)
# )orbit_sph = orbit.represent_as(cx.LonLatSphericalPos)
print(orbit_sph)
# Orbit(
# q=,
# p=,
# t=Quantity['time'](Array([0., ..., 1000.], dtype=float64), unit='Myr'),
# potential=MilkyWayPotential(...})
# )
```## 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!
### 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.[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