Skip to main content

galax

Galactic and Gravitational Dynamics

Installation

PyPI platforms PyPI version

pip install galax

Documentation

Documentation Status

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

DOI

If you found this library to be useful in academic work, then please cite.

Development

Actions Status

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)

Source distribution for galax 0.1.0
File Size Uploaded
galax-0.1.0.tar.gz 380.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for galax 0.1.0
File Interpreter ABI Platform
galax-0.1.0-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page