meepmeep.numba3d.sep_cd

Contents

meepmeep.numba3d.sep_cd#

meepmeep.numba3d.sep_cd(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], c: ndarray[tuple[Any, ...], dtype[_ScalarT]], dc: ndarray[tuple[Any, ...], dtype[_ScalarT]])[source]#

Evaluate the sky-projected planet-star separation and its parameter derivatives at an expansion-point-centered time.

Computes the sky-plane position and its derivatives, then reduces them to the projected distance d = sqrt(px^2 + py^2) via the chain rule. The line-of-sight z coordinate and its derivatives are not evaluated, since they do not enter the projected separation.

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 separation.sep_c.

Parameters:
timefloat or ndarray

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

cNDArray

A (3, 5) Taylor coefficient matrix produced by solve3d. Only rows 0 and 1 (x and y) are read.

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). Only slices dc[:, 0, :] and dc[:, 1, :] are read.

Returns:
dfloat or ndarray

Sky-projected planet-star separation in units of stellar radii. Shape (N,) for an array time.

ddNDArray

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

Notes

The chain-rule reduction used here is dd/dtheta = (px * dpx/dtheta + py * dpy/dtheta) / d. The expression is regular for d > 0, which is the regime of interest for transit modeling; the gradient is ill-defined exactly at the (geometrically singular) point of zero projected separation.

Unlike the 2D analogue, which delegates to pos_cd, this routine inlines the px/py polynomial passes to avoid the seven wasted Horner evaluations that computing pz and its seven derivatives would otherwise incur.