galax
Galactic and Gravitational Dynamics
Installation
pip install galax
Documentation
Coming soon. In the meantime, if you've used gala, then galax should be
familiar!
Quick example
Let's compute an orbit!
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
If you found this library to be useful in academic work, then please cite.
Development
We welcome contributions!
Galax uses 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 file for a complete list of contributors to the project.
The GalacticDynamics/galax
maintainers would like to thank
@Michael Anckaert for transferring the
galax project domain on PyPI for use by this package. Without
his generosity this package would have had a worse name.
Release files for galax 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| galax-0.0.3.tar.gz | 366.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| galax-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 634.9 kB
Release files / galax-0.0.3.tar.gz
| Download URL | galax-0.0.3.tar.gz |
|---|---|
| Size | 366.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
696c2eefbb6a9417daf3d99ff08a6e9ccdfd1d92962e64da9f77f8aa7e0d55bb
|
|
BLAKE2b-256 checksum How to use checksums |
971f82fd9cd15f6dd7309de873ed2bf304f557ed5e352929f789bbbbed9cd27a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / galax-0.0.3-py3-none-any.whl
| Download URL | galax-0.0.3-py3-none-any.whl |
|---|---|
| Size | 268.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a333c84275a8191ca99e1c4157ca618fae9f55c1361de7098c9075332e49d689
|
|
BLAKE2b-256 checksum How to use checksums |
44d51b28e14f3456fdfcc1a731c431ccadeb7636efeff04aacbece9bd4b11d54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log