Repository navigation
galax v0.1.0
galax now runs on coordinax 0.24 and unxt 2.0. This is the headline of the
release, and it is a breaking one for code that annotates parameter functions
(see "Migrating" below).
Highlights
Support for coordinax 0.24 and unxt 2
- Requires
coordinax>=0.24.1,<0.25(was>=0.23.3,<0.24) and
unxt>=2.0.5,<3(was>=1.11.2,<2). - unxt 2 moved parametric quantities and gala interop out of
unxtitself, so
galax now also depends onunxts.parametric>=2.0,<3, and theinterop-gala
extra pulls inunxts.interop.gala>=2.0,<3. - The
[tool.unxt]configuration table is now[tool.unxts.unxt]. - galax's own code, tests and doctests were updated to unxt 2's comparison repr
and error types, and to coordinax 0.24's APIs. The full suite passes against
coordinax 0.24.1 and unxt 2.0.5.
coordinax 0.24.0 itself is not supported: the floor is 0.24.1, which is
the first 0.24 release that works with unxt 2.
Fewer dependencies
tfp-nightlyis no longer a dependency. Its only use, ingNFWPotential, is
replaced by a nativehyp2f1(see below).
Migrating
Breaking: a parameter function's return annotation must now record its
dimension with unxts.parametric.ParametricQuantity[...]. A bare
unxt.Quantity[...] raises TypeError.
# before
def f(t: Quantity["time"]) -> Quantity["mass density"]: ...
# after
from unxts.parametric import ParametricQuantity as PQ
def f(t: PQ["time"]) -> PQ["mass density"]: ...Install or upgrade the matching stack together:
pip install -U "galax" "coordinax>=0.24.1" "unxt>=2.0.5"
pip install -U "galax[interop-gala]" # if you use gala interopBug fixes
Potentials
gNFWPotential(#818, fixes #817, #819, #820): no longer returns NaN for
r >= 9 r_s; gradients with respect togammaare no longer silently wrong;
.hessian()and.tidal_tensor()no longer raise. All three traced to
tensorflow_probability'shyp2f1, now replaced with a native one.- Multipole potentials (
MultipoleInnerPotential,
MultipoleOuterPotential,MultipolePotential):- batched evaluation of
compute_Ylmreused the firstl/mfor every
element (#834); - gradients and hessians of every
m >= 1term were NaN on the entire
z-axis, because spherical harmonics are now evaluated in Cartesian form
(#836); - the hessian is now finite at the origin;
- the density is now exactly zero away from the origin, instead of ~1e-5
Msun/kpc^3 of autodiff cancellation noise.
- batched evaluation of
- Time-dependent translation parameters:
TimeDependentTranslationParameter.from_
kept values in kpc and Myr beside a dimensionless unit system whenunits
was omitted. It now keeps the derived unit system (#922).
Dynamics
parse_time_specaddedt0once per step instead of once, so a nonzero
t0gave wrong times (t0=10, dt=[1,2,3]gave[10, 11, 23, 36]; now
[10, 11, 13, 16]). It is public and raised no error (#935).MockStream.__init__discarded its frame-normalized arms and passed the
untransformed inputs on (#935).- Runtime typechecking was silently off for
orbit,mockstreamand
cluster, because their import hooks named the wrong modules (#935). MockStreamArmindexing by array-like returned a fixed[True]mask
regardless of the index or the length oft(#914, fixes #913).
Interop
- gala 1.11:
MilkyWayPotentialconversion works again; galax pins
version="v1"so the converted model stays fixed (#833).
Docs and tests
- Docs now build with
uv(#926); each doctest is collected once (#867). test_second_derivtolerance loosened, cutting its runtime from ~700s to
~25s (#876).
Compatibility
| package | v0.0.3 | v0.1.0 |
|---|---|---|
| coordinax | >=0.23.3,<0.24 |
>=0.24.1,<0.25 |
| unxt | >=1.11.2,<2 |
>=2.0.5,<3 |
| unxts.parametric | -- | >=2.0,<3 |
unxts.interop.gala (interop-gala extra) |
-- | >=2.0,<3 |
| tfp-nightly | required | removed |