Define a disk that the observer sees
Put the stellar center at the origin of the observer’s sky plane. Measure projected distances in stellar radii, so the disk has radius one. Let the opaque planet have radius ratio and projected center distance . These are apparent projected disks; the planet is in front during the primary transit.
Let be received brightness per projected area at radial position . A small area contributes . Adding these contributions over the whole disk gives the unobscured host flux. Adding only the hidden contributions gives the loss.
For constant brightness, it cancels from the ratio. When the planet lies wholly inside the stellar disk, the lost fraction is at any fully contained position. At partial overlap, including a grazing midpoint, the numerator is the lens-shaped intersection.
Give the brightness a radial profile
On a spherical photosphere, define . It is the cosine of the angle between the local surface normal and our line of sight. The quadratic law specifies two dimensionless coefficients:
Expand the brackets into a constant term, a term proportional to and a term proportional to . An annulus of radius and width has area . This turns the disk integral into a one-dimensional sum of rings.
The three needed integrals are , and . For the middle one, substitute , so . Putting the terms together gives:
A physical profile needs positive intensity. A convenient restricted family has nonnegative coefficients whose sum is below one; it remains positive and darkens toward the edge. For more general coefficient pairs, check both positivity and the radial derivative.
Reading: Mandel & Agol 2002, Analytic Lightcurves, arXiv v1 · batman author tutorial and pinned package 2.5.3
Integrate only the covered part of each ring
At distance from the stellar center, a planet covers an angular segment of an annulus. Its two circle boundaries meet when the law of cosines is satisfied. For a partially covered ring:
This construction retains the finite planet size, including near contacts. Treating the entire blocked patch as one brightness value is a small-planet approximation. It can be useful, but should not silently replace the full integral for a large or grazing object.
The playable calculation evaluates the annular integral after a change of variable that smooths its contact endpoints. The independent reference uses the published Mandel–Agol analytic cases. Exactly when the planet edge passes through the stellar center, the saved comparison also keeps a separately evaluated special-case elliptic expression and a Cartesian area integral. The raw reference-library failure at that boundary remains in the downloadable results.
Work a centered brightness example
Take , and . The mean brightness over the stellar disk is . The central blocked patch is brighter than this average, so its transit must be deeper than the one-percent area limit.
For a centered planet, integrate complete rings from zero to . The substitution used above gives:
The default-results table below uses the actual synthetic records at their stated parameters and exposure windows. It lets you compare full and grazing paths and then isolate long exposure or extra light. Its digits describe those numerical examples, not the accuracy of a real stellar atmosphere law.
| Case | Radius ratio | Impact | Companion ratio | Window · seconds | Depth · parts per million | Duration · hours |
|---|---|---|---|---|---|---|
| Limb-darkened chord | ||||||
| Uniform area limit | ||||||
| Grazing | ||||||
| Long exposure | ||||||
| Companion light |
Add the companion before normalizing
Let a constant unresolved companion contribute a fraction of the unobscured host light. Add that light to both the in-transit and out-of-transit totals. Then:
For a uniform fully covered transit with , the host loss is 0.0144. Equal companion light gives a measured loss of 0.0072. Taking its square root without modeling the companion gives about 0.0849. Keeping the companion in the model recovers 0.12 for this ideal example.
A mission pipeline can already apply a crowding correction. The TESS PDCSAP product in our tutorial does so. Retaining its original metadata is essential: adding the same correction again would change the transit even though no new light was observed.
Reading: MAST TESS Data Product Overview · Morton et al. 2016, False Positive Probabilities, arXiv v1