Initializing the Halo Model¶
[1]:
# preamble
from __future__ import annotations
import numpy as np
import pyccl as ccl
We create a cosmology object using pyccl. We then choose our halo mass definition \(M_{\rm 200m}\), the Tinker et al 2008 halo mass function, the Duffy et al 2008 concentration-mass relation, and Tinker et al 2010 halo bias function. With these halo model components we can construct the HMCalculator object from pyccl which will serve as the backbone for our halo
model calculations. Our halo model integrals will integrate over halos with a range of masses [\(10^{10}, 10^{15}\)].
[2]:
# Cosmological parameters
Omega_b = 0.044
Omega_c = 0.25 - Omega_b
h = 0.7
sigma8 = 0.8344
n_s = 0.9624
cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, h=h, sigma8=sigma8, n_s=n_s)
# We will use the Δ=200 mass definition
hmd = ccl.halos.MassDef200m
# The Tinker 2008 mass function
nM = ccl.halos.MassFuncTinker08(mass_def=hmd)
# The Duffy 2008 concentration-mass relation
cM_relation = ccl.halos.concentration.ConcentrationDuffy08(mass_def=hmd)
# The Tinker 2010 halo bias
bM = ccl.halos.HaloBiasTinker10(mass_def=hmd)
# The HMF and bias are combined in a `HMCalculator` object, along with mass definition
hmc = ccl.halos.HMCalculator(
mass_function=nM, # Mass function
halo_bias=bM, # Halo bias
mass_def=hmd, # Mass definition
log10M_min=np.log10(1e10), # Minimum halo mass
log10M_max=np.log10(1e15), # Maximum halo mass
nM=32, # Number of bins in mass
)
For all other notebooks, these components will be predefined in init_halo_model.py.