Limb darkening functions#
pytransit.models.limb_darkening holds the Numba-compiled limb darkening profiles that
RoadRunnerModel uses. See
Limb darkening for the narrative description and for how to supply your own.
Each law is defined by up to three functions:
ld_<model>(mu, pv)The intensity profile, evaluated at the cosine of the viewing angle
mufor the coefficientspv.ldi_<model>(pv)The disk-integrated stellar intensity \(2\pi \int_0^1 I(\mu)\, z\, dz\), where an analytic solution exists. RoadRunner uses it to normalise the model; without one, it integrates the profile numerically on every evaluation.
ldd_<model>(mu, pv)The derivatives of the profile, where implemented.
A model is passed to RoadRunner either by name or as the (ld_<model>, ldi_<model>) pair.
from pytransit import RoadRunnerModel
from pytransit.models.limb_darkening import ld_power_2, ldi_power_2
tm = RoadRunnerModel('power-2') # by name
tm = RoadRunnerModel((ld_power_2, ldi_power_2)) # equivalently, by function pair
Note
These are Numba CPUDispatcher objects rather than plain Python functions. They can be
called from Python and from other Numba-compiled functions alike, and a profile you write
yourself must be @njit-decorated to be usable by the model.
Uniform#
- pytransit.models.limb_darkening.ld_uniform(mu, pv)[source]#
Uniform (no limb darkening) intensity profile.
\[I(\mu) = 1\]- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Unused, present for interface compatibility.
- Returns:
ndarray – Stellar intensity, unity everywhere.
Linear#
- pytransit.models.limb_darkening.ld_linear(mu, pv)[source]#
Linear limb darkening profile.
\[I(\mu) = 1 - u(1 - \mu)\]- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[u].
- Returns:
ndarray – Stellar intensity.
Quadratic#
- pytransit.models.limb_darkening.ld_quadratic(mu, pv)[source]#
Quadratic limb darkening profile (Kopal 1950).
\[I(\mu) = 1 - u(1 - \mu) - v(1 - \mu)^2\]The most widely used limb darkening law in transit modelling. It is flexible enough for most optical photometry but systematically misrepresents the profile of cool stars near the limb; see
ld_power_2()for an alternative with the same number of coefficients.- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[u, v].
- Returns:
ndarray – Stellar intensity.
Quadratic, triangular parametrisation#
- pytransit.models.limb_darkening.ld_quadratic_tri(mu, pv)[source]#
Quadratic limb darkening profile with the triangular sampling parametrisation.
The quadratic law reparametrised following Kipping (MNRAS 435, 2152, 2013) as
\[u = 2\sqrt{q_1} q_2, \qquad v = \sqrt{q_1}(1 - 2 q_2)\]A uniform prior on \((q_1, q_2) \in [0,1]^2\) maps to a uniform prior over the whole region of \((u, v)\) space that gives a physically valid (everywhere positive, monotonically decreasing) intensity profile. This makes it the right parametrization for sampling limb darkening coefficients with uninformative priors.
- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Triangular sampling coefficients
[q1, q2], both in [0, 1].
- Returns:
ndarray – Stellar intensity.
Power-2#
- pytransit.models.limb_darkening.ld_power_2(mu, pv)[source]#
Power-2 limb darkening profile (Hestroffer, A&A 327, 199, 1997).
\[I(\mu) = 1 - c(1 - \mu^{\alpha})\]A two-coefficient law that reproduces the limb darkening of cool stars considerably better than the quadratic law, especially in the near-infrared, and is the recommended two-parameter law for M dwarfs.
- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[c, alpha].
- Returns:
ndarray – Stellar intensity.
See also
ld_power_2_pmthe same law in the better-behaved (h1, h2) parametrisation.
Power-2, (h1, h2) parametrisation#
- pytransit.models.limb_darkening.ld_power_2_pm(mu, pv)[source]#
Power-2 limb darkening profile in the (h1, h2) parametrisation.
The power-2 law reparametrised following Maxted (A&A 622, A33, 2018) using the intensity at two fixed points on the disk,
\[h_1 = I(\mu = 1/2), \qquad h_2 = h_1 - I(\mu = 1/\sqrt{2}),\]which are far less correlated than \((c, \alpha)\) and therefore much better behaved as free parameters in a fit.
- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[h1, h2].
- Returns:
ndarray – Stellar intensity.
Square root#
- pytransit.models.limb_darkening.ld_square_root(mu, pv)[source]#
Square-root limb darkening profile (Diaz-Cordoves & Gimenez, A&A 259, 227, 1992).
\[I(\mu) = 1 - u(1 - \mu) - v(1 - \sqrt{\mu})\]- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[u, v].
- Returns:
ndarray – Stellar intensity.
Logarithmic#
- pytransit.models.limb_darkening.ld_logarithmic(mu, pv)[source]#
Logarithmic limb darkening profile (Klinglesmith & Sobieski, AJ 75, 175, 1970).
\[I(\mu) = 1 - u(1 - \mu) - v\,\mu \ln \mu\]- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight. The profile diverges as \(\mu \to 0\), so the exact stellar limb needs care.
pv (ndarray) – Limb darkening coefficients
[u, v].
- Returns:
ndarray – Stellar intensity.
Exponential#
- pytransit.models.limb_darkening.ld_exponential(mu, pv)[source]#
Exponential limb darkening profile (Claret & Hauschildt, A&A 412, 241, 2003).
\[I(\mu) = 1 - u(1 - \mu) - \frac{v}{1 - e^{\mu}}\]- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[u, v].
- Returns:
ndarray – Stellar intensity.
Non-linear#
- pytransit.models.limb_darkening.ld_nonlinear(mu, pv)[source]#
Four-coefficient non-linear limb darkening profile (Claret, A&A 363, 1081, 2000).
\[I(\mu) = 1 - c_1(1 - \mu^{1/2}) - c_2(1 - \mu) - c_3(1 - \mu^{3/2}) - c_4(1 - \mu^2)\]The standard law for tabulated theoretical limb darkening coefficients. Its four coefficients are strongly correlated, so it is usually a poor choice for fitting but a good one for fixing limb darkening to model predictions.
- Parameters:
mu (ndarray) – Cosine of the angle between the surface normal and the line of sight.
pv (ndarray) – Limb darkening coefficients
[c1, c2, c3, c4].
- Returns:
ndarray – Stellar intensity.
General#
Evaluation helpers#
These evaluate a limb darkening model for 1D, 2D, or 3D coefficient arrays, normalising the result
to the (npv, npb, nmu) layout the models expect.
- pytransit.models.limb_darkening.evaluate_ld(ldm, mu, pvo)[source]#
Evaluate a limb darkening model for 1D, 2D, or 3D parameter arrays.
The parameters can be given as a 1D array with a shape (nldc), a 2D array with a shape (npb, nldc), or a 3D array with a shape (npv, npb, nldc), where nldc is the number of limb darkening coefficients, npb is the number of passbands, and npv is the number of parameter vectors.
Returns the limb darkening profiles as a 3D array with a shape (npv, npb, nmu).