meepmeep.numba2d.pos_c

Contents

meepmeep.numba2d.pos_c#

meepmeep.numba2d.pos_c(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], c: ndarray[tuple[Any, ...], dtype[_ScalarT]]) tuple[float | ndarray[tuple[Any, ...], dtype[_ScalarT]], float | ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]#

Evaluate the planet’s sky-plane (x, y) position at an expansion-point-centered time.

This is the “centered” variant of pos: it assumes the caller has already subtracted the expansion time te (and any epoch offset) so that time is a small displacement around the expansion point. The polynomial is evaluated 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). The array path is an explicit loop over the scalar kernel, which avoids the full-array temporaries that NumPy broadcasting would allocate for every Horner step.

Parameters:
timefloat or NDArray

Time relative to the Taylor series expansion point, i.e. t = tc - (te + epoch*p). Must lie within the expansion point’s region of validity for the truncation error to remain small.

cNDArray

A (2, 5) coefficient matrix produced by solve2d. See pos for the column ordering convention.

Returns:
pxfloat or NDArray

Sky-plane x position in units of stellar radii.

pyfloat or NDArray

Sky-plane y position in units of stellar radii.

Notes

This is the fastest 2D position evaluator in the module since it skips the epoch-folding arithmetic. Prefer it whenever the expansion-point index and centered time are already known (e.g. inside multi-expansion-point dispatch loops).