hmfast.tracers.GalaxyTracer

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

Bases: Tracer

Galaxy counts tracer.

Attributes:
profileGalaxyHODProfile

Halo occupation distribution profile used to model galaxy number counts.

dndztuple of jnp.ndarray

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

Methods

kernel(cosmology, z)

Compute the galaxy kernel \(W_g(\chi)\) at redshift \(z\).

update([profile, dndz])

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

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

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

Parameters:
profileGalaxyHODProfile, optional

New HOD 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:
GalaxyTracer

New tracer instance with updated attributes.

kernel(cosmology, z)[source]

Compute the galaxy kernel \(W_g(\chi)\) at redshift \(z\).

The kernel is given by:

\[W_g(\chi) = \frac{H(z)}{c} \frac{dN}{dz}\]

where \(dN/dz\) is the normalized redshift distribution of galaxies.

Parameters:
cosmologyCosmology

Cosmology object with required methods and parameters.

zfloat or array_like

Redshift(s) at which to compute the kernel.

Returns:
W_garray_like

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