meepmeep.numba3d.cos_alpha_cd

Contents

meepmeep.numba3d.cos_alpha_cd#

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

Evaluate the cosine of the orbital phase angle and its parameter derivatives at an expansion-point-centered time.

Derivative-returning counterpart of cos_phase_angle.cos_alpha_c: forms the phase-angle cosine cos alpha = -z / sqrt(x^2 + y^2 + z^2) from the sky position and propagates the chain rule to its seven orbital-parameter partials. The phase angle alpha is the star-planet-observer angle, with z positive toward the observer; cos alpha = +1 at superior conjunction (full phase) and -1 at inferior conjunction (new phase).

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 cos_phase_angle.cos_alpha_c.

Parameters:
timefloat or ndarray

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

cNDArray

A (3, 5) Taylor coefficient matrix produced by solve3d.

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

Returns:
cafloat or ndarray

Cosine of the phase angle, in [-1, 1]. Shape (N,) for an array time.

dcaNDArray

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

Notes

With cos alpha = -z/r and r = sqrt(x^2 + y^2 + z^2), the chain-rule reduction used here is d(cos alpha)/dtheta = -dz/dtheta / r + z * (x*dx/dtheta + y*dy/dtheta + z*dz/dtheta) / r^3. The expression is regular for r > 0.