Skip to content

fbartolic/caustics

Repository files navigation


caustics

tests

caustics is a code for computing microlensing light curves of single, binary, and triple lens systems using the contour integration method. It is built using the JAX library which enables the computation of exact gradients of the code outputs with respect to all input parameters through the use of automatic differentiation.

Installation

caustics is still being actively developed and is not yet released on PyPI. To install the development version, clone this repository, create a new conda environment, cd into the repository and run

conda env update --file environment.yml && pip install .

caustics does not currently support Apple M1 processors except via Rosetta emulation. To install it open the terminal through Rosetta and the command from above.

Features

  • Fast (miliseconds) and accurate computation of binary and triple lens microlensing light curves for extended limb-darkened sources.
  • Automatic differentiation enables the use of gradient-based inference methods such as Hamiltonian Monte Carlo when fitting multiple lens microlensing light curves.
  • A differentiable JAX version of a complex polynomial root solver CompEA which uses the Aberth-Ehrlich method to obtain all roots of a complex polynomial at once using an implicit deflation strategy. The gradient of the solutions with respect to the polynomial coefficients is obtained through implicit differentiation.
  • Hexadecapole approximation from Cassan 2017 is used to substantially speed up the computation of the magnification everywhere except near the caustics.

References

Releases

No releases published

Packages

No packages published