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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file galax-0.0.3.tar.gz.
File metadata
- Download URL: galax-0.0.3.tar.gz
- Upload date:
- Size: 366.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
696c2eefbb6a9417daf3d99ff08a6e9ccdfd1d92962e64da9f77f8aa7e0d55bb
|
|
| MD5 |
9f75425b132cf8d765179152df7622d7
|
|
| BLAKE2b-256 |
971f82fd9cd15f6dd7309de873ed2bf304f557ed5e352929f789bbbbed9cd27a
|
Provenance
The following attestation bundles were made for galax-0.0.3.tar.gz:
Publisher:
cd.yml on GalacticDynamics/galax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
galax-0.0.3.tar.gz -
Subject digest:
696c2eefbb6a9417daf3d99ff08a6e9ccdfd1d92962e64da9f77f8aa7e0d55bb - Sigstore transparency entry: 2499123039
- Sigstore integration time:
-
Permalink:
GalacticDynamics/galax@c8eeefff80759cf8944225cfa26ae643b6981717 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c8eeefff80759cf8944225cfa26ae643b6981717 -
Trigger Event:
release
-
Statement type:
File details
Details for the file galax-0.0.3-py3-none-any.whl.
File metadata
- Download URL: galax-0.0.3-py3-none-any.whl
- Upload date:
- Size: 268.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a333c84275a8191ca99e1c4157ca618fae9f55c1361de7098c9075332e49d689
|
|
| MD5 |
63bf44a0975b3c802e835bdf0894df92
|
|
| BLAKE2b-256 |
44d51b28e14f3456fdfcc1a731c431ccadeb7636efeff04aacbece9bd4b11d54
|
Provenance
The following attestation bundles were made for galax-0.0.3-py3-none-any.whl:
Publisher:
cd.yml on GalacticDynamics/galax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
galax-0.0.3-py3-none-any.whl -
Subject digest:
a333c84275a8191ca99e1c4157ca618fae9f55c1361de7098c9075332e49d689 - Sigstore transparency entry: 2499123046
- Sigstore integration time:
-
Permalink:
GalacticDynamics/galax@c8eeefff80759cf8944225cfa26ae643b6981717 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c8eeefff80759cf8944225cfa26ae643b6981717 -
Trigger Event:
release
-
Statement type: