meepmeep.numba3d.cos_alpha_od

Contents

meepmeep.numba3d.cos_alpha_od#

meepmeep.numba3d.cos_alpha_od(t, tpa, p, dt, ep_table, ep_times, coeffs, dcoeffs)[source]#

Cosine of the phase angle and orbital-parameter derivatives for any orbital phase.

Accepts a scalar time t or a 1-D array of times and dispatches to the scalar (_cos_alpha_osd()) or vector (cos_alpha_ovd()) kernel at compile time (inside @njit) or at call time (pure Python).

With \(\cos\alpha = -z/r\) and \(r = \sqrt{x^2+y^2+z^2}\), the gradient is

\[\frac{\partial(-z/r)}{\partial \theta_k} = -\frac{1}{r}\frac{\partial z}{\partial \theta_k} + \frac{z}{r^3}\, \Bigl(x\,\tfrac{\partial x}{\partial \theta_k} + y\,\tfrac{\partial y}{\partial \theta_k} + z\,\tfrac{\partial z}{\partial \theta_k}\Bigr).\]
Parameters:
tfloat or ndarray

Time at which to evaluate the phase-angle cosine and gradient.

tpa, p, dt, ep_table, ep_times, coeffs, dcoeffs

See pos_od().

Returns:
cafloat or ndarray

Cosine of the phase angle. Arrays of shape (N,) for an array t.

dcandarray

Gradient w.r.t. (tc, p, a, i, e, w, lan). Shape (7,) for a scalar t, (N, 7) for an array t.