Source-linked AI summary
batman: BAsic Transit Model cAlculatioN in Python
Laura Kreidberg
TL;DR
Transit light-curve models must be computed accurately and efficiently across diverse stellar limb-darkening profiles. The paper introduces batman, an open-source Python package combining analytic models with a new numerical integration scheme, and reports fast modeling with tunable truncation error, while noting limitations in its eclipse assumptions and timing utilities.
Problem
Transit light curves are fundamental to exoplanet science, but computing models quickly and accurately is difficult across different stellar limb-darkening laws.
Method
batman combines analytic transit models with a one-dimensional integration algorithm for radially symmetric limb-darkening profiles, implemented with C extensions and OpenMP parallelization.
Results
For a 100-point transit on a 1.7 GHz Intel Core i5, reducing truncation error by 10× increases computation time threefold, while nonlinear analytic models can be over an order of magnitude slower than numeric integration at 0.1 ppm tolerance.
Takeaways & Limitations
batman provides open-source transit and eclipse light-curve modeling for multiple limb-darkening laws with truncation errors tunable to approximately 10^-3 ppm for typical profiles.
Takeaways & Limitations
batman does not correct for light-travel-time effects, and its secondary-eclipse model assumes constant planet flux across orbital phases.
Abstract
from arXiv · showhide
I introduce batman, a Python package for modeling exoplanet transit light curves. The batman package supports calculation of light curves for any radially symmetric stellar limb darkening law, using a new integration algorithm for models that cannot be quickly calculated analytically. The code uses C extension modules to speed up model calculation and is parallelized with OpenMP. For a typical light curve with 100 data points in transit, batman can calculate one million quadratic limb-darkened models in 30 seconds with a single 1.7 GHz Intel Core i5 processor. The same calculation takes seven minutes using the four-parameter nonlinear limb darkening model (computed to 1 ppm accuracy). Maximum truncation error for integrated models is an input parameter that can be set as low as 0.001 ppm, ensuring that the community is prepared for the precise transit light curves we anticipate measuring with upcoming facilities. The batman package is open source and publicly available at https://github.com/lkreidberg/batman .
1. Introduction
Transit light curves have become a powerful source of exoplanet information, but modeling them quickly and accurately remains challenging. batman addresses this need with an open-source Python package supporting fast transit and eclipse calculations across radially symmetric limb-darkening laws.
- Transit observations have discovered thousands of planets and constrained occurrence rates across planet sizes, orbital periods, and host-star properties.
- Upcoming facilities will measure precise transit light curves for thousands of exoplanets, advancing studies of planet formation, evolution, and habitability.
- Accurate transit modeling must account for planetary size and position, stellar limb darkening, and the need to calculate many models for robust parameter and uncertainty estimation.
- Existing software provides analytic or numerical transit models, but coverage varies across limb-darkening laws and implementations.
- batman is an open-source Python package that rapidly computes transit light curves for any radially symmetric limb-darkening law and also supports secondary eclipse modeling.
2. Algorithm
The algorithm replaces slow two-dimensional numerical integration with a faster one-dimensional radial integration for radially symmetric stellar intensity profiles. It approximates intensity over annular area elements and uses adaptive step sizes to preserve accuracy efficiently.
- The blocked stellar-flux fraction is obtained by integrating stellar intensity over the area obscured by the planet.
- For radially symmetric intensity profiles, the two-dimensional calculation is reduced to one dimension using radial coordinates and circle-intersection areas.
- The algorithm sums intensity-weighted differential areas defined by differences between circle-intersection areas across radial steps.
- The method is faster than simpler area-element schemes because expensive intersection-area calculations are needed relatively few times for sub-ppm accuracy.
- Nonuniform radial steps use smaller increments near the stellar limb, where intensity gradients are typically larger.
3. The batman package
batman combines analytic and numerical models with performance and accuracy controls for transit and eclipse light curves. It supports multiple limb-darkening laws, orbital utilities, secondary eclipses, and high-precision numerical integration.
- Package capabilities: batman is an open-source Python package implementing analytic transit models and the new numerical integration algorithm.The package is developed on GitHub and implements the algorithm described in the paper alongside analytic models.
- Limb darkening models: Seven stellar limb-darkening models are supported, with uniform, linear, and quadratic cases calculated analytically and the remaining cases computed numerically.The supported models are uniform, linear, quadratic, square-root, logarithmic, exponential, and four-parameter nonlinear.
- Secondary eclipses: Secondary eclipse models use normalized flux, the planet-to-star flux ratio, and the fraction of the planet disk occulted by the star.The eclipse model assumes that planet flux remains constant over all orbital phases.
- Orbital utilities: Orbital utilities calculate the star–planet separation from semi-major axis, inclination, eccentricity, periastron, period, and inferior-conjunction time.The package also computes periastron, inferior-conjunction, and secondary-eclipse times, without correcting for light-travel-time effects.
- Accuracy: The integration step size is tuned during initialization to keep truncation error below a specified threshold, with typical profiles reliable down to ~10^-3 ppm.Tuning requires computing approximately 10 light-curve models, while direct step-size selection is also available.
- Validation: The analytic quadratic model reaches 0.03 ppm accuracy in a test case, while the Mandel & Agol implementation exceeded 2 ppm near rp − d < ε.The Bulirsch elliptic-integral algorithm was both faster and well-behaved in that case.
- Performance: C extension modules improve quadratic-model performance by a factor of 30 over pure Python, with optional OpenMP parallelization.Performance tests used a 1.7 GHz Intel Core i5 processor and a 100-point transit light curve; the nonlinear comparison is shown against an analytic quadratic model.
- Nonlinear limb darkening: For four-parameter nonlinear limb darkening, numerical integration was chosen because the Appell F1 analytic approach was inaccurate for some inputs and over an order of magnitude slower when accurate.The comparison supported integration as the faster and easier solution for this limb-darkening law.
4. Summary
batman combines a new transit-light-curve algorithm with an open-source Python package supporting multiple radially symmetric limb darkening laws. Its C extensions, OpenMP parallelization, and sub-0.001 ppm accuracy target precise future observations.
- batman introduces a new algorithm for computing transit light curves with any radially symmetric stellar limb darkening law.
- The open-source Python package supports uniform, linear, quadratic, logarithmic, exponential, and four-parameter nonlinear limb darkening.
- C extension modules and OpenMP parallelization optimize batman’s light-curve computation performance.
- Light curves can be calculated with accuracy better than 0.001 ppm for anticipated extraordinarily precise data.