Kepler Solver¶
This module solves for the orbit of the planet given Keplerian parameters.

orbitize.kepler.
calc_orbit
(epochs, sma, ecc, inc, aop, pan, tau, plx, mtot, mass_for_Kamp=None, tau_ref_epoch=58849, tolerance=1e09, max_iter=100, tau_warning=True)[source]¶ Returns the separation and radial velocity of the body given array of orbital parameters (size n_orbs) at given epochs (array of size n_dates)
Based on orbit solvers from James Graham and Rob De Rosa. Adapted by Jason Wang and Henry Ngo.
 Parameters
epochs (np.array) – MJD times for which we want the positions of the planet
sma (np.array) – semimajor axis of orbit [au]
ecc (np.array) – eccentricity of the orbit [0,1]
inc (np.array) – inclination [radians]
aop (np.array) – argument of periastron [radians]
pan (np.array) – longitude of the ascending node [radians]
tau (np.array) – epoch of periastron passage in fraction of orbital period past MJD=0 [0,1]
plx (np.array) – parallax [mas]
mtot (np.array) – total mass of the twobody orbit (M_* + M_planet) [Solar masses]
mass_for_Kamp (np.array, optional) – mass of the body that causes the RV signal. For example, if you want to return the stellar RV, this is the planet mass. If you want to return the planetary RV, this is the stellar mass. [Solar masses]. For planet mass ~ 0, mass_for_Kamp ~ M_tot, and function returns planetary RV (default).
tau_ref_epoch (float, optional) – reference date that tau is defined with respect to (i.e., tau=0)
tolerance (float, optional) – absolute tolerance of iterative computation. Defaults to 1e9.
max_iter (int, optional) – maximum number of iterations before switching. Defaults to 100.
tau_warning (bool, optional, depricating) – temporary argument to warn users about tau_ref_epoch default value change. Users that are calling this function themsleves should receive a warning since default is True. To be removed when tau_ref_epoch change is fully propogated to users. Users can turn it off to stop getting the warning.
 Returns
raoff (np.array): arraylike (n_dates x n_orbs) of RA offsets between the bodies (origin is at the other body) [mas]
deoff (np.array): arraylike (n_dates x n_orbs) of Dec offsets between the bodies [mas]
 vz (np.array): arraylike (n_dates x n_orbs) of radial velocity of one of the bodies
(see mass_for_Kamp description) [km/s]
 Return type
3tuple
Written: Jason Wang, Henry Ngo, 2018