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:
- time
floatorNDArray 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.
- c
NDArray A (2, 5) coefficient matrix produced by solve2d. See pos for the column ordering convention.
- time
- Returns:
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).