meepmeep.numba3d.rv_cd

Contents

meepmeep.numba3d.rv_cd#

meepmeep.numba3d.rv_cd(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], k: float, p: float, a: float, i: float, e: float, c: ndarray[tuple[Any, ...], dtype[_ScalarT]], dc: ndarray[tuple[Any, ...], dtype[_ScalarT]])[source]#

Evaluate the stellar radial velocity and its parameter derivatives at an expansion-point-centered time.

Converts the planet’s centered line-of-sight velocity into the physical radial velocity of the host star, scaled by the semi-amplitude k, following Perryman (2018) Eq. 2.23. The same chain rule is propagated to give the seven partial derivatives of the radial velocity with respect to the orbital parameters.

Accepts a scalar time or a 1-D array of times and dispatches to the appropriate kernel at compile time (inside @njit) or at call time (pure Python), mirroring the value-only radial_velocity.rv_c.

Parameters:
timefloat or ndarray

Time(s) relative to the Taylor series expansion point.

kfloat

Radial-velocity semi-amplitude of the star, in physical velocity units (e.g. m/s). The function output inherits these units.

pfloat

Orbital period.

afloat

Scaled semi-major axis in units of stellar radii.

ifloat

Orbital inclination in radians.

efloat

Orbital eccentricity.

cNDArray

A (3, 5) coefficient matrix produced by solve3d. Only row 2 is read by the inner zvel_cd.

dcNDArray

A (7, 3, 5) parameter-derivative tensor produced by solve3d_d, with the leading axis ordered as (tc, p, a, i, e, w, lan).

Returns:
rvfloat or ndarray

Stellar radial velocity in the same units as k. Positive when the planet is moving toward the observer. Shape (N,) for an array time.

drvNDArray

Partial derivatives of rv with respect to (tc, p, a, i, e, w, lan). Shape (7,) for a scalar time, (N, 7) for an array time.

Notes

Let s = k / n with n = (2*pi/p) * (a*sin(i)) / sqrt(1 - e^2). Then rv = s * vz, and the chain rule gives d(rv)/dtheta = s * d(vz)/dtheta + vz * ds/dtheta. The factor s depends only on (p, a, i, e); its derivatives w.r.t. tc and w are zero. The non-trivial derivatives are ds/dp = s/p, ds/da = -s/a, ds/di = -s*cot(i), and ds/de = -s*e/(1 - e^2).