meepmeep.numba3d.true_anomaly_o#
- meepmeep.numba3d.true_anomaly_o(t, tpa, p, ex, ey, ez, w, dt, ep_table, ep_times, coeffs)[source]#
True anomaly at an array of times.
Accepts a scalar time
tor a 1-D array of times and dispatches to the scalar (_true_anomaly_os()) or vector (true_anomaly_ov()) kernel at compile time (inside@njit) or at call time (pure Python).Computed from the angle between the planet position vector and the eccentricity vector \((e_x, e_y, e_z)\). The mean anomaly, computed exactly from the periastron anchor, disambiguates the two branches of \(\arccos\) (the sign of \(\mathbf{r}\cdot\mathbf{v}\) would do the same in exact arithmetic, but it is of order
eand is unreliable against the Taylor truncation noise for near-circular orbits).- Parameters:
- t
floatorndarray Time(s) at which to evaluate the true anomaly.
- tpa
float Periastron time.
- p
float Orbital period [days].
- ex, ey, ez
float Components of the eccentricity vector pointing from the focus toward periastron.
(-1, 0, 0)is the sentinel thateccentricity_vector()returns for near-circular orbits and triggers the fast path.- w
float Argument of periastron [radians]. Kept for signature parity with the gradient variant (
true_anomaly_od); currently unused because the eccentricity vector is passed explicitly and the circular-orbit fast path needs onlytpaandp.- dt, ep_table, ep_times, coeffs
Multi-expansion-point dispatch arrays from
solve3d_orbit()/create_expansion_points().
- t
- Returns:
Notes
The circular-orbit fast path skips the geometric chain to avoid division by a near-zero \(|\mathbf{e}|\).
utils.eccentricity_vectoremits the(-1, 0, 0)sentinel whene < 1e-5, and the test here matches that sentinel. On the fast path the true anomaly equals the mean anomaly, \(f = 2\pi(t - t_\mathrm{pa})/p\) - the same closed form used by the gradient varianttrue_anomaly_od, so the two stay in exact agreement for circular orbits.