crow.cluster_modules.abundance module

The module responsible for building the cluster abundance calculation.

The galaxy cluster abundance integral is a combination of both theoretical and phenomenological predictions. This module contains the classes and functions that produce those predictions.

class crow.cluster_modules.abundance.ClusterAbundance(cosmo: <MagicMock id = '123141829959296'>, halo_mass_function: <MagicMock name = 'mock.MassFunc' id='123141829958624'>)[source]

Bases: object

The class that calculates the predicted number counts of galaxy clusters.

The abundance is a function of a specific cosmology, a mass and redshift range, an area on the sky, a halo mass function, as well as multiple kernels, where each kernel represents a different distribution involved in the final cluster abundance integrand.

Variables:
  • cosmo (pyccl.cosmology.Cosmology or None) -- Cosmology object used for predictions. Set via the cosmo property.

  • halo_mass_function (callable) -- Halo mass function object compatible with PyCCL's MassFunc interface.

  • parameters (Parameters) -- Container for optional model parameters.

  • _hmf_cache (dict) -- Cache for previously computed halo mass function evaluations keyed by (log_mass, scale_factor).

comoving_volume(z: ndarray[tuple[Any, ...], dtype[float64]], sky_area: float = 0) ndarray[tuple[Any, ...], dtype[float64]][source]

Differential comoving volume for a given sky area.

Parameters:
  • z (array_like) -- Redshift or array of redshifts at which to compute the differential comoving volume (dV/dz per steradian).

  • sky_area (float, optional) -- Survey area in square degrees. Default 0 returns per-steradian volume.

Returns:

Differential comoving volume (same shape as z) multiplied by the survey area (converted to steradians). Units: [Mpc/h]^3 (consistent with the internal PyCCL conventions used here).

Return type:

numpy.ndarray

Notes

This uses PyCCL background helpers to evaluate the angular diameter distance and h(z) factor. If sky_area is zero the returned array is the per-steradian dV/dz.

property cosmo: <MagicMock name='mock.__or__()' id='123141833552768'>

The cosmology used to predict the cluster number count.

mass_function(log_mass: ndarray[tuple[Any, ...], dtype[float64]], z: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]

Evaluate the halo mass function at given log-mass and redshift.

Parameters:
  • log_mass (array_like) -- Array of log10 halo masses (M_sun).

  • z (array_like) -- Array of redshifts matching log_mass.

Returns:

Array with mass function values (dn/dlnM or as provided by the configured halo_mass_function) evaluated at each (mass, z).

Return type:

numpy.ndarray

Notes

Results are cached in _hmf_cache keyed by (log_mass, scale_factor) to avoid repeated expensive evaluations for identical inputs.