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:
- Returns:
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.