---
title: "Weak-Lensing Mass Map Interactive Lab | Sandbox Physics"
description: "Each galaxy is distorted only a little. How do thousands of them add up to a map of invisible mass?"
canonical_url: "https://sandboxphysics.com/labs/weak-lensing-mass-map/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/weak-lensing-mass-map/"
last_modified: "2026-11-17"
---

# Weak-Lensing Mass Map

**Each galaxy is distorted only a little. How do thousands of them add up to a map of invisible mass?** Mass in front of distant galaxies stretches their images slightly, always around the mass rather than toward it. One galaxy is too randomly shaped to show this, but averaging thousands cancels their own shapes and leaves the common stretch. Turning that stretch pattern back into mass gives a map, except for a uniform layer of mass, which leaves shapes unchanged.

Drag invisible dark-matter halos and their lens planes. Watch background galaxy shapes line up around them, then rebuild the mass map from those shapes alone.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

Synthetic catalog, not survey data. Each halo is a cored, truncated isothermal sphere in a flat cosmology with matter density 0.3; halos on different planes add linearly (Born approximation). Galaxy shapes follow the exact lensing transformation of complex ellipticity with Gaussian intrinsic scatter, all sources at one redshift, and no point-spread function, measurement bias, photometric-redshift error or intrinsic alignment. The mass map is a Kaiser–Squires inversion of binned shapes with Gaussian smoothing and the mean set to zero, so a uniform sheet of mass cannot be recovered and edges are less reliable. The violet glow and the noise-free shear curve are ideal references the observer never sees. In the sky picture galaxy sizes are drawn 1.1 times larger and, unless switched off, each galaxy's stretch is drawn with four times the catalog shear; the maps, fit and readouts always use the catalog shapes. Bending in the side view is exaggerated.

Mass map from shapes Synthetic catalog · E mode

Null map: should be noise Synthetic catalog · B mode

Stretch around the selected halo Synthetic catalog · noise-free truth

Which planes the sources feel Calculated · flat cosmology

How the maps and the fit are made

Shapes are averaged in 0.375 arcminute cells, rotated back to convergence in Fourier space and smoothed with a Gaussian. The E map holds the lensing signal; the B map is what lensing cannot make, so it shows the noise and the edge errors. Both share one colour scale. Rings mark the true halo positions, dashed when the halo sits behind the sources.

The fit treats the selected halo as isolated, with the same core and truncation radius as the truth, and uses annuli from 0.75 to 6 arcminutes. Neighbouring halos and a mass sheet are not in the fit model, which is why A hidden mass sheet fools it.

## Thousands of slightly stretched galaxies weigh the mass in front of them

**Background** Light from a distant galaxy bends as it passes mass on the way to us. Weak lensing stretches each image by a few percent, tangentially around the mass, while galaxies are intrinsically elliptical by about a quarter.

**Why it matters** Most of the mass in galaxy clusters and in the cosmic web does not shine. Lensing responds to all mass, luminous or dark, so averaged galaxy shapes are one of the few direct ways to map it.

- **Focus question**: If a second cluster sits behind the source galaxies, how much does it change their shapes?
- **One-sentence intuition**: Shapes measure the reduced shear, and the distance ratio between lens and source sets how strongly each plane counts. The mass map is fixed only up to a uniform sheet.

### Core mathematical model

#### Convergence and shear of a halo

$$
\kappa_{\rm SIS}(\theta)=\gamma_{\rm SIS}(\theta)=\frac{\theta_{\rm E}}{2\theta},\qquad \theta_{\rm E}=4\pi\frac{\sigma_v^2}{c^2}\frac{D_{\rm ls}}{D_{\rm s}}
$$

For a singular isothermal sphere the convergence and the tangential shear are equal and fall off as one over radius. The Lab softens the centre with a core and cuts the halo off far out.

#### What a galaxy shape measures

$$
g=\frac{\gamma}{1-\kappa},\qquad \epsilon=\frac{\epsilon^{\rm s}+g}{1+g^{*}\epsilon^{\rm s}},\qquad \langle\epsilon\rangle\simeq g
$$

Each observed ellipticity is the intrinsic one transformed by the reduced shear. Intrinsic orientations are random, so the average over many galaxies estimates the reduced shear.

#### Shear back to mass

$$
\hat\kappa_E+i\hat\kappa_B=\frac{(\ell_1^2-\ell_2^2)-2i\,\ell_1\ell_2}{\ell^2}\,\hat\gamma(\boldsymbol\ell),\qquad \kappa\to\lambda\kappa+(1-\lambda)\ \text{leaves}\ g\ \text{unchanged}
$$

In Fourier space the shear is the convergence rotated by twice the wave-vector angle, so the inverse rotation recovers it. The imaginary part should vanish for lensing; the zero wave vector, a uniform sheet, is lost.

### Common difficulties

#### Galaxies do not point at the mass

**Typical misconception** Lensing stretches background galaxies along lines pointing toward the cluster.

**Better mental model** Images are stretched tangentially, along circles around the mass. Turn on Shapes without scatter and look at the galaxies just outside a halo ring.

#### A flat map does not mean no mass

**Typical misconception** Where the reconstructed map is near zero there is no mass.

**Better mental model** The inversion sets the mean of the field to zero, and a uniform sheet of mass changes no shape. Mass behind the sources is also invisible to them.

### Run the experiment

1. 01

   #### Take the scatter away

   Choose Shapes without scatter and compare the galaxies near halo A with those far from both halos.

   **What to observe:** Near the halo every galaxy is stretched along a circle around it; the fitted Einstein radius matches the true one, and the B-mode map is almost blank.

2. 02

   #### Move the sources in front of a lens

   From Two lens planes, drag the source plane in the side view from redshift 1.2 down past halo B at redshift 0.6.

   **What to observe:** Halo B fades from the mass map and its photon kinks disappear: once the sources are in front of it, the distance ratio is zero.

3. 03

   #### Hide a mass sheet

   Choose A hidden mass sheet and compare its maps and shapes with Two lens planes.

   **What to observe:** Shapes and the reconstructed map are identical, yet the halo's true Einstein radius dropped by a quarter and violet glow covers the field. Only the drawn sizes grow, because magnification does change.

Physical conclusion

A weak-lensing mass map is a noisy, smoothed, source-redshift-weighted projection of all mass, with its mean level left undetermined.

## Related experiments and articles

Weak gravitational lensing and mass maps · Reading path

### From galaxy shapes to a map of mass

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **How can galaxies that are barely stretched map dark matter?**](https://sandboxphysics.com/stories/weak-lensing/galaxy-shapes-weigh-dark-matter/)
2. [Article **Convergence, shear and what a galaxy shape measures**](https://sandboxphysics.com/stories/weak-lensing/convergence-shear-and-galaxy-shapes/)
3. [Article **Turning a shear field into a mass map**](https://sandboxphysics.com/stories/weak-lensing/from-shear-to-a-mass-map/)
4. [Article **Shear correlation functions and redshift tomography**](https://sandboxphysics.com/stories/weak-lensing/shear-correlations-and-tomography/)
5. [Article **Recompute shear correlations and tomography from a simulation**](https://sandboxphysics.com/stories/weak-lensing/recompute-shear-correlations/)
6. [Article **How to read the DES Year 3 lensing and clustering analysis**](https://sandboxphysics.com/stories/weak-lensing/reading-des-y3-lensing-and-clustering/)

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
