crow.cluster_modules.purity_models module

The cluster purity module.

This module holds the classes that define the kernels that can be included in the cluster abundance integrand.

class crow.cluster_modules.purity_models.Purity[source]

Bases: object

Purity kernel base class.

This kernel represents the probability that a detected object in the cluster catalogue is a true galaxy cluster (i.e. purity). Subclasses should implement the distribution method.

Notes

Mass-proxy inputs to methods in this module are provided as log10 values of the observable mass proxy.

Variables:

parameters (Parameters, optional) -- Container for model parameters defined by subclasses.

distribution(z: ndarray[tuple[Any, ...], dtype[float64]], log_mass_proxy: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]

Evaluate the purity kernel contribution.

Parameters:
  • z (array_like) -- Redshift or array of redshifts for the objects.

  • log_mass_proxy (array_like) -- Array of log10 mass-proxy values corresponding to the objects.

Returns:

Array with purity values in the interval [0, 1]. The output shape will follow NumPy broadcasting rules applied to the inputs.

Return type:

numpy.ndarray

class crow.cluster_modules.purity_models.PurityAguena16[source]

Bases: Purity

Purity model following Aguena et al. (2016) parametrisation.

The model computes a sigmoid-like purity as a function of a mass proxy and redshift using a pivot mass and a redshift-dependent power-law index.

Important

Note that the base class Purity.distribution defines the argument order as (z, log_mass_proxy) while this subclass implements distribution(self, log_mass_proxy, z). Callers should use the subclass' signature when invoking the concrete implementation.

Variables:

parameters (Parameters) -- Container holding default parameters defined in REDMAPPER_DEFAULT_PARAMETERS.

distribution(log_mass_proxy: ndarray[tuple[Any, ...], dtype[float64]], z: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]

Compute the purity fraction for given mass-proxy and redshift. The purity is given by the sigmoid-like expression

p(M, z) = ( (M / M_piv(z))**(n_c(z)) ) / ( 1 + (M / M_piv(z))**(n_c(z)) ),

where M = 10**(log_mass_proxy), M_piv(z) = 10**(a_logm_piv + b_logm_piv*(1 + z)) and n_c(z) = a_n + b_n*(1 + z).

Parameters:
  • log_mass_proxy (array_like) -- Array of log10 mass-proxy values.

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

Returns:

Purity values in the interval [0, 1] with shape matching the broadcasted inputs. dtype is float64.

Return type:

numpy.ndarray