tjpcov.covariance_cluster_counts#

Module Contents#

Classes#

CovarianceClusterCounts

Class to calculate covariance of cluster counts.

class tjpcov.covariance_cluster_counts.CovarianceClusterCounts(config, min_halo_mass=10000000000000.0)[source]#

Bases: tjpcov.covariance_builder.CovarianceBuilder

Class to calculate covariance of cluster counts.

Class to calculate covariance of cluster counts.

Parameters:
  • config (dict or str) – If dict, it returns the configuration dictionary directly. If string, it asumes a YAML file and parses it.

  • min_halo_mass (float, optional) – Minimum halo mass.

space_type = 'Fourier'[source]#
_tracer_types = ()[source]#
load_from_cosmology(cosmo)[source]#

Load parameters from a CCL cosmology object.

Derived attributes from the cosmology are set here.

Parameters:

cosmo (pyccl.Cosmology) – Input cosmology

load_from_sacc(sacc_file, min_halo_mass)[source]#

Set class attributes based on data from the SACC file.

Cluster covariance has special parameters set in the SACC file. This informs the code that the data to calculate the cluster covariance is there. We set extract those values from the sacc file here, and set the attributes here.

Parameters:
  • ( (sacc_file) – obj: sacc.sacc.Sacc): SACC file object, already

  • loaded.

_quad_integrate(argument, from_lim, to_lim)[source]#

Numerically integrate argument between bounds using scipy quad.

Parameters:
  • argument (callable) – Function to integrate between bounds

  • from_lim (float) – lower limit

  • to_lim (float) – upper limit

Returns:

Value of the integral

Return type:

float

_romb_integrate(kernel, spacing)[source]#

Numerically integrate arguments between bounds using scipy romberg.

Parameters:
  • kernel (array_like) – Vector of equally spaced samples of a function

  • spacing (float) – Sample spacing

Returns:

Value of the integral

Return type:

float

observed_photo_z(z_true, z_i, sigma_0=0.05)[source]#

Implementation of the photometric redshift uncertainty distribution.

We don’t assume that redshift can be measured exactly, so we include a measurement of the uncertainty around photometric redshifts. Assume, given a true redshift z, the measured redshift will be gaussian. The uncertainty will increase with redshift bin.

See section 2.3 of N. Ferreira

Parameters:
  • z_true (float) – True redshift

  • z_i (float) – Photometric redshift bin index

  • sigma_0 (float) – Spread in the uncertainty of the photo-z distribution, defaults to 0.05 (DES Y1)

Returns:

Probability weighted photo-z

Return type:

float

comoving_volume_element(z_true, z_i)[source]#

Calculates the volume element for this bin.

Given a true redshift, and a redshift bin, this will give the volume element for this bin including photo-z uncertainties.

Parameters:
  • z_true (float) – True redshift

  • z_i (float) – Photometric redshift bin

Returns:

Photo-z-weighted comoving volume element per steridian for redshift bin i in units of Mpc^3

Return type:

float

mass_richness(ln_true_mass, richness_i)[source]#

Log-normal mass-richness relation without observational scatter.

The probability that we observe richness given the true mass M, is given by the convolution of a Poisson distribution (relating observed richness to true richness) with a Gaussian distribution (relating true richness to M). Such convolution can be translated into a parametrized log-normal mass-richness distribution, done so here.

Parameters:
  • ln_true_mass (float) – True mass

  • richness_bin (int) – Richness bin i

Returns:

The probability that the true mass ln(ln_true_mass) is observed within the richness bin i and richness bin i+1

Return type:

float

mass_richness_integral(z, richness_i, remove_bias=False)[source]#

Integrates the HMF weighted by mass-richness relation.

The halo mass function weighted by the probability that we measure observed richness lambda given true mass M.

Parameters:
  • z (float) – Redshift

  • lbd_i (int) – Richness bin

  • remove_bias (bool, optional) – If TRUE, will remove halo_bias from

  • noise. (the mass integral. Used for calculating the shot) –

Returns:

The mass-richness weighed derivative of number density per fluctuation in background

Return type:

float

partial_SSC(z, bin_z_j, bin_lbd_j, approx=True)[source]#

Calculate the SSC contribution to the covariance integrand.

Calculate part of the super sample covariance, or the non-diagonal correlation between two point functions whose observed modes are larger than the survey size.

Parameters:
  • z (float) – redshift

  • bin_z_j (int) – redshift bin j

  • bin_lbd_j (int) – richness bin j

  • approx (bool, optional) – Will only calculate the mass richness

  • True. (integral once and multiply at end. Defaults to) –

Returns:

SSC covariance contribution.

Return type:

float

double_bessel_integral(z1, z2)[source]#

Calculates the double bessel integral using 2-FAST algorithm.

See section 7.1, 7.2 of N. Ferreira dissertation.

Parameters:
  • z1 (float) – redshift lower bound

  • z2 (float) – redshift upper bound

Returns:

Numerical approximation of integral.

Return type:

float