calculate_lensing_weights

randomfield.lensing.calculate_lensing_weights(cosmology, z, DC=None, DA=None, scaled_by_h=True)[source] [edit on github]

Calculate the geometric weights for lensing.

We adopt the following convention for the lensing weight function:

\[\omega_E(D, D_{src}) = \frac{3}{2} (H_0/c)^2 \Omega_m (1 + z(D)) \frac{D_A(D_{src}-D)}{D_A(D_{src})} \Theta(D_{src}-D)\]

where \(D\) and \(D_{src}\) are the comoving distance to the lensing mass and source galaxy, respectively, and \(z\) is the lensing mass redshift. The weight dimensions are inverse length squared, in units of either Mpc/h or Mpc (depending on the scaled_by_h parameter).

The combination:

\[W_{EE}(D, D_{src}) = \omega_E(D, D_{src})^2 D_A(D)^3\]

determines the geometric weight (i.e., independent of the 2D wavenumber \(\ell\)) of a mass at \(D\) lensing a source at \(D_{src}\). The limiting values are:

\[W_{EE}(0, D_{src}) = W_{EE}(D_{src}, D_{src}) = 0\]

and the function is broadly peaked with a maximum near \(z_{lens} = z_{src}/2\) for realistic cosmologies.

Use calculate_shear_power() to calculate the lensing shear power associated with the returned weight functions.

Parameters:

cosmology : instance of astropy.cosmology.FLRW

Background cosmology that specifies the values of Omega_k, Omega_m and (if scaled_by_h is False) H0 to use. If DA is not provided, the cosmology is also used to calculate DA values from the input DC values.

z : numpy array

1D array of redshifts to use for the grid of source and lens positions in the calculated weights. Values must be increasing but do not need to be equally spaced.

DC : numpy array, optional

1D array of comoving distances along the line of sight corresponding to each redshift. Units should be either Mpc (when scaled_by_h is False) or Mpc/h (scaled_by_h is True). Will be calculated from the cosmology if not specified.

DA : numpy array, optional

1D array of comoving transverse distances corresponding to each redshift. Units should be either Mpc (when scaled_by_h is False) or Mpc/h (scaled_by_h is True). Will be calculated from the cosmology if not specified.

scaled_by_h : bool, optional

Specifies the units of the input DC and DA arrays and the output weights. When True, inputs must be in Mpc/h and the result is in h/Mpc. When False, inputs must be in Mpc and the result is in 1/Mpc.

Returns:

numpy.ndarray

Two dimensional array with shape (nz, nz) where nz is the number of input redshifts. The value out[i,j] gives the weight function for a source at redshift z[i] as a function of lensing redshift z[j] with dimensions of inverse length (h/Mpc or 1/Mpc, depending on the value of scaled_by_h). Note that all values with j > i are zero, since they correspond to sources in front of the lensing mass.