meepmeep.numba3d.cos_alpha_c

Contents

meepmeep.numba3d.cos_alpha_c#

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

Evaluate the cosine of the orbital phase angle at an expansion-point-centered time.

Centered counterpart of cos_alpha: assumes time has already been shifted to be relative to the expansion point. The phase angle alpha is the star-planet-observer angle. With z positive toward the observer, cos alpha = -z / r where r = sqrt(x^2 + y^2 + z^2). At superior conjunction (full phase, planet behind star) cos alpha = +1; at inferior conjunction (new phase, planet in front) cos alpha = -1.

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

Time relative to the Taylor series expansion point.

cNDArray

A (3, 5) coefficient matrix produced by solve3d. All three rows (x, y, z) are read.

Returns:
cos_alphafloat or NDArray

Cosine of the phase angle, in [-1, 1].