Skip to content

Commit

Permalink
⬆️ dep-bump: diffraxtra v1.2.0+, quaxed v0.9.0+, unxt 1.2.0+, coordin…
Browse files Browse the repository at this point in the history
…ax 0.20.1+

Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Feb 7, 2025
1 parent 0f493f0 commit 61ed744
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 39 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
dependencies = [
"astropy>=7.0",
"beartype>=0.19",
"coordinax>=0.19.0",
"coordinax>=0.20.1",
"dataclassish>=0.7.1",
"diffrax>=0.6",
"diffraxtra>=1.0.2",
"diffraxtra>=1.2.0",
"equinox>=0.11.8",
"is-annotated>=1.0",
"jax>=0.4.35",
Expand All @@ -44,9 +44,9 @@
"plotting_backends >= 0.1",
"plum-dispatch>=2.5.6",
"quax>=0.0.5",
"quaxed>=0.6.7",
"quaxed>=0.9.0",
"typing-extensions>=4.11",
"unxt>=1.0.3",
"unxt>=1.2.0",
"xmmutablemap>=0.1",
"zeroth>=1.0",
]
Expand Down
2 changes: 1 addition & 1 deletion src/galax/_interop/galax_interop_astropy/potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from plum import convert, dispatch

import coordinax as cx
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.typing as gt

Expand Down
6 changes: 3 additions & 3 deletions src/galax/coordinates/_src/psps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import quaxed.numpy as jnp
import unxt as u
from dataclassish import field_items
from unxt.quantity import AbstractQuantity, UncheckedQuantity as FastQ
from unxt.quantity import AbstractQuantity, BareQuantity as FastQ

