meepmeep.numba2d.pos

Contents

meepmeep.numba2d.pos#

meepmeep.numba2d.pos(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], tc: float, p: float, c: ndarray[tuple[Any, ...], dtype[_ScalarT]], te: float = 0.0)[source]#

Evaluate the planet’s sky-plane (x, y) position at an absolute time using a 2D Taylor expansion.

This is the “direct” variant of the 2D position evaluator: it accepts an absolute observation time, folds it back into a single orbital epoch around the expansion point te, and then evaluates the 5th-order Taylor polynomial stored in c using Horner’s scheme.

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).

Parameters:
timefloat or NDArray

Absolute observation time(s) in the same units as tc and p (typically days). Scalar or array inputs are both accepted; the return type matches.

tcfloat

Transit-centre time (time of inferior conjunction), on the same time axis as time.

pfloat

Orbital period, used to fold time into a single epoch around the expansion point.

cNDArray

A (2, 5) coefficient matrix produced by solve2d. Row 0 holds the x-direction coefficients and row 1 the y-direction coefficients, ordered as [position, velocity, acceleration/2, jerk/6, snap/24] (i.e. already pre-scaled by the factorial of the Taylor order).

tefloat, optional

Expansion-point offset from the transit centre [days] - the same value that was passed to solve2d. Defaults to 0.0, the expansion point at the transit centre.

Returns:
pxfloat or NDArray

Sky-plane x position(s) in units of stellar radii.

pyfloat or NDArray

Sky-plane y position(s) in units of stellar radii.

Notes

Epoch folding uses epoch = floor((time - tc - te + p/2) / p), which centers the residual t = time - (tc + te + epoch*p) on the expansion point. This keeps the polynomial argument small and preserves the accuracy of the truncated Taylor series.