meepmeep.numba3d.vel_cd#
- meepmeep.numba3d.vel_cd(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], c: ndarray[tuple[Any, ...], dtype[_ScalarT]], dc: ndarray[tuple[Any, ...], dtype[_ScalarT]])[source]#
Evaluate the (vx, vy, vz) velocity and its orbital-parameter derivatives at an expansion-point-centered time.
Centered velocity companion to position.pos_cd. The velocity components are obtained by analytically differentiating the 5th-order position polynomials, yielding 4th-order polynomials in time that are evaluated using Horner’s scheme. The same differentiation is applied to the parameter-derivative coefficients so the result is the velocity together with its seven partial derivatives with respect to (tc, p, a, i, e, w, lan).
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 velocity.vel_c.- Parameters:
- time
floatorndarray Time(s) relative to the Taylor series expansion point.
- c
NDArray A (3, 5) coefficient matrix produced by solve3d. Rows index the spatial dimensions (x, y, z) and columns the Taylor order from position through snap (pre-scaled by the factorial of the order).
- dc
NDArray A (7, 3, 5) tensor of parameter-derivative coefficients produced by solve3d_d. The leading axis enumerates the seven Keplerian parameters in the canonical order (tc, p, a, i, e, w, lan); the remaining axes mirror the layout of c.
- time
- Returns:
- vx
floatorndarray Sky-plane x velocity in stellar radii per unit time. Shape (N,) for an array time.
- vy
floatorndarray Sky-plane y velocity in stellar radii per unit time. Shape (N,) for an array time.
- vz
floatorndarray Line-of-sight z velocity in stellar radii per unit time. Positive values indicate motion toward the observer. Shape (N,) for an array time.
- dvx
NDArray Partial derivatives of vx w.r.t. (tc, p, a, i, e, w, lan). Shape (7,) for a scalar time, (N, 7) for an array time.
- dvy
NDArray Partial derivatives of vy w.r.t. (tc, p, a, i, e, w, lan). Shape (7,) for a scalar time, (N, 7) for an array time.
- dvz
NDArray Partial derivatives of vz w.r.t. (tc, p, a, i, e, w, lan). Shape (7,) for a scalar time, (N, 7) for an array time.
- vx
Notes
The pre-factors 1, 2, 3, 4 in front of c[d, 1..4] and dc[k, d, 1..4] are the chain-rule factors from differentiating c[d, n] * time^n (and likewise the derivative coefficients) with respect to time. Differentiation drops the truncation order by one, so the velocity polynomials are 4th order even though the underlying position expansion is 5th order.