hmf.core._kernels.mass_conversionΒΆ
Kernels of the conversion of halo masses between mass definitions, for a profile.
A halo of density profile \(\rho(r) = \rho_s f(r/r_s)\) encloses, within \(r = x r_s\), the mass \(M(<x r_s) = 4\pi\rho_s r_s^3\,\mu(x)\), with \(\mu(x) = \int_0^x f(y) y^2\,dy\), so its mean enclosed density is \(\bar\rho(<x r_s) = 3\rho_s F(x)\), with \(F(x) = \mu(x)/x^3\). For an NFW profile (Navarro, Frenk & White 1997)
A spherical-overdensity definition A of halo density \(\rho_A\) sets the concentration \(c_A\) by \(3\rho_s F(c_A) = \rho_A\). The same halo in a definition B has the concentration \(c_B\) with
and the mass \(M_B = M_A\,\mu(c_B)/\mu(c_A)\). Only the ratio of the two halo densities enters, so it does not matter whether they are comoving or physical, or relative to the mean or the critical density, as long as both are the same.
A profile enters only through \(\ln\mu(x)\) and its slope
\(\psi(x) = d\ln\mu/d\ln x\), which is below 3 for a density that falls
outwards, so \(\ln F\) decreases monotonically in \(\ln x\) and the root is
unique. concentration_ratio_solve() solves \(F(c_B) = q F(c_A)\) for every
element at once by a fixed number of Newton steps in \(\ln x\) from a starting
point, each elementwise, so the result does not depend on the batch size, and
profile_convert() gives the masses and the analytic Jacobian. For NFW
(nfw_ln_mu_and_slope()) the starting point is the fit of Hu & Kravtsov (2003,
eq. C11; nfw_start()). NFW calls the two with
them, through DensityProfile.convert_concentration_kernel.
The functions follow the rules of hmf.core._kernels and do not check their
inputs: the kernel-level entry points of hmf.core.profiles do.
Functions
|
The concentration \(c'\) with \(F(c') = q F(c)\), elementwise, for a profile. |
|
The concentration c with \(F(c) = f\), from the fit of Hu & Kravtsov (2003). |
\(\ln F(x) = \ln[\mu(x)/x^3]\): the mean enclosed density over \(3\rho_s\). |
|
The NFW \(\ln\mu(x)\) and \(\psi(x)\), from one evaluation of \(\mu\). |
|
|
The NFW starting point: Hu & Kravtsov (2003) at \(\ln F(c) + \ln q\). |
|
A starting point for any profile: \(F\) as the local power law at c. |
|
Convert haloes of a profile to a definition of |