Overview¤
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. It has the following feautures:
- 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.
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.
References¤
caustics
paper coming soon!- Light-curve calculations for triple microlensing systems
- On a compensated Ehrlich-Aberth method for the accurate computation of all polynomial roots
- A robust and efficient method for calculating the magnification of extended sources caused by gravitational lenses
- VBBINARYLENSING: a public package for microlensing light-curve computation
- Fast computation of quadrupole and hexadecapole approximations in microlensing with a single point-source evaluation