The BAGLE Python Package for Bayesian Analysis of Gravitational Lensing Events
Abstract
Abstract We present the open-source Python package, Bayesian Analysis of Gravitational Lensing Events (BAGLE), which enables modeling and joint fitting of photometric and astrometric data sets. We describe the model parameterizations and present the equations for microlensing events containing either a point-source, point-lens, or a finite-source, point-lens geometry both with and without a microlensing parallax due to the motion of the Earth or a satellite around the Sun. Conversions between different coordinate reference frames are also derived. We compare our model lightcurves to those from other papers and microlens modeling software, finding good agreement, although with some differences in the finite-source models at the ∼1% level detectable with upcoming observations from space-based facilities. We also use BAGLE to demonstrate the impact of changing lens mass, lens distance, and blended source flux fraction on photometric lightcurves and astrometric trajectories in preparation for upcoming Gaia data releases and the launch of the Nancy Grace Roman Space Telescope (Roman) and its Galactic Bulge Time Domain Survey (GBTDS). In particular, we show that Roman GBTDS will detect significant microlensing parallax signals for events that are 2× shorter in duration than from ground-based surveys. Additionally, long-duration events with durations of t E,⊙ > 100 days will yield microlensing parallax uncertainties of σ π E < 0.01 with Roman, enabling confident identification of isolated stellar-mass black holes that can be modeled both astrometrically and photometrically with BAGLE for precise mass determinations. BAGLE is an open-source code and community development is encouraged.
Fields of Study & Subjects
Stellar
planetary
and galactic studies
Gamma-ray bursts and supernovae
Astronomy and Astrophysical Research
Publication details
- Journal / source
- The Astronomical Journal
- Volume
- 172
- Issue
- 1
- Pages
- 30–30
- Publication date
- 17 June 2026
- Language
- EN