View on GitHub


A flexible computer code for doing simulations of gravitational lensing.

Download this project as a .zip file Download this project as a tar.gz file

GLAMER (Gravitational Lensing with Adaptive Mesh Refinement) is a C++ library for doing gravitational lensing simulations using the output of cosmological simulations or analytic lens models or combinations of them. It can do weak lensing simulations on large scales, strong lensing simulations and quasars microlensing simulations. A description of the code and its applications is available in the papers Metcalf & Petkova and Petkova, Metcalf & Giocoli which should be cited if it is used in your academic work.


The documentation for the library is available at GLAMERDOC++. There is a description of some functionality on the front page.


Access to the code through GitHub can be obtained upon request sent to Ben Metcalf ( You will need a GitHub account.


For basic installation instructions see the README file for this project. For more information on installation and linking to your own code see the wiki for this project.


Some example programs that use the GLAMER library are available on GitHub. Or you can contact Ben for specific examples.

This work is funded by the European Research Council (ERC) through grant agreement n. 259349.