Source-linked AI summary

PyTransit: Fast and Easy Exoplanet Transit Modelling in Python

Hannu Parviainen

arXiv:1504.07433v1astro-ph.EP

TL;DR

Large and increasingly complex transit datasets make model evaluation costly, especially for spectrophotometric observations with many passbands. PyTransit offers Python access to optimized Giménez and Mandel–Agol models; the quadratic Mandel–Agol model is significantly faster than the two-coefficient Giménez model, while interpolation can speed both. The package is a flexible toolkit for transit-light-curve modeling, with systematic interpolation errors that matter at extreme precision.

  • Problem

    Large transit datasets and the added dimensions of spectrophotometric observations increase the likelihood evaluations needed for transit analysis.

    Source: §1 · p. 1
  • Method

    PyTransit provides Python access to optimized Giménez and Mandel–Agol transit models, with Fortran/OpenMP implementations and partial OpenCL support for the interpolated quadratic Mandel–Agol model.

    Source: §1 · p. 2
  • Results

    The quadratic Mandel–Agol model is significantly faster than the two-coefficient Giménez model, and interpolation can speed both models, especially Mandel–Agol.

    Source: §5 · p. 5
  • Takeaways & Limitations

    PyTransit offers a flexible toolkit for modeling transit flux decrement as a function of planet-star distance, radius ratio, and stellar limb darkening.

    Source: §1 · p. 2

    Interpolation errors are small but systematic, so error evaluation is recommended when precision near 10^-7 for Mandel–Agol or 10^-5 for Giménez is required.

    Source: §5 · p. 5

Abstract

from arXiv · show

We present a fast and user friendly exoplanet transit light curve modelling package PyTransit, implementing optimised versions of the Gimen\'ez and the Mandel & Agol transit models. The package offers an object-oriented Python interface to access the two models implemented natively in Fortran with OpenMP parallelisation. A partial OpenCL version of the quadratic Mandel-Agol model is also included for GPU-accelerated computations. The aim of PyTransit is to facilitate the analysis of photometric time series of exoplanet transits consisting of hundreds of thousands of datapoints, and of multi-passband transit light curves from spectrophotometric observations, as a part of a researcher's programming toolkit for building complex, problem-specific, analyses.

1 INTRODUCTION

Growing transit datasets and more complex analyses make computationally expensive model evaluations a central concern. PyTransit provides Python access to optimized transit models as flexible building blocks for transit-light-curve analysis.

1 INTRODUCTION

  • Increasingly robust Bayesian inference and model selection, together with larger datasets and more ambitious analyses, raise the computational cost of high-dimensional likelihood evaluation.The introduction identifies the growing number of likelihood evaluations as a cost of analyzing complex models.Source: §1 · p. 1
  • Space-based and lucky-imaging light curves can contain tens to hundreds of thousands of exposures, while spectrophotometric data add passbands and typically 3–5 free parameters per passband.This added dimensionality increases the likelihood evaluations needed for representative MCMC posterior samples; one spectrophotometric transit can require resources comparable to a Kepler light curve spanning hundreds of transits.Source: §1 · p. 1
  • Transit shape models describe observed flux as a function of limb darkening, planet-star radius ratio, and projected planet-star distance.The Giménez and Mandel–Agol approaches factor out computationally intensive calculations from limb-darkening effects, supporting simultaneous modeling across passbands.Source: §1 · p. 1
  • PyTransit provides Python access to Giménez and Mandel–Agol transit models, implemented in optimized Fortran with OpenMP and a partial OpenCL implementation for the interpolated quadratic Mandel–Agol model.The package also includes orbit and transit utility routines and can compute models exactly or by interpolation.Source: §1 · p. 2
  • PyTransit follows a toolkit-based approach that allows users to combine samplers, optimizers, and noise models, but requires more user experience than off-the-shelf packages.Its scope centers on modeling flux decrement from planet-star distance, radius ratio, and stellar limb darkening; other packages address broader or specialized modeling needs.Source: §1 · p. 2

2.1 The Gim´enez Model

The Giménez model represents transit flux through a series expansion, with accuracy controlled by the number of Jacobi polynomials. The section describes its limb-darkening formulation and optimizations for multiple passbands and faster evaluation.

2.1.1 Overview

  • The model expresses normalized flux as one minus the fractional light loss, using a Jacobi-polynomial series whose terms depend on the radius ratio and projected separation.The section identifies the model as a series-expansion approach and traces it to work on eclipsing binaries by Kopal (1977).Source: §2.1.1 · p. 2
  • About 40 Jacobi polynomials can suffice for ground-based observations; smaller expansions can provide a rough solution before refinement.The deviation depends more on polynomial count than on limb darkening, though it also depends on limb darkening and the span of z-values.Source: §2.1.1 · p. 2

2.1.2 Limb darkening

  • The general limb-darkening law uses N coefficients; quadratic-law coefficients transform to the general-law coefficients as u1 = a + 2b and u2 = −b.Figure 1 plots maximum and mean absolute deviations against the number of Jacobi polynomials for two limb-darkening coefficients.Source: §2.1.2 · pp. 2–3, Figure 1 · p. 3

2.1.3 Optimisation: Simultaneous Multiple Passbands

  • For multiple passbands, the model can reuse the α_n terms and evaluate different limb-darkening coefficient vectors without recomputing the full model for each band.The coefficients C_n do not depend on k or z and are cheap to compute.Source: §2.1.3 · p. 3

2.1.4 Optimisation: Precomputing the Model Coefficients

  • Precomputing model coefficients and Jacobi-polynomial recursion terms reduces evaluation for given parameters to summations and multiplications.The precomputed values are stored in two-dimensional lookup tables indexed by expansion depth and number of limb-darkening coefficients.Source: §2.1.4 · p. 3

