When massive galaxies bend spacetime so dramatically that they turn into cosmic magnifying glasses, we witness one of Einstein’s most spectacular predictions in action. Strong gravitational lensing creates multiple images of distant galaxies, stretches them into luminous arcs, and even allows us to peer deeper into the universe than would otherwise be possible. But extracting science from these warped cosmic mirages requires sophisticated mathematical modeling - and that’s exactly what QLens delivers.

This comprehensive C++ toolkit brings together everything astronomers need to decode gravitational lens systems. QLens supports both pixel-based image reconstruction and point source modeling, offering 14 different analytic lens models with customizable density profiles and ellipticity options. The software handles complex scenarios like multiplane lensing (multiple deflectors at different cosmic distances) and employs advanced numerical methods including adaptive Gauss-Patterson quadrature for precision calculations. For parameter estimation, researchers can choose between classical chi-square optimization or full Bayesian inference using nested sampling or MCMC algorithms, all parallelizable across computing clusters.

From measuring dark matter distributions in galaxy clusters to constraining cosmological parameters through time-delay studies, QLens empowers researchers to transform these cosmic funhouse mirrors into precision scientific instruments. The package even includes an undergraduate-friendly tutorial, making cutting-edge lensing analysis accessible to the next generation of cosmic archaeologists who will use these gravitational telescopes to map the invisible universe.


Stars: 3
💻 Language: C++
🔗 Repository: qminor/qlens-beta