API documentation

class transit.Central(mass=1.0, radius=1.0, flux=1.0, q1=None, q2=None, mu1=None, mu2=None)

The “central”—in this context—is the massive central body in a System.

Parameters:
  • mass – The mass of the body measured in Solar masses. (default: 1.0)
  • radius – The radius of the body measured in Solar radii. (default: 1.0)
  • flux – The un-occulted flux measured in whatever units you feel like using. (default: 1.0)

Limb darkening can be specified using (mu1, mu2) or (q1, q2). TODO: explain.

class transit.Body(flux=0.0, r=0.0, mass=0.0, a=None, period=None, t0=0.0, e=0.0, omega=None, pomega=None, ix=None, b=None, iy=0.0)

A “body”—in this context—is a (possibly) massive body orbiting a Central in a System. There are several ways to initialize this and once it has been added to a system using the System.add_body() method, they should all be equivalent. The orbital elements specified either specify a Keplerian orbit. This object includes all sorts of magic for converting between different specifications when needed but the base description of the planet and the orbit is parameterized by the parameters:

(flux, r, mass, a, t0, e, pomega, ix, iy)
Parameters:
  • flux – The flux of the body measured relative to the central. (default: 0.0)
  • r – The radius measured in Solar radii. (default: 0.0)
  • mass – The mass in Solar masses. (default: 0.0)
  • a – The semi-major axis of the orbit measured in Solar radii. Either this parameter or period must be provided but not both.
  • period – The period of the orbit in days. Either this parameter or a must be provided but not both.
  • t0 – The epoch of the orbit in days. (default: 0.0)
  • e – The eccentricity of the orbit. (default: 0.0)
  • omega – The orientation of the orbital ellipse in radians as defined by Winn (2010). (default: 0.5 * pi)
  • pomega – An alternative definition of the orbital ellipse orientation pomega = 0.5 * pi - omega. (default: 0.0)
  • ix – The relative inclination of the orbital plane along the line-of-sight in degrees. This angle is measured differently than you’re used to: zero degrees is edge on and 90 degrees in face on. This angle will be subtracted from the base inclination of the planetary system to get the standard measurement of the inclination. Either this parameter or b can be specified but not both. (default: 0.0)
  • b

    The mean impact parameter of the orbit measured in stellar radii (not Solar radii). Specifically, this impact parameter is defined as

    \[b = \frac{a}{R_\star} \cos i \, \left(\frac{1 - e^2}{1+e\,\sin\omega} \right)\]

    (default: 0.0)

  • iy – The rotation of the orbital ellipse in the plane of the sky measured in radians. Note: this value will not affect the light curve or radial velocity values at all. (default: 0.0)
duration

The approximate duration of the transit \(T_\mathrm{tot}\) from Equation (14) in Winn (2010).

incl

The standard definition of inclination: 90-deg is edge on.

class transit.System(central, iobs=90.0)

A “planetary system” contains a “central” bright Central and some number (>= 0) Body objects orbiting. The default orbits are purely Keplerian but sub-classes can include more sophisticated solvers.

Parameters:central – A Central that specifies the central bright object.
Para iobs:The inclination of the mean orbital plane in degrees. This is measured in the standard way with zero inclination meaning face on and 90 degrees is edge on. (default: 90.0)
add_body(body)

Add a Body to the system. This function also sets the system attribute of the body.

Parameters:body – The Body to add.
light_curve(t, texp=0.0, tol=0.1, maxdepth=4)

Get the light curve evaluated at a list of times using the current model.

Parameters:
  • t – The times where the light curve should be evaluated (in days).
  • tol – The stopping criterion for the exposure time integration.
  • maxdepth – The maximum recursion depth of the exposure time integrator.