glasz.profiles package

Submodules

glasz.profiles.halo_profiles module

class glasz.profiles.halo_profiles.HaloProfileGNFW(mass_def, rho0=1.0, alpha=1.0, beta=3.0, gamma=1.0, x_c=0.5, feedback_model=None, truncated=False, rho_2h=None, version='Zhao96')

Bases: HaloProfileMatter

Generalized NFW Density Profile. This class implements the generalized NFW profile as described in Zhao et al. 1996. (https://arxiv.org/pdf/astro-ph/9509122). The profile is defined as:

rho_{rm GNFW}(r) = rho_0 left(frac{x}{x_c}right)^{-gamma} left( 1 + left( frac{x}{x_c} right)^{1/alpha} right)^{-(beta - gamma) alpha}

where x = r/r_{200c}, r_{200c} is the comoving 200c radius. The profile can be truncated according to whatever mass definition is used. The profile can also be normalized to enforce cosmic baryon abundance at a given radius.

Parameters:
normalize(cosmo, rb, M, a, prof, rmin=1e-16, n_steps=1000)

compute the value of rho_0 for the GNFW profile by enforcing a sphere of radius r_b to have cosmic abundance of baryons. Assigns a new value of rho_0 to the object.

Parameters:
  • cosmo (Cosmology) – (pyccl.cosmology.Cosmology): a Cosmology object.

  • rb (float | ndarray[Any, dtype[float64]]) – (float or NDArray[float]): comoving baryon radius in Mpc.

  • M (float | ndarray[Any, dtype[float64]]) – (float or NDArray[float]): halo mass in units of M_sun.

  • a (float | ndarray[Any, dtype[float64]]) – (float or NDArray[float]): scale factor.

  • prof (HaloProfile) – (pyccl.halos.profiles.profile_base.HaloProfile): halo profile.

  • rmin (float) – (float): minimum radius to integrate to.

  • n_steps (int) – (int): number of steps to use in the integration.

Return type:

None

class glasz.profiles.halo_profiles.MatterProfile(mass_def, concentration, rho_2h=None)

Bases: HaloProfile

Parameters:
  • mass_def (MassDef)

  • concentration (<module ‘pyccl.halos.concentration’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/glasz/checkouts/latest/.pixi/envs/docs/lib/python3.11/site-packages/pyccl/halos/concentration/__init__.py’>)

  • rho_2h (Callable[[ndarray[Any, dtype[float64]]], ndarray[Any, dtype[float64]]] | None)

glasz.profiles.two_halo_term module

glasz.profiles.two_halo_term.calc_xi_mm_2h(cosmo, mass_def, concentration, hmc, k_arr, a_arr, r_arr, a_sf)

This function computes the matter-matter 2-halo term of the 3D correlation function.

Parameters:
  • cosmo (Cosmology) – (ccl.cosmology.Cosmology): cosmology object

  • hmc (HMCalculator) – (ccl.halos.HMCalculator): the halo mass calculator object

  • k_arr (ndarray[Any, dtype[float64]]) – (NDArray[float]): the wavenumber array in comoving units of [1/Mpc]

  • a_arr (ndarray[Any, dtype[float64]]) – (NDArray[float]): the scale factor array

  • r_arr (ndarray[Any, dtype[float64]]) – (NDArray[float]): the radial array in comoving units of [Mpc]

  • a_sf (float) – (float): the scale factor of interest

  • mass_def (MassDef)

  • concentration (<module ‘pyccl.halos.concentration’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/glasz/checkouts/latest/.pixi/envs/docs/lib/python3.11/site-packages/pyccl/halos/concentration/__init__.py’>)

Returns:

(Callable): the interpolated 2-halo term of the matter-matter correlation function

Return type:

xi_mm_2h