meepmeep.numba3d.true_anomaly_od#
- meepmeep.numba3d.true_anomaly_od(t, tpa, p, ex, ey, ez, w, dt, ep_table, ep_times, coeffs, dcoeffs)[source]#
True anomaly and its orbital-parameter derivatives.
Accepts a scalar time
tor a 1-D array of times and dispatches to the scalar (_true_anomaly_osd()) or vector (true_anomaly_ovd()) kernel at compile time (inside@njit) or at call time (pure Python).Computed from the geometric angle between the planet position vector and the eccentricity vector \((e_x, e_y, e_z)\), with the mean anomaly (computed exactly from the periastron anchor) resolving the two branches of \(\arccos\).
- Parameters:
- t
floatorndarray Time(s) at which to evaluate the true anomaly and gradient.
- tpa
float Periastron time anchoring the expansion-point grid (see
_pos_osd()).- p
float Orbital period [days].
- ex, ey, ez
float Components of the eccentricity vector.
(-1, 0, 0)is the sentinel produced byeccentricity_vector()for near-circular orbits and triggers the closed-form fast path.- w
float Argument of periastron [radians]. Kept for signature parity with the base function; currently unused inside this routine because the eccentricity vector is passed explicitly.
- dt, ep_table, ep_times, coeffs, dcoeffs
Multi-expansion-point dispatch arrays from
solve3d_orbit_d()/create_expansion_points().
- t
- Returns:
- f
floatorndarray True anomaly [radians], in \([0, 2\pi)\). Arrays of shape (N,) for an array
t.- df
ndarray Gradient w.r.t.
(tc, p, a, i, e, w, lan). Shape (7,) for a scalart, (N, 7) for an arrayt. Theex, ey, ez, winputs are treated as known constants - they are functions of the orbital parameters but the dependency is captured implicitly through the geometric chain rule on the position vector.
- f
Notes
At the singular configurations
edp = +/-1(edp= cosine of the angle between position and eccentricity vector) the analytic gradient diverges and is replaced by zero. The circular-orbit fast path uses the mean-anomaly identity \(f = 2\pi(t - t_\mathrm{pa}) / p\).