Transit Utilities

In order to enable fast simulation of large numbers of eclipses, vespa makes use of the Mandel-Agol (2002) transit model implemented by the batman module.

vespa.transit_basic.ldcoeffs(teff, logg=4.5, feh=0)[source]

Returns limb-darkening coefficients in Kepler band.

vespa.transit_basic.impact_parameter(a, R, inc, ecc=0, w=0, return_occ=False)[source]

a in AU, R in Rsun, inc & w in radians

vespa.transit_basic.transit_T14(P, Rp, Rs=1, b=0, Ms=1, ecc=0, w=0)[source]

P in days, Rp in Earth radii, Rs in Solar radii, b=impact parameter, Ms Solar masses. Returns T14 in hours. w in deg.

vespa.transit_basic.minimum_inclination(P, M1, M2, R1, R2)[source]

Returns the minimum inclination at which two bodies from two given sets eclipse

Only counts systems not within each other’s Roche radius

Parameters:
  • P – Orbital periods.
  • M1,M2,R1,R2 – Masses and radii of primary and secondary stars.
vespa.transit_basic.a_over_Rs(P, R2, M2, M1=1, R1=1, planet=True)[source]

Returns a/Rs for given parameters.

vespa.transit_basic.eclipse_pars(P, M1, M2, R1, R2, ecc=0, inc=90, w=0, sec=False)[source]

retuns p,b,aR from P,M1,M2,R1,R2,ecc,inc,w

vespa.transit_basic.eclipse_tt(p0, b, aR, P=1, ecc=0, w=0, npts=100, u1=0.394, u2=0.261, conv=True, cadence=0.018819444444444444, frac=1, sec=False, pars0=None, tol=0.0001, width=3)[source]

Trapezoidal parameters for simulated orbit.

All arguments passed to eclipse() except the following:

Parameters:pars0 – (optional) Initial guess for least-sq optimization for trapezoid parameters.
Return dur,dep,slope:
 Best-fit duration, depth, and T/tau for eclipse shape.
vespa.transit_basic.occultquad(z, u1, u2, p0, return_components=False)[source]

#### Mandel-Agol code: # Python translation of IDL code. # This routine computes the lightcurve for occultation of a # quadratically limb-darkened source without microlensing. Please # cite Mandel & Agol (2002) and Eastman & Agol (2008) if you make use # of this routine in your research. Please report errors or bugs to # jdeast@astronomy.ohio-state.edu

Note

Should probably wrap the Fortran code at some point. (This particular part of the code was put together awhile ago.)

class vespa.transit_basic.TraptransitModel(ts, fs, sigs=0.0001, maxslope=30)[source]

Model to enable MCMC fitting of trapezoidal shape.

vespa.transit_basic.traptransit_MCMC(ts, fs, dfs=1e-05, nwalkers=200, nburn=300, niter=1000, threads=1, p0=[0.1, 0.1, 3, 0], return_sampler=False, maxslope=30)[source]

Fit trapezoidal model to provided ts, fs, [dfs] using MCMC.

Standard emcee usage.