Class
NumCosmoHaloDensityProfile
Description [src]
class NumCosmo.HaloDensityProfile : NumCosmoMath.Model
{
/* No available fields */
}
Abstract class for density profile functions.
This abstract class describes the radial matter density profile in real space. Each implementation must provide, at least, the dimensionless 3D density: \begin{equation}\label{def:dlrho} \hat\rho(x) \equiv \frac{\rho(x r_s)}{\rho_s}, \quad \rho(r) = \rho_s \hat\rho\left(\frac{r}{r_s}\right), \end{equation} where $\rho(r)$ is the actual density profile, $\rho_s$ is the profile scale and $r_s$ the scale radius. This function corresponds to the virtual function nc_halo_density_profile_eval_dl_density().
Parametrization
The two parameters $\rho_s$ and $r_s$ are described by the fundamental parametrization in terms of $M_\Delta$ and the concentration $c_\Delta$ given a mass defined by $\Delta$ and a background density $\rho_\mathrm{bg}$. These quantities are provided by the halo mass summary object, which is passed to the profile object at construction time.
Computing $r_s$
The mass-radius relation defined in terms of the background density is \begin{equation}\label{eq:mrr} M_\Delta = \frac{4\pi}{3}r_\Delta^3\Delta\,\rho_\mathrm{bg}, \end{equation} which implicitly defines $r_\Delta$. The concentration $c_\Delta$ is then defined by \begin{equation}\label{def:cDelta} c_\Delta \equiv \frac{r_\Delta}{r_s}. \end{equation} Consequently, the scale radius $r_s$ can be computed from $M_\Delta$ and $c_\Delta$ using \begin{equation}\label{def:r_s} r_s = \frac{1}{c_\Delta}\left(\frac{3M_\Delta}{4\pi\Delta\,\rho_\mathrm{bg}}\right)^{1/3} = \frac{r_{s0}}{(\Delta\,\rho_\mathrm{bg})^{1/3}}, \qquad r_{s0} \equiv \frac{1}{c_\Delta}\left(\frac{3M_\Delta}{4\pi}\right)^{1/3}. \end{equation} We split the expression of $r_s$ in a constant part $r_{s0}$ and a redshift dependent (time-dependent) part $(\Delta\,\rho_\mathrm{bg}(z))^{-1/3}$.
Note that, the parameter $r_s$ can be computed directly from $(M_\Delta,\; c_\Delta)$, given the mass definition, without referring to $\hat\rho(x)$.
Computing $\rho_s$
Now, applying the mass definition $M_\Delta$ in terms of the radius $r_\Delta$ to our profile results in \begin{equation}\label{eq:def:Mr} M_\Delta = \int_0^{r_\Delta}4\pi r^2\rho(r)\mathrm{d}r = 4\pi r_s^3 \rho_s \int_0^{c_\Delta}x^2\hat\rho(x)\mathrm{d}x = 4\pi r_s^3 \rho_s I_{x^2\hat\rho}(c_\Delta), \end{equation} where we defined \begin{equation}\label{def:Ix2_dld} I_{x^2\hat\rho}(c_\Delta) \equiv \int_0^{c_\Delta}x^2\hat\rho(x)\mathrm{d}x. \end{equation} This integral can be implemented through the virtual method nc_halo_density_profile_eval_dl_spher_mass(), otherwise it will be computed numerically using nc_halo_density_profile_eval_dl_density(). This same mass can be obtained from the background density using mass-radius relation \eqref{eq:mrr}, consequently \begin{equation}\label{def:rho_s} \rho_s = \frac{c_\Delta^3\Delta\,\rho_\mathrm{bg}}{3I_{x^2\hat\rho}(c_\Delta)}. \end{equation} The only redshift dependency (time-dependency) here comes from the value of $\rho_\mathrm{bg}(z)$, for this reason it is convenient to define a constant quantity \begin{equation}\label{def:rho_s0} \rho_{s0} \equiv \frac{\rho_s}{\Delta\,\rho_\mathrm{bg}} = \frac{c_\Delta^3}{3I_{x^2\hat\rho}(c_\Delta)}. \end{equation}
2D projection
The surface density obtained from the projection of the density
profile along the line-of-sight is given by
\begin{align}
\Sigma(R) &= \int_{-\infty}^\infty\rho(\sqrt{R^2+z^2})\mathrm{d}z, \
&= 2\rho_s\int_{0}^\infty\hat\rho(\sqrt{R^2/r_s^2 + z^2/r_s^2})\mathrm{d}z, \ \label{eq:def:hatSigma}
&= r_s\rho_s\hat\Sigma(R / r_s), & \hat\Sigma(X) &\equiv 2\int_{0}^\infty\hat\rho(\sqrt{X^2 + u^2})\mathrm{d}u.
\end{align}
In the equation above we obtain the 2D projection $\Sigma(R)$ in terms
of its dimensionless version $\hat\Sigma(X)$, where $X = R / r_s$.
The user can implement the method nc_halo_density_profile_eval_dl_2d_density()
providing $\hat\Sigma(X)$ directly or rely on the numerical implementation.
Mass on the cylinder of radius $R$
Using the 2D projection $\Sigma(R)$ one computes the total mass
inside an infinite cylinder of radius $R$ using
\begin{align}
\overline{M}(R) &= \int_0^R\Sigma(R’)2\pi R’\mathrm{d}R’ = 2\pi r_s^3\rho_s \hat{\overline{M}}(<R/r_s), \ \label{eq:def:cylmass}
\hat{\overline{M}}(X) &\equiv \int_0^X\hat\Sigma(X’)X’\mathrm{d}X’.
\end{align}
Here it is possible to implement the function $\hat{\overline{M}}(X)$
through the method nc_halo_density_profile_eval_dl_cyl_mass() or to use
the default numerical implementation.
Numerical computation
If the implementation (i.e., a particular radial profile implementation of this abstract class) does not provide any of the functions:
nc_halo_density_profile_eval_dl_spher_mass(),
nc_halo_density_profile_eval_dl_2d_density(),
nc_halo_density_profile_eval_dl_cyl_mass(),
they will be computed numerically integrating the density
$\hat{\rho}$ (nc_halo_density_profile_eval_dl_density()).
These functions will be prepared to be computed inside the
interval $(X_i,\,X_f)$ defined by NcHaloDensityProfile:lnXi
and NcHaloDensityProfile:lnXf and using the relative
tolerance NcHaloDensityProfile:reltol. See the following
functions to control this behavior: nc_halo_density_profile_set_reltol(),
nc_halo_density_profile_set_lnXi(),
nc_halo_density_profile_set_lnXf().
Units
Distance: $[r] = \mathrm{Mpc}$; Mass: $[M_\Delta] = \mathrm{M}\odot$; Density: $[\rho] = \mathrm{M}\odot \, \mathrm{Mpc}^{-3}$; Surface mass density: $[\Sigma] = \mathrm{M}_\odot \, \mathrm{Mpc}^{-2}$.
Functions
nc_halo_density_profile_clear
Atomically decrements the reference count of dp by one. If the reference count drops to 0,
all memory allocated by dp is released. Set the pointer to NULL;.
Instance methods
nc_halo_density_profile_eval_2d_density
This function computes the 2D projection of the density profile at radius $R$ and redshift $z$, see Eq. \eqref{}.
nc_halo_density_profile_eval_2d_density_array
This function computes 2D projection of the density profile at radius $R$ and redshift $z$, see Eq. \eqref{}.
nc_halo_density_profile_eval_cyl_mass
This function computes the total mass enclose in the cylinder of radius $R$, see Eq. \eqref{}.
nc_halo_density_profile_eval_cyl_mass_array
This function computes the total mass enclose in the cylinder of radius $R$, see Eq. \eqref{}.
nc_halo_density_profile_eval_density_array
This function computes the density profile in real space.
nc_halo_density_profile_eval_dl_2d_density
This function computes the dimensionless 2D density profile, see Eq. \eqref{eq:def:hatSigma}.
nc_halo_density_profile_eval_dl_cyl_mass
This function computes the dimensionless cylinder mass, see Eq. \eqref{eq:def:cylmass}.
nc_halo_density_profile_eval_dl_density
This function computes the dimensionless density profile, see Eq. \eqref{def:dlrho}.
nc_halo_density_profile_eval_dl_spher_mass
This function computes the 2d projection of the dimensionless density profile as described in Eq. \eqref{def:Ix2_dld}.
nc_halo_density_profile_eval_numint_dl_2d_density
This function computes the dimensionless 2D density profile, see Eq. \eqref{eq:def:hatSigma}. This is the default implementation that will be used unless the child object provides one. This interface is present for testing purpose.
nc_halo_density_profile_eval_numint_dl_cyl_mass
This function computes the dimensionless cylinder mass, see Eq. \eqref{eq:def:cylmass}. This is the default implementation that will be used unless the child object provides one. This interface is present for testing purpose.
nc_halo_density_profile_eval_numint_dl_spher_mass
This function computes the enclosed mass in a sphere within radius $X$, i.e., the 2d projection of the dimensionless density profile as described in Eq. \eqref{def:Ix2_dld}. This is the default implementation that will be used unless the child object provides one. This interface is present for testing purpose.
nc_halo_density_profile_eval_spher_mass
This function computes the total mass enclosed in the sphere of radius $r$, see Eq. \eqref{eq:def:Mr}.
nc_halo_density_profile_eval_spher_mass_delta
This function computes the total mass enclosed in the sphere of radius $r_\Delta$, see Eq. \eqref{eq:def:Mr}.
nc_halo_density_profile_free
Atomically decrements the reference count of dp by one. If the reference count drops to 0,
all memory allocated by dp is released.
nc_halo_density_profile_get_numint_splines
This function provides the splines computed in this object, NcHaloDensityProfile:
dl_2d_density_s and dl_cyl_mass_s.
nc_halo_density_profile_get_phys_limits
Gets the physical computation interval $(R_i,\, R_f)$.
This interval is relevant only if the object relies on
the numerical computation of the functions:
- nc_halo_density_profile_eval_dl_2d_density()
- nc_halo_density_profile_eval_dl_cyl_mass().
nc_halo_density_profile_r_s
This function computes the $r_s$ parameter as described in Eq. \eqref{def:r_s}.
nc_halo_density_profile_r_s_rho_s
This function computes $r_s$ and $\rho_s$ parameters as described in Eqs. \eqref{def:r_s}, \eqref{def:rho_s} and \eqref{def:rho_s0}.
nc_halo_density_profile_rho_s
This function computes the $\rho_s$ parameter as described in Eqs. \eqref{def:rho_s} and \eqref{def:rho_s0}.
Properties
NumCosmo.HaloDensityProfile:lnXf
Logarithm of the upper limit of the interval where the projected densities are computed $\ln(X_f)$.
NumCosmo.HaloDensityProfile:lnXi
Logarithm of the lower limit of the interval where the projected densities are computed $\ln(X_i)$.
Properties inherited from NcmModel (9)
NumCosmoMath.Model:implementation
NumCosmoMath.Model:name
NumCosmoMath.Model:nick
NumCosmoMath.Model:params-types
NumCosmoMath.Model:reparam
NumCosmoMath.Model:scalar-params-len
NumCosmoMath.Model:sparam-array
NumCosmoMath.Model:submodel-array
NumCosmoMath.Model:vector-params-len
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct NumCosmoHaloDensityProfileClass {
gdouble (* eval_dl_density) (
NcHaloDensityProfile* dp,
const gdouble x
);
gdouble (* eval_dl_spher_mass) (
NcHaloDensityProfile* dp,
const gdouble x
);
gdouble (* eval_dl_2d_density) (
NcHaloDensityProfile* dp,
const gdouble X
);
gdouble (* eval_dl_cyl_mass) (
NcHaloDensityProfile* dp,
const gdouble X
);
}
No description available.
Class members
eval_dl_density: gdouble (* eval_dl_density) ( NcHaloDensityProfile* dp, const gdouble x )No description available.
eval_dl_spher_mass: gdouble (* eval_dl_spher_mass) ( NcHaloDensityProfile* dp, const gdouble x )No description available.
eval_dl_2d_density: gdouble (* eval_dl_2d_density) ( NcHaloDensityProfile* dp, const gdouble X )No description available.
eval_dl_cyl_mass: gdouble (* eval_dl_cyl_mass) ( NcHaloDensityProfile* dp, const gdouble X )No description available.
Virtual methods
NumCosmo.HaloDensityProfileClass.eval_dl_2d_density
This function computes the dimensionless 2D density profile, see Eq. \eqref{eq:def:hatSigma}.
NumCosmo.HaloDensityProfileClass.eval_dl_cyl_mass
This function computes the dimensionless cylinder mass, see Eq. \eqref{eq:def:cylmass}.
NumCosmo.HaloDensityProfileClass.eval_dl_density
This function computes the dimensionless density profile, see Eq. \eqref{def:dlrho}.
NumCosmo.HaloDensityProfileClass.eval_dl_spher_mass
This function computes the 2d projection of the dimensionless density profile as described in Eq. \eqref{def:Ix2_dld}.