import galax.typing as gt
from galax.coordinates._src.frames import SimulationFrame
Expand Down Expand Up @@ -330,8 +330,8 @@ def _qp(
... p=u.Quantity([4, 5, 6], "km/s"),
... t=u.Quantity(0, "Gyr"))
>>> psp._qp(units=u.unitsystem("galactic"))
(UncheckedQuantity(Array([1, 2, 3], dtype=int64), unit='kpc'),
UncheckedQuantity(Array([0.00409085, 0.00511356, 0.00613627],
(BareQuantity(Array([1, 2, 3], dtype=int64), unit='kpc'),
BareQuantity(Array([0.00409085, 0.00511356, 0.00613627],
dtype=float64, ...), unit='kpc / Myr'))
"""
Expand Down
4 changes: 2 additions & 2 deletions src/galax/coordinates/_src/psps/base_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def vconvert(
q_cls = target["q"]
target = {
"q": q_cls,
"p": q_cls.differential_cls if (p_cls := target.get("p")) is None else p_cls,
"p": q_cls.time_derivative_cls if (p_cls := target.get("p")) is None else p_cls,
}

# TODO: use `dataclassish.replace`
Expand Down Expand Up @@ -375,7 +375,7 @@ def vconvert(
)})
"""
target = {"q": target_position_cls, "p": target_position_cls.differential_cls}
target = {"q": target_position_cls, "p": target_position_cls.time_derivative_cls}
return vconvert(target, psps, **kwargs)


Expand Down
4 changes: 2 additions & 2 deletions src/galax/coordinates/_src/psps/base_psp.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def vconvert(
"""
q_cls = target["q"]
p_cls = q_cls.differential_cls if (mayp := target.get("p")) is None else mayp
p_cls = q_cls.time_derivative_cls if (mayp := target.get("p")) is None else mayp
return replace(
psp,
q=psp.q.vconvert(q_cls, **kwargs),
Expand Down Expand Up @@ -166,5 +166,5 @@ def vconvert(
frame=SimulationFrame() )
"""
target = {"q": target_position_cls, "p": target_position_cls.differential_cls}
target = {"q": target_position_cls, "p": target_position_cls.time_derivative_cls}
return vconvert(target, psp, **kwargs)
2 changes: 1 addition & 1 deletion src/galax/coordinates/_src/psps/operator_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def call(
>>> newpsp.q.x
Quantity['length'](Array(0.70710678, dtype=float64), unit='m')
>>> newpsp.q.norm()
UncheckedQuantity(Array(1., dtype=float64), unit='m')
BareQuantity(Array(1., dtype=float64), unit='m')
>>> newpsp.p.x
Quantity['speed'](Array(0.70710678, dtype=float64), unit='m / s')
Expand Down
4 changes: 2 additions & 2 deletions src/galax/coordinates/_src/psps/register_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def add_psps(
>>> from dataclassish import replace
>>> w4 = replace(w2, t=u.Quantity(1, "Gyr"))
>>> try: w1 + w4
... except ValueError as e: print(e)
Cannot add phase-space positions with different times
... except Exception: print("Error")
Error
"""
if not isinstance(psp2, type(psp1)):
Expand Down
1 change: 1 addition & 0 deletions src/galax/dynamics/_src/cluster/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class MassSolver(AbstractSolver, strict=True): # type: ignore[call-arg]
default=dfxtra.DiffEqSolver(
solver=dfx.Dopri8(),
stepsize_controller=dfx.PIDController(rtol=1e-8, atol=1e-8),
max_steps=2**16,
),
converter=dfxtra.DiffEqSolver.from_,
)
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/dynamics/field_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import coordinax as cx
import coordinax.vecs as cxv
import unxt as u
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc
import galax.dynamics._src.custom_types as gdt
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/dynamics/field_nbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import quaxed.numpy as jnp
import unxt as u
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.potential as gp
import galax.typing as gt
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/dynamics/register_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import coordinax as cx
import quaxed.numpy as jnp
import unxt as u
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc

Expand Down
3 changes: 2 additions & 1 deletion src/galax/dynamics/_src/dynamics/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import coordinax as cx
import diffraxtra as dfxtra
import quaxed.numpy as jnp
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc
import galax.dynamics._src.custom_types as gdt
Expand Down Expand Up @@ -124,6 +124,7 @@ class DynamicsSolver(AbstractSolver, strict=True): # type: ignore[call-arg]
default=dfxtra.DiffEqSolver(
solver=dfx.Dopri8(),
stepsize_controller=dfx.PIDController(rtol=1e-8, atol=1e-8),
max_steps=2**16,
),
converter=dfxtra.DiffEqSolver.from_,
)
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/integrate/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from plum import dispatch

import quaxed.numpy as jnp
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc
import galax.dynamics._src.custom_types as gdt
Expand Down
3 changes: 2 additions & 1 deletion src/galax/dynamics/_src/integrate/integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import diffraxtra as dfxtra
import quaxed.numpy as jnp
from unxt.quantity import AbstractQuantity, UncheckedQuantity as FastQ
from unxt.quantity import AbstractQuantity, BareQuantity as FastQ
from xmmutablemap import ImmutableMap

import galax.coordinates as gc
Expand Down Expand Up @@ -179,6 +179,7 @@ class Integrator(eqx.Module, strict=True): # type: ignore[call-arg,misc]
dfxtra.DiffEqSolver(
solver=dfx.Dopri8(scan_kind="bounded"),
stepsize_controller=dfx.PIDController(rtol=1e-7, atol=1e-7),
max_steps=2**16,
)
),
converter=DynamicsSolver.from_,
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/integrate/interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import diffraxtra as dfxtra
import quaxed.numpy as xp
import unxt as u
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc
import galax.typing as gt
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/_src/mockstream/mockstream_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import quaxed.numpy as jnp
import unxt as u
from unxt.quantity import UncheckedQuantity as FastQ
from unxt.quantity import BareQuantity as FastQ

import galax.coordinates as gc
import galax.typing as gt
Expand Down
52 changes: 36 additions & 16 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61ed744

Please sign in to comment.