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.
Metadata
Release files for galax 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| galax-0.1.0.tar.gz | 380.7 kB | With provenance | Details for galax-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| galax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for galax-0.1.0-py3-none-any.whl |
Total release size: 654.9 kB
Release files / galax-0.1.0.tar.gz
| Download URL | galax-0.1.0.tar.gz |
|---|---|
| Size | 380.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
730e8e06c949fdcce19a4483b7262f6da7f4113d0ff089fabe22320a344504bb
|
|
BLAKE2b-256 checksum How to use checksums |
ceb6db2dd1aca753957d22cf8d1f8cb24c906238b2842a4fe9322733be30968d
|
| 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 Oct 9, 2026.
Transparency logRelease files / galax-0.1.0-py3-none-any.whl
| Download URL | galax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 274.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47f10d3d7d1512d8331fdffdfc13c39593f8b35a147327e848903f0e0deefeef
|
|
BLAKE2b-256 checksum How to use checksums |
0f3f0522114cb634f10b90ce4ece0fcfd38cdc54751cb1269d7cb48cd6c1fb8e
|
| 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 Oct 9, 2026.
Transparency logSecurity for galax 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for galax-0.1.0.tar.gz
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 Oct 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.