English

The BAGLE Python Package for Bayesian Analysis of Gravitational Lensing Events

Solar and Stellar Astrophysics 2025-12-04 v1 Earth and Planetary Astrophysics Astrophysics of Galaxies Instrumentation and Methods for Astrophysics

Abstract

We present the open-source Python package, BAGLE (Bayesian Analysis of Gravitational Lensing Events), 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 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 light curves to those from other papers and microlens modeling software, finding good agreement, although with some differences in finite-source models at a ~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 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 2x shorter in duration than from ground-based surveys. Additionally, long-duration events with durations of \tE,>\t_{E,\odot} > 100 days will yield microlensing parallax uncertainties of σπE<{\sigma}_{\pi_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.

Keywords

Cite

@article{arxiv.2512.03364,
  title  = {The BAGLE Python Package for Bayesian Analysis of Gravitational Lensing Events},
  author = {J. R. Lu and M. Medford and C. Y. Lam and T. D. Bhadra and M. J. Huston and N. S. Abrams and E. Broadberry and J. Chen and S. K. Terry and N. Arredondo and A. Scharf},
  journal= {arXiv preprint arXiv:2512.03364},
  year   = {2025}
}

Comments

submitted

R2 v1 2026-07-01T08:06:55.298Z