Lensing (glass.lensing)#

The glass.lensing module provides functionality for simulating gravitational lensing by the matter distribution in the universe.

Iterative lensing#

class glass.lensing.MultiPlaneConvergence(cosmo)#

Compute convergence fields iteratively from multiple matter planes.

Attributes:
delta

The current matter plane.

kappa

The current convergence plane.

wlens

The weight of the current matter plane.

zsrc

The redshift of the current convergence plane.

Methods

add_plane(delta, zsrc[, wlens])

Add a mass plane at redshift zsrc to the convergence.

add_window(delta, w)

Add a mass plane from a window function to the convergence.

glass.lensing.multi_plane_matrix(ws, cosmo)#

Compute the matrix of lensing contributions from each shell.

Lensing fields#

glass.lensing.shear_from_convergence(kappa, lmax=None, *, discretized=True)#

weak lensing shear from convergence

Notes

The shear field is computed from the convergence or deflection potential in the following way.

Define the spin-raising and spin-lowering operators of the spin-weighted spherical harmonics as

\[\eth {}_sY_{lm} = +\sqrt{(l-s)(l+s+1)} \, {}_{s+1}Y_{lm} \;, \\ \bar{\eth} {}_sY_{lm} = -\sqrt{(l+s)(l-s+1)} \, {}_{s-1}Y_{lm} \;.\]

The convergence field \(\kappa\) is related to the deflection potential field \(\phi\) as

\[2 \kappa = \eth\bar{\eth} \, \phi = \bar{\eth}\eth \, \phi \;.\]

The convergence modes \(\kappa_{lm}\) are hence related to the deflection potential modes \(\phi_{lm}\) as

\[2 \kappa_{lm} = -l \, (l+1) \, \phi_{lm} \;.\]

The shear field \(\gamma\) is related to the deflection potential field as

\[2 \gamma = \eth\eth \, \phi \quad\text{or}\quad 2 \gamma = \bar{\eth}\bar{\eth} \, \phi \;,\]

depending on the definition of the shear field spin weight as \(2\) or \(-2\). In either case, the shear modes \(\gamma_{lm}\) are related to the deflection potential modes as

\[2 \gamma_{lm} = \sqrt{(l+2) \, (l+1) \, l \, (l-1)} \, \phi_{lm} \;.\]

The shear modes can therefore be obtained via the convergence, or directly from the deflection potential.