hmfast.tracers.GalaxyLensingTracer

class hmfast.tracers.GalaxyLensingTracer(profile=None, dndz=None)[source]

Bases: Tracer

Galaxy weak lensing tracer.

Attributes:
profileMatterProfile

Matter profile used to model the lensing signal sourced by large-scale structure.

dndztuple of jnp.ndarray

Normalized source redshift distribution stored as \((z, dN/dz)\).

Methods

kernel(cosmology, z)

Compute the galaxy lensing kernel \(W_{\kappa_g}(\chi)\) at redshift \(z\).

update([profile, dndz])

Return a new GalaxyLensingTracer instance with updated attributes using PyTree logic.

update(profile=None, dndz=None)[source]

Return a new GalaxyLensingTracer instance with updated attributes using PyTree logic.

Parameters:
profileMatterProfile, optional

New matter profile to use for the tracer. If None, the profile is unchanged.

dndzarray_like, optional

New redshift distribution (z, dN/dz). If None, the distribution is unchanged.

Returns:
GalaxyLensingTracer

New tracer instance with updated attributes.

kernel(cosmology, z)[source]

Compute the galaxy lensing kernel \(W_{\kappa_g}(\chi)\) at redshift \(z\).

The kernel is given by:

\[W_{\kappa_g}(\chi) = \frac{3}{2} \Omega_m \left(\frac{H_0}{c}\right)^2 \chi(z)\,(1+z)\,I_s(z)\]

where \(\Omega_m\) is the matter density parameter, \(H_0\) is the Hubble constant, \(c\) is the speed of light, \(\chi(z)\) is the comoving distance to redshift \(z\), and \(I_s(z)\) is the lensing efficiency integral defined as

\[I_s(z) = \int_z^{\infty} dz_s\, \frac{dN}{dz}(z_s) \frac{\chi(z_s) - \chi(z)}{\chi(z_s)}\]

where \(\frac{dN}{dz}(z_s)\) is the normalized source redshift distribution.

Parameters:
cosmologyCosmology

Cosmology object with required methods and parameters.

zfloat or array_like

Redshift(s) at which to compute the kernel.

Returns:
W_kappa_garray_like

Galaxy lensing kernel evaluated at redshift(s) \(z\).