cluster_toolkit.xi module

Correlation functions for matter and halos.

cluster_toolkit.xi.xi_2halo(bias, xi_mm)[source]

2-halo term in halo-matter correlation function

Parameters:
  • bias (float) – Halo bias
  • xi_mm (float or array like) – Matter-matter correlation function
Returns:

2-halo term in halo-matter correlation function

Return type:

float or array like

cluster_toolkit.xi.xi_DK(r, M, conc, be, se, k, P, om, delta=200, rhos=-1.0, alpha=-1.0, beta=-1.0, gamma=-1.0)[source]

Diemer-Kravtsov 2014 profile.

Parameters:
  • r (float or array like) – radii in Mpc/h comoving
  • M (float) – mass in Msun/h
  • conc (float) – Einasto concentration
  • be (float) – DK transition parameter
  • se (float) – DK transition parameter
  • k (array like) – wavenumbers in h/Mpc
  • P (array like) – matter power spectrum in [Mpc/h]^3
  • Omega_m (float) – matter density fraction
  • delta (float) – overdensity of matter. Optional, default is 200
  • rhos (float) – Einasto density. Optional, default is compute from the mass
  • alpha (float) – Einasto parameter. Optional, default is computed from peak height
  • beta (float) – DK 2-halo parameter. Optional, default is 4
  • gamma (float) – DK 2-halo parameter. Optional, default is 8
Returns:

DK profile evaluated at the input radii

Return type:

float or array like

cluster_toolkit.xi.xi_DK_appendix1(r, M, conc, be, se, k, P, om, bias, xi_mm, delta=200, rhos=-1.0, alpha=-1.0, beta=-1.0, gamma=-1.0)[source]

Diemer-Kravtsov 2014 profile, first form from the appendix, eq. A3.

Parameters:
  • r (float or array like) – radii in Mpc/h comoving
  • M (float) – mass in Msun/h
  • conc (float) – Einasto concentration
  • be (float) – DK transition parameter
  • se (float) – DK transition parameter
  • k (array like) – wavenumbers in h/Mpc
  • P (array like) – matter power spectrum in [Mpc/h]^3
  • Omega_m (float) – matter density fraction
  • bias (float) – halo bias
  • xi_mm (float or array like) – matter correlation function at r
  • delta (float) – overdensity of matter. Optional, default is 200
  • rhos (float) – Einasto density. Optional, default is compute from the mass
  • alpha (float) – Einasto parameter. Optional, default is computed from peak height
  • beta (float) – DK 2-halo parameter. Optional, default is 4
  • gamma (float) – DK 2-halo parameter. Optional, default is 8
Returns:

DK profile evaluated at the input radii

Return type:

float or array like

cluster_toolkit.xi.xi_DK_appendix2(r, M, conc, be, se, k, P, om, bias, xi_mm, delta=200, rhos=-1.0, alpha=-1.0, beta=-1.0, gamma=-1.0)[source]

Diemer-Kravtsov 2014 profile, second form from the appendix, eq. A4.

Parameters:
  • r (float or array like) – radii in Mpc/h comoving
  • M (float) – mass in Msun/h
  • conc (float) – Einasto concentration
  • be (float) – DK transition parameter
  • se (float) – DK transition parameter
  • k (array like) – wavenumbers in h/Mpc
  • P (array like) – matter power spectrum in [Mpc/h]^3
  • Omega_m (float) – matter density fraction
  • bias (float) – halo bias
  • xi_mm (float or array like) – matter correlation function at r
  • delta (float) – overdensity of matter. Optional, default is 200
  • rhos (float) – Einasto density. Optional, default is compute from the mass
  • alpha (float) – Einasto parameter. Optional, default is computed from peak height
  • beta (float) – DK 2-halo parameter. Optional, default is 4
  • gamma (float) – DK 2-halo parameter. Optional, default is 8
Returns:

DK profile evaluated at the input radii

Return type:

float or array like

cluster_toolkit.xi.xi_einasto_at_r(r, M, conc, alpha, om, delta=200, rhos=-1.0)[source]

Einasto halo profile.

Parameters:
  • r (float or array like) – 3d distances from halo center in Mpc/h comoving
  • M (float) – Mass in Msun/h; not used if rhos is specified
  • conc (float) – Concentration
  • alpha (float) – Profile exponent
  • om (float) – Omega_matter, matter fraction of the density
  • delta (int) – Overdensity, default is 200
  • rhos (float) – Scale density in Msun h^2/Mpc^3 comoving; optional
Returns:

Einasto halo profile.

Return type:

float or array like

cluster_toolkit.xi.xi_hm(xi_1halo, xi_2halo, combination='max')[source]

Halo-matter correlation function

Note: at the moment you can combine the 1-halo and 2-halo terms by either taking the max of the two or the sum of the two. The ‘combination’ field must be set to either ‘max’ (default) or ‘sum’.

Parameters:
  • xi_1halo (float or array like) – 1-halo term
  • xi_2halo (float or array like, same size as xi_1halo) – 2-halo term
  • combination (string; optional) – specifies how the 1-halo and 2-halo terms are combined, default is ‘max’ which takes the max of the two
Returns:

Halo-matter correlation function

Return type:

float or array like

cluster_toolkit.xi.xi_mm_at_r(r, k, P, N=500, step=0.005, exact=False)[source]

Matter-matter correlation function.

Parameters:
  • r (float or array like) – 3d distances from halo center in Mpc/h comoving
  • k (array like) – Wavenumbers of power spectrum in h/Mpc comoving
  • P (array like) – Matter power spectrum in (Mpc/h)^3 comoving
  • N (int; optional) – Quadrature step count, default is 500
  • step (float; optional) – Quadrature step size, default is 5e-3
  • exact (boolean) – Use the slow, exact calculation; default is False
Returns:

Matter-matter correlation function

Return type:

float or array like

cluster_toolkit.xi.xi_nfw_at_r(r, M, c, Omega_m, delta=200)[source]

NFW halo profile correlation function.

Parameters:
  • r (float or array like) – 3d distances from halo center in Mpc/h comoving
  • M (float) – Mass in Msun/h
  • c (float) – Concentration
  • Omega_m (float) – Omega_matter, matter fraction of the density
  • delta (int; optional) – Overdensity, default is 200
Returns:

NFW halo profile.

Return type:

float or array like