N-body Backend
- orbitize.nbody.calc_orbit(epochs, sma, ecc, inc, aop, pan, tau, plx, mtot, tau_ref_epoch=58849, m_pl=None, output_star=False, integrator='ias15')[source]
Solves for position for a set of input orbital elements using rebound.
- Parameters
epochs (np.array) – MJD times for which we want the positions of the planet
sma (np.array) – semi-major axis array of secondary bodies. For three planets, this should look like: np.array([sma1, sma2, sma3]) [au]
ecc (np.array) – eccentricity of the orbits (same format as sma) [0,1]
inc (np.array) – inclinations (same format as sma) [radians]
aop (np.array) – arguments of periastron (same format as sma) [radians]
pan (np.array) – longitudes of the ascending node (same format as sma) [radians]
tau (np.array) – epochs of periastron passage in fraction of orbital period past MJD=0 (same format as sma) [0,1]
plx (float) – parallax [mas]
mtot (float) – total mass of the two-body orbit (M_* + M_planet) [Solar masses]
tau_ref_epoch (float, optional) – reference date that tau is defined with respect to
m_pl (np.array, optional) – masss of the planets (same format as sma) [solar masses]
output_star (bool) – if True, also return the position of the star relative to the barycenter.
integrator (str) – value to set for rebound.sim.integrator. Default “ias15”
- Returns
- raoff (np.array): array-like (n_dates x n_bodies x n_orbs) of RA offsets between
the bodies (origin is at the other body) [mas]
- deoff (np.array): array-like (n_dates x n_bodies x n_orbs) of Dec offsets between
the bodies [mas]
- vz (np.array): array-like (n_dates x n_bodies x n_orbs) of radial velocity of
one of the bodies (see mass_for_Kamp description) [km/s]
- Return type
3-tuple