2.2 The Quadratic Mandel-Agol Model

The quadratic Mandel–Agol model expresses transit flux using limb-darkening coefficients and functions of radius ratio and projected distance. Its expensive limb-darkening-independent calculations can be reused across passbands, while interpolation tables accelerate evaluation with small quantified errors.

2.2.1 Overview

  • In the quadratic Mandel–Agol model, flux depends on radius ratio k, projected distance z, quadratic limb-darkening coefficients a and b, and functions λe, λd, and ηd.The coefficients combine as c = a + 2b; the three functions depend on k and z.Source: §2.2.1 · p. 3

2.2.2 Optimisation: Simultaneous Multiple Passbands

  • Factoring limb-darkening effects out of the expensive calculations enables efficient evaluation of multiple simultaneous passbands with different limb-darkening coefficients.Source: §2.2.2 · p. 3

2.2.3 Optimisation: Precomputing Interpolation Tables

  • Precomputed two-dimensional tables for λd, λe, and ηd over z and prior-bounded k replace their direct evaluations with interpolation and a small set of arithmetic operations.Source: §2.2.3 · p. 3
  • At nk = 128 and nz = 256 with Δk = 0.02, interpolation has a maximum absolute deviation of about 4 ppm and a whole-transit average deviation of 0.05 ppm.With nk = 8 at Δk = 0.02, the maximum absolute deviation is about 8 ppm; reducing nz affects error more than reducing nk.Source: §2.2.3 · p. 3

3 IMPLEMENTATION

PyTransit wraps the Giménez and Mandel–Agol models in Python, with supersampling, interpolation, GPU computation, and a transmission-spectroscopy approximation. These options target long exposures, large light curves, and simultaneous passbands, with stated accuracy and hardware limits.

3.1 Overview

  • The Python interface wraps Fortran 2003 implementations of both models with OpenMP, automatic supersampling, and Giménez z-space interpolation; quadratic Mandel–Agol instead uses interpolation tables.Source: §3.1 · p. 4

3.2 Model Supersampling

  • For long exposures, PyTransit evaluates n evenly distributed subsamples and represents each light-curve point by their mean.The user chooses n based on exposure time and transit duration.Source: §3.2 · p. 4

3.3 Gim´enez Model Interpolation in z-Space

  • For light curves with hundreds of thousands of points, z-space interpolation can speed the Giménez model; its default grid yields about 25 ppm maximum and 2 ppm average absolute error.Source: §3.3 · p. 4

3.4 Partial OpenCL Acceleration of the MA model

  • The OpenCL interpolated quadratic Mandel–Agol model is slower than Fortran for small curves because memory transfers dominate, but basic usage is faster above 2 × 10^5 points.Offloading z and likelihood calculations as well can reduce transfer overhead and yield speedups on smaller curves.Source: §3.4 · p. 4

3.5 Applicability to Transmission Spectroscopy

  • For transmission spectroscopy, PyTransit approximates small relative changes in effective radius ratio as depth-only changes, evaluating at the mean ratio and scaling each passband by ki^2/ˆk^2.This assumes changes to transit duration and shape remain below observation limits.Source: §3.5 · p. 4

4 PERFORMANCE

Benchmarks compare direct and interpolated models across two desktop setups, with results shown for the Intel system. The quadratic Mandel–Agol model is faster than the two-coefficient Giménez model, while GPU overhead and thread scaling depend on workload and hardware.

4 PERFORMANCE

  • Benchmarks used Intel i7-3770 and AMD FX-8350 desktops; performance scaled equivalently except for threading, and only Intel results are shown.Source: §4 · p. 4
  • The quadratic Mandel–Agol model is significantly faster than the two-coefficient Giménez model, while OpenCL interpolation is slower than Fortran on small curves because of memory transfers.The benchmark used curves with 35% in-transit points; offloading remaining computations to GPU can alleviate transfer costs.Source: §4 · p. 4, Figure 2 · p. 5
  • Simultaneous-passband evaluation shows speedup relative to evaluating one passband, as shown in Figure 3.Source: §4 · p. 4
  • Optimal thread counts differ by setup: three threads for Intel and six for AMD, with the AMD result not shown.Figure 4 plots Intel evaluation time against thread count relative to each model's one-thread time.Source: §4 · p. 4, Figure 2 · p. 5

5 CONCLUSIONS AND DISCUSSION

The conclusions describe PyTransit as a freely available package with optimized transit models and interpolation options. They emphasize speed–accuracy considerations, different strengths of the two models, and relative evaluation times across simultaneous passbands.

5 CONCLUSIONS AND DISCUSSION

  • PyTransit is freely available and under continuing development, and its Fortran routines can also be used directly as modules.The package includes IPython notebook examples and points to in-depth transit-characterisation tutorials.Source: §5 · p. 5
  • Figure 3 compares evaluation times as simultaneous passbands increase relative to one passband; interpolated-model gains are smaller because less computation depends on limb darkening.Source: Figure 3 · p. 5
  • Interpolation speeds both models, especially Mandel–Agol, but introduces small systematic errors; evaluate those errors when extreme precision is required.The cited discussion identifies approximately 10^-7 precision for Mandel–Agol and 10^-5 for Giménez.Source: §5 · p. 5
  • The quadratic Mandel–Agol model is significantly faster than the two-coefficient Giménez model, while Giménez supports higher-order limb darkening.Source: §5 · p. 5
  • The code has been used in nine cited studies spanning 2011–2015.Source: §5 · p. 5
Loading 1504.07433v1…