Microlensing magnification maps

Step 1: Select params

Choose the params and press the button

Parameter Min Value Max
Convergence 0.01 2.0
Shear 0.0 2.0
Smooth matter fraction 0.0 0.99
Min. mass 0.0 5.0
Max. mass 0.0 5.0
Lens mass function power -5.0 5.0
Map size (in Er) 5.0 400
Number of pixels 100.0 4000

Step 2: Generate lens

Press the button to generate the lens

-- OR --

Upload file with stars (max size: 2GiB)

Step 3: Generate map

Press the button to generate the map

Optional: enter your email address to receive a message when the simulation is done


This web allows users to calculate microlensing magnification maps for extragalactic sources using the algorithm described in Jiménez-Vicente & Mediavilla (2022), which combines the Fast Multipole Method (FMM) of Greengard & Rokhlin (1987) for ray deflection calculations, with the Inverse Polygon Mapping of Mediavilla et al.(2006, 2011) for the calculation of the magnification map.


Although formally mass units are arbitrary (and lengths would then be given in Einstein radii for that mass), we recommend to use mass units of one solar mass. Lengths/angles are therefore in units of Einstein radii for 1 solar mass.


The interface allows the user to select the following parameters:

  • Convergence (κ): Total surface mass density (in units of the critical mass density) at the location of the image.
  • Shear (γ): Total shear at the location of the image. Assumed to be along the horizontal axis.
  • Smooth matter fraction (s): Fraction of the total convergence in form of smooth matter (not producing microlensing) i.e.: s=κs/κ. The fraction of mass in form of microlenses is therefore κ*=1-κs.
  • Minimum mass of the microlenses (mmin): In units of the solar mass. (mmin < mmax)
  • Maximum mass of the microlenses (mmax): In units of the solar mass. (mmax > mmin)
  • Power law of the mass function of microlenses (β): The microlenses have a power law mass function of type N(m)∝ mβ. E.g. Salpeter has β=-2.35. Using mmin very similar but slightly below mmax can be used to generate a distribution of equal masses.
  • Size of the magnification map (xl): This is the size of one side of the magnification maps in units of Einstein radii for 1 solar mass.
  • Number of pixels of the map side (Npix): The map is a square of Npix x Npix pixels

The process consists of three steps:

  • Step 1 —> Parameter selection: Select the desired parameters and click “Apply”
  • Step 2 —> Lens plane generation: When Step 1 is finished, we generate the lens plane. We can do it by either clicking the button “Generate Lens”, or we can upload a file (named stars.dat) with our own distribution of microlenses. In this case, first click the "Browse" button to select the file, and then click the "Upload" button. The file is expected to have one lens per line with coordinates and mass of the microlens (x1 x2 mass) in the units described above. When finished, some info on the desired map is presented (e.g. Number of microlenses, workload of the map, estimated execution time…)
  • Step 3 —> Magnification Map generation: Once the lens plane is ready, click “Generate Map” to calculate the magnification map.

When the map is ready, a summary webpage is created where the user can visualize the map and the magnification histogram along with some information on the lens and/or map. The user can download the magnification map and the file with the locations and masses of the microlenses. Magnification map (and lens file) are provided as gzipped ASCII files. Magnification map contains one pixel magnification per line. Microlens distribution is providend in the stars.dat file, which contains coordinates and mass of one microlens per line (x1 x2 mass).

For some cases with low workloads, the map is ready in a very short time. If the execution time exceeds the timeout of the web server (30 seconds), the user is then provided with a link to the webpage that will contain the results when finished. Reload this page when the estimated execution time has elapsed. Please, notice that provided estimated execution times are only a rough approximation. The algorithm is very fast, but be patient.

Users with needs not covered by this interface are welcome to contact us.



Web design: José M. Martín & Miguel Palomino Cobo

Grant PID2020-118687GB-C33 funded by MCIN/AEI/10.13039/501100011033