title | tags | authors | affiliations | date | bibliography | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
`exoplanet`: Gradient-based probabilistic inference for exoplanet data & other astronomical time series |
|
|
|
23 April 2021 |
paper.bib |
exoplanet
is a toolkit for probabilistic modeling of astronomical time series
data, with a focus on observations of exoplanets, using PyMC3
[@pymc3].
PyMC3
is a flexible and high-performance model-building language and inference
engine that scales well to problems with a large number of parameters.
exoplanet
extends PyMC3
’s modeling language to support many of the custom
functions and probability distributions required when fitting exoplanet datasets
or other astronomical time series.
While it has been used for other applications, such as the study of stellar
variability [e.g., @gillen20; @medina20], the primary purpose of exoplanet
is
the characterization of exoplanets [e.g., @gilbert20; @plavchan20] or multiple-star
systems [e.g., @czekala21] using time-series photometry, astrometry, and/or
radial velocity. In particular, the typical use case would be to use one or more
of these datasets to place constraints on the physical and orbital parameters of
the system, such as planet mass or orbital period, while simultaneously taking
into account the effects of stellar variability.
Time-domain astronomy is a priority of the observational astronomical community,
with huge survey datasets currently available and more forthcoming. Within this
research domain, there is significant investment into the discovery and
characterization of exoplanets, planets orbiting stars other than our Sun. These
datasets are large (on the scale of hundreds of thousands of observations per
star from space-based observatories such as Kepler and TESS), and the
research questions are becoming more ambitious (in terms of both the
computational cost of the physical models and the flexibility of these models).
The packages in the exoplanet ecosystem are designed to enable rigorous
probabilistic inference with these large datasets and high-dimensional models by
providing a high-performance and well-tested infrastructure for integrating
these models with modern modeling frameworks such as PyMC3
. Since its initial
release at the end of 2018, exoplanet
has been widely used, with 64
citations of the Zenodo record [@zenodo] so far.
Besides the primary exoplanet
package, the exoplanet ecosystem of projects
includes several other libraries. This paper describes, and is the primary
reference for, this full suite of packages. The following provides a short
description of each library within this ecosystem and discusses how they are
related.
exoplanet
1 is the primary library, and it includes implementations of many special functions required for exoplanet data analysis. These include the spherical geometry for computing orbits, some exoplanet-specific distributions for eccentricity [@kipping13b; @vaneylen19] and limb darkening [@kipping13], and exposure-time integrated limb-darkened transit light curves.exoplanet-core
2 provides efficient, well-tested, and differentiable implementations of all of the exoplanet-specific operations that must be compiled for performance. These include an efficient solver for Kepler's equation [based on the algorithm proposed by @raposo17] and limb darkened transit light curves [@agol20]. Besides the implementation forPyMC3
,exoplanet-core
includes implementations innumpy
[@numpy] andjax
[@jax].celerite2
3, is an updated implementation of the celerite algorithm4 [@foremanmackey17; @foremanmackey18] for scalable Gaussian Process regression for time series data. Likeexoplanet-core
,celerite2
includes support fornumpy
,jax
, andPyMC3
, as well as some recent generalizations of the celerite algorithm [@gordon20].pymc3-ext
5, includes a set of helper functions to makePyMC3
more amenable to the typical astronomical data analysis workflow. For example, it provides a tuning schedule forPyMC3
's sampler [based on the method used by theStan
project and described by @carpenter17] that provides better performance on models with correlated parameters.rebound-pymc3
6 provides an interface between REBOUND [@rein12], REBOUNDx [@tamayo20], andPyMC3
to enable inference with full N-body orbit integration.
The main documentation page for the exoplanet libraries lives at
docs.exoplanet.codes where it is hosted on
ReadTheDocs. The tutorials included with the
documentation are automatically executed on every push or pull request to the
GitHub repository, with the goal of ensuring that the tutorials are always
compatible with the current version of the code. The celerite2
project has its
own documentation page at
celerite2.readthedocs.io, with tutorials
that are similarly automatically executed.
Alongside these documentation pages, there is a parallel "Case Studies" website
at gallery.exoplanet.codes that includes more
detailed example use cases for exoplanet
and the other libraries described
here. Like the tutorials on the documentation page, these case studies are
automatically executed using GitHub Actions, but at lower cadence (once a week
and when a new release of the exoplanet
library is made) since the runtime is
much longer. \autoref{fig:figure} shows the results of two example case studies
demonstrating some of the potential use cases of the exoplanet
software
ecosystem.
There is a rich ecosystem of tooling available for inference with models such as
the ones supported by exoplanet
. Each of these tools has its own set of
strengths and limitations and we will not make a detailed comparison here, but
it is worth listing some of these tools and situating exoplanet
in this
context.
Some of the most popular tools in this space include (and note that this is far
from a comprehensive list!) EXOFAST
[@eastman13; @eastman19], radvel
[@fulton18], juliet
[@espinoza19], exostriker
[@trifonov19], PYANETI
[@barragan19], allesfitter
[@guenther20], and orbitize
[@blunt20]. Similar
tools also exist for modeling observations of eclipsing binary systems,
including JKTEBOP
[@southworth04], eb
[@irwin11], and PHOEBE
[@conroy20].
These packages all focus on providing a high-level interface for designing
models and then executing a fit. In contrast, exoplanet
is designed to be lower
level and more conceptually similar to tools like batman
[@kreidberg15],
PyTransit
[@parviainen15], ldtk
[@parviainen15b], ellc
[@maxted16],
starry
[@luger19], or Limbdark.jl
[@agol20], which provide the building
blocks for evaluating the models required for inference with exoplanet datasets.
In fact, several of the higher-level packages listed above include these
lower-level libraries as dependencies, and our hope is that exoplanet
could
provide the backend for future high-level libraries.
As emphasized in the title of this paper, the main selling point of exoplanet
when compared to other tools in this space is that it supports differentiation
of all components of the model and is designed to integrate seamlessly with the
aesara
[@aesara] automatic differentiation framework used by PyMC3
. It is
worth noting that aesara
was previously known as Theano
[@theano], so these
names are sometimes used interchangeably in the PyMC3
or exoplanet
documentation7. This allows the use of modern inference
algorithms such as No U-Turn Sampling [@hoffman14] or Automatic Differentiation
Variational Inference [@kucukelbir17]. These algorithms can have some
computational and conceptual advantages over inference methods that do not use
gradients, especially for high-dimensional models. The computation of gradients
is also useful for model optimization; this is necessary when, say, searching
for new exoplanets, mapping out degeneracies or multiple modes of a posterior,
or estimating uncertainties from a Hessian. Care has been taken to provide
gradients which are numerically stable, and more accurate and faster to evaluate
than finite-difference gradients.
We would like to thank the Astronomical Data Group at Flatiron for listening to every iteration of this project and for providing great feedback every step of the way.
This research was partially conducted during the Exostar19 program at the Kavli Institute for Theoretical Physics at UC Santa Barbara, which was supported in part by the National Science Foundation under Grant No. NSF PHY-1748958.
Besides the software cited above, exoplanet
is also built on top of ArviZ
[@arviz] and AstroPy
[@astropy13; @astropy18].
Footnotes
-
More information about this distinction is available at https://docs.exoplanet.codes/en/stable/user/theano/ ↩