BaryonForge.utils.halomodel module
- class BaryonForge.utils.halomodel.FlexibleHMCalculator(self, *, mass_function, halo_bias, halo_m_to_mtot, mass_def=None, log10M_min=8.0, log10M_max=16.0, nM=128, integration_method_M='simpson')[source]
Bases:
HMCalculatorThis a modified class that implements a set of methods for computing various halo model quantities. A lot of these quantities will involve integrals of the sort:
\[\int dM\,n(M,a)\,f(M,k,a),\]where \(n(M,a)\) is the halo mass function, and \(f\) is an arbitrary function of mass, scale factor and Fourier scales.
We have modified the class to also allow for M_delta, the spherical overdensity mass used when computing the mass function or bias, to be different from M_tot, the actual total mass of the halo if we integrate the density profile to infinity. This is an important effect when profiles are not truncated at R > R_delta.
- Parameters:
mass_function (str or
MassFunc) – the mass function to usehalo_bias (str or
HaloBias) – the halo bias function to usehalo_m_to_mtot (function) – A function that converts M_delta mass to M_tot (latter integrated to r = infinity). Use an instance of the ~baryonforge.utils.Mdelta_to_Mtot class.
mass_def (str or
MassDef) – the halo mass definition to uselog10M_min (float) – lower bound of the mass integration range (base-10 logarithmic).
log10M_max (float) – lower bound of the mass integration range (base-10 logarithmic).
nM (int) – number of uniformly-spaced samples in :math:`log_{10}(M)`to be used in the mass integrals.
integration_method_M (str) – integration method to use in the mass integrals. Options: “simpson” and “spline”.