Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 66 additions & 19 deletions src/coordinax/_interop/coordinax_interop_astropy/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@

>>> sph = UnitSphericalRepresentation(lon=3 * u.deg, lat=2 * u.deg)
>>> vec = cx.vector(sph)
>>> print(vec)

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=121 column=1

Check failure on line 122 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=121 column=1
<TwoSpherePos: (theta, phi) [deg]

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=122 column=1

Check failure on line 123 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=122 column=1
[2. 3.]>

"""
Expand All @@ -142,7 +142,7 @@
>>> dcart = CartesianDifferential(1, 2, 3, unit="km/s")
>>> dif = cx.vector(dcart)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=144 column=1

Check failure on line 145 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=144 column=1
[2. 3.]>

"""
Expand All @@ -165,7 +165,7 @@
... d_z=2 * u.km / u.s)
>>> dif = cx.vector(dcyl)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=167 column=1

Check failure on line 168 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=167 column=1
[2. 3.]>

"""
Expand All @@ -188,7 +188,7 @@
... d_phi=3 * u.mas/u.yr)
>>> dif = cx.vector(dsph)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=190 column=1

Check failure on line 191 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=190 column=1
[2. 3.]>

"""
Expand All @@ -212,7 +212,7 @@
... d_lat=3 * u.mas/u.yr)
>>> dif = cx.vector(dsph)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=214 column=1

Check failure on line 215 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=214 column=1
[2. 3.]>

"""
Expand Down Expand Up @@ -244,10 +244,10 @@


@dispatch
def vector(obj: apyc.UnitSphericalDifferential) -> cx.vecs.TwoSphereVel:
def vector(obj: apyc.UnitSphericalDifferential) -> cx.vecs.TwoSphereLonLatVel:
"""Construct from a `astropy.coordinates.UnitSphericalDifferential`.

This re-dispatches to :meth:`coordinax.vecs.TwoSphereVel.from_`.
This re-dispatches to :meth:`coordinax.vecs.TwoSphereLonLatVel.from_`.

Examples
--------
Expand All @@ -258,11 +258,35 @@
>>> dsph = UnitSphericalDifferential(d_lon=3 * u.deg/u.s, d_lat=2 * u.deg/u.s)
>>> vel = cx.vector(dsph)
>>> print(vel)
<TwoSphereVel: (theta, phi) [deg / s]
[2. 3.]>
<TwoSphereLonLatVel: (lon, lat) [deg / s]
[3. 2.]>

"""
return vector(cx.vecs.TwoSphereLonLatVel, obj)


@dispatch
def vector(obj: apyc.UnitSphericalCosLatDifferential) -> cx.vecs.TwoSphereLonCosLatVel:
"""Construct from a `astropy.coordinates.UnitSphericalCosLatDifferential`.

This re-dispatches to :meth:`coordinax.vecs.TwoSphereLonCosLatVel.from_`.

Examples
--------
>>> import astropy.units as u
>>> import coordinax as cx
>>> from astropy.coordinates import UnitSphericalCosLatDifferential

>>> dsph = UnitSphericalCosLatDifferential(
... d_lon_coslat=3 * u.deg/u.s, d_lat=2 * u.deg/u.s
... )
>>> vel = cx.vector(dsph)
>>> print(vel)
<TwoSphereLonCosLatVel: (lon_coslat, lat) [deg / s]
[3. 2.]>

"""
return vector(cx.vecs.TwoSphereVel, obj)
return vector(cx.vecs.TwoSphereLonCosLatVel, obj)


# ============================================================================
Expand Down Expand Up @@ -365,8 +389,8 @@

@dispatch
def vector(
cls: type[cx.vecs.TwoSpherePos], obj: apyc.BaseRepresentation, /
) -> cx.vecs.TwoSpherePos:
cls: type[cx.vecs.TwoSphereLonLatPos], obj: apyc.BaseRepresentation, /
) -> cx.vecs.TwoSphereLonLatPos:
"""Construct from a `astropy.coordinates.BaseRepresentation`.

Examples
Expand All @@ -376,14 +400,14 @@
>>> from astropy.coordinates import UnitSphericalRepresentation

>>> sph = UnitSphericalRepresentation(lon=3 * u.deg, lat=2 * u.deg)
>>> vec = cx.vecs.TwoSpherePos.from_(sph)
>>> vec = cx.vecs.TwoSphereLonLatPos.from_(sph)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]
[2. 3.]>
<TwoSphereLonLatPos: (lon, lat) [deg]
[3. 2.]>

"""
obj = obj.represent_as(apyc.UnitSphericalRepresentation)
return cls(phi=obj.lon, theta=obj.lat)
return cls(lon=obj.lon, lat=obj.lat)


@dispatch
Expand All @@ -401,8 +425,7 @@
>>> dcart = CartesianDifferential(1, 2, 3, unit="km/s")
>>> dif = cx.CartesianVel3D.from_(dcart)
>>> print(vec)
<TwoSpherePos: (theta, phi) [deg]
[2. 3.]>
# TODO

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=427 column=1

Check failure on line 428 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=427 column=1

"""
return cls(x=obj.d_x, y=obj.d_y, z=obj.d_z)
Expand Down Expand Up @@ -504,8 +527,8 @@

@dispatch
def vector(
cls: type[cx.vecs.TwoSphereVel], obj: apyc.UnitSphericalDifferential, /
) -> cx.vecs.TwoSphereVel:
cls: type[cx.vecs.TwoSphereLonLatVel], obj: apyc.UnitSphericalDifferential, /
) -> cx.vecs.TwoSphereLonLatVel:
"""Construct from a `astropy.coordinates.BaseDifferential`.

Examples
Expand All @@ -515,13 +538,37 @@
>>> from astropy.coordinates import UnitSphericalDifferential

>>> sph = UnitSphericalDifferential(d_lon=3 * u.deg/u.s, d_lat=2 * u.deg/u.s)
>>> vec = cx.vecs.TwoSphereVel.from_(sph)
>>> vec = cx.vecs.TwoSphereLonLatVel.from_(sph)
>>> print(vec)
<TwoSphereVel: (theta, phi) [deg / s]
[2. 3.]>
<TwoSphereLonLatVel: (lon, lat) [deg / s]
[3. 2.]>

"""
return cls(lon=obj.d_lon, lat=obj.d_lat)


@dispatch
def vector(
cls: type[cx.vecs.TwoSphereLonCosLatVel],
obj: apyc.UnitSphericalCosLatDifferential,
/,
) -> cx.vecs.TwoSphereLonCosLatVel:
"""Construct from a `astropy.coordinates.BaseDifferential`.

Examples
--------
>>> import astropy.units as u
>>> import coordinax as cx
>>> from astropy.coordinates import UnitSphericalDifferential

>>> sph = UnitSphericalDifferential(d_lon=3 * u.deg/u.s, d_lat=2 * u.deg/u.s)
>>> vec = cx.vecs.TwoSphereLonCosLatVel.from_(sph)
>>> print(vec)

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=565 column=1

Check failure on line 566 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=565 column=1
<TwoSphereLonCosLatVel: (lon_coslat, lat) [deg / s]

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on ubuntu-latest

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on ubuntu-latest

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Oldest Dependencies (3.11, ubuntu-latest)

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on ubuntu-latest

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.12 on macos-latest

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.11 on macos-latest

constructors.py line=566 column=1

Check failure on line 567 in src/coordinax/_interop/coordinax_interop_astropy/constructors.py

View workflow job for this annotation

GitHub Actions / Check Python 3.13 on macos-latest

constructors.py line=566 column=1
[3. 2.]>

"""
return cls(phi=obj.d_lon, theta=obj.d_lat)
return cls(lon_coslat=obj.d_lon_coslat, lat=obj.d_lat)


#####################################################################
Expand Down
12 changes: 12 additions & 0 deletions src/coordinax/_src/vectors/base/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,18 @@ def dimensions(cls) -> dict[str, u.dims.AbstractDimension]:
>>> pprint(cx.vecs.TwoSphereAcc.dimensions)
{'theta': 'angular acceleration', 'phi': 'angular acceleration'}

>>> pprint(cx.vecs.TwoSphereLonLatPos.dimensions)
{'lon': 'angle', 'lat': 'angle'}

>>> pprint(cx.vecs.TwoSphereLonLatVel.dimensions)
{'lon': 'angular frequency', 'lat': 'angular frequency'}

>>> pprint(cx.vecs.TwoSphereLonLatAcc.dimensions)
{'lon': 'angular acceleration', 'lat': 'angular acceleration'}

>>> pprint(cx.vecs.TwoSphereLonCosLatVel.dimensions)
{'lon_coslat': 'angular frequency', 'lat': 'angular frequency'}

>>> pprint(cx.vecs.CartesianPos3D.dimensions)
{'x': 'length', 'y': 'length', 'z': 'length'}

Expand Down
14 changes: 13 additions & 1 deletion src/coordinax/_src/vectors/d2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"TwoSpherePos",
"TwoSphereVel",
"TwoSphereAcc",
"TwoSphereLonLatPos",
"TwoSphereLonLatVel",
"TwoSphereLonLatAcc",
"TwoSphereLonCosLatVel",
# Polar
"PolarPos",
"PolarVel",
Expand All @@ -23,7 +27,15 @@
from .base import AbstractAcc2D, AbstractPos2D, AbstractVel2D
from .cartesian import CartesianAcc2D, CartesianPos2D, CartesianVel2D
from .polar import PolarAcc, PolarPos, PolarVel
from .spherical import TwoSphereAcc, TwoSpherePos, TwoSphereVel
from .spherical import (
TwoSphereAcc,
TwoSphereLonCosLatVel,
TwoSphereLonLatAcc,
TwoSphereLonLatPos,
TwoSphereLonLatVel,
TwoSpherePos,
TwoSphereVel,
)

# isort: split
from . import (
Expand Down
41 changes: 40 additions & 1 deletion src/coordinax/_src/vectors/d2/register_vectorapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
from .base import AbstractAcc2D, AbstractPos2D, AbstractVel2D
from .cartesian import CartesianAcc2D, CartesianPos2D, CartesianVel2D
from .polar import PolarAcc, PolarPos, PolarVel
from .spherical import TwoSphereAcc, TwoSpherePos, TwoSphereVel
from .spherical import (
TwoSphereAcc,
TwoSphereLonLatAcc,
TwoSphereLonLatPos,
TwoSphereLonLatVel,
TwoSpherePos,
TwoSphereVel,
)
from coordinax._src.vectors.private_api import combine_aux, wrap_vconvert_impl_params

###############################################################################
Expand Down Expand Up @@ -146,6 +153,14 @@ def time_derivative_vector_type(
return TwoSphereVel


@dispatch
def time_derivative_vector_type(
obj: type[TwoSphereLonLatPos] | TwoSphereLonLatPos, /
) -> type[TwoSphereLonLatVel]:
"""Return the corresponding time derivative class."""
return TwoSphereLonLatVel


# -----------------------------------------------
# Velocity -> Position

Expand Down Expand Up @@ -174,6 +189,14 @@ def time_antiderivative_vector_type(
return TwoSpherePos


@dispatch
def time_antiderivative_vector_type(
obj: type[TwoSphereLonLatVel] | TwoSphereLonLatVel, /
) -> type[TwoSphereLonLatPos]:
"""Return the corresponding time antiderivative class."""
return TwoSphereLonLatPos


# -----------------------------------------------
# Velocity -> Acceleration

Expand All @@ -200,6 +223,14 @@ def time_derivative_vector_type(
return TwoSphereAcc


@dispatch
def time_derivative_vector_type(
obj: type[TwoSphereLonLatVel] | TwoSphereLonLatVel, /
) -> type[TwoSphereLonLatAcc]:
"""Return the corresponding time derivative class."""
return TwoSphereLonLatAcc


# -----------------------------------------------
# Acceleration -> Velocity

Expand All @@ -226,3 +257,11 @@ def time_antiderivative_vector_type(
) -> type[TwoSphereVel]:
"""Return the corresponding time antiderivative class."""
return TwoSphereVel


@dispatch
def time_antiderivative_vector_type(
obj: type[TwoSphereLonLatAcc] | TwoSphereLonLatAcc, /
) -> type[TwoSphereLonLatVel]:
"""Return the corresponding time antiderivative class."""
return TwoSphereLonLatVel
Loading
Loading