HarmonicaTransit
- class harmonica.HarmonicaTransit(times=None, pnl_c=20, pnl_e=50)[source]
Bases:
objectHarmonica transit class.
Compute transit light curves for a given transmission string through parameterising the planet shape as a Fourier series.
- Parameters:
times (ndarray, optional) – 1D array of model evaluation times [days].
pnl_e (pnl_c and) – Number of legendre roots used to approximate the integrals with no closed form solution. pnl_c corresponds to when the planet lies entirely inside the stellar disc, and pnl_e corresponds to when the planet intersects the stellar limb. Allowed values = {10, 20, 100, 200, 500}. Use get_precision_estimate() to check model precision.
Notes
The algorithm is detailed in Grant and Wakeford 2023.
- set_orbit(t0=None, period=None, a=None, inc=None, ecc=0.0, omega=0.0)[source]
Set/update orbital parameters.
- Parameters:
t0 (float) – Time of transit [days].
period (float) – Orbital period [days].
a (float) – Semi-major axis [stellar radii].
inc (float) – Orbital inclination [radians].
ecc (float, optional) – Eccentricity [], 0 <= ecc < 1. Default=0.
omega (float, optional) – Argument of periastron [radians]. Default=0.
- set_stellar_limb_darkening(u=None, limb_dark_law='quadratic')[source]
Set/update stellar limb darkening parameters.
- Parameters:
u (ndarray) – 1D array of limb-darkening coefficients which correspond to the limb-darkening law specified by limb_dark_law. The quadratic law requires two coefficients and the non-linear law requires four coefficients.
limb_dark_law (string, optional; quadratic or non-linear) – The stellar limb darkening law. Default=`quadratic`.
- set_planet_transmission_string(r=None)[source]
Set/update planet transmission string parameters.
- Parameters:
r (ndarray (N,) or (M, N)) –
Transmission string coefficients. 1D array of N Fourier coefficients that specify the planet radius as a function of angle in the sky-plane.
\[r_{\rm{p}}(\theta) = \sum_{n=0}^N a_n \cos{(n \theta)} + \sum_{n=1}^N b_n \sin{(n \theta)}\]The input array is given as r=[a_0, a_1, b_1, a_2, b_2,..]. For time-dependent transmission strings, use a 2D array with M time steps and N Fourier coefficients, where M is equal to the number of model evaluation times.
- get_transit_light_curve()[source]
Get transit light curve.
- Returns:
fluxes – The transit light curve fluxes evaluated at M times.
- Return type:
ndarray (M,)
- get_planet_transmission_string(theta)[source]
- Get transmission string evaluated at an array of angles
around the planet’s terminator.
- Parameters:
theta (ndarray,) – 1D array of angles at which to evaluate the transmission string.
- Returns:
if r.ndim == 1 –
- r_pndarray (N,)
The transmission string, \(r_{\rm{p}}(\theta)\), evaluated at N thetas.
elif r.ndim == 2 –
- r_pndarray (M, N)
The transmission strings, \(r_{\rm{p}}(\theta)\), each M strings evaluated at N provided thetas.