FOF¶
- class hmf.halos.mass_definitions.FOF(**model_params)[source]¶
A mass definition based on FroF networks with given linking length.
Attributes
Methods
- __init__(**model_params)
- change_definition(m: ndarray, mdef, profile=None, c=None, z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Change the spherical overdensity mass definition.
This requires using a profile, for which the halomod package must be used.
- Parameters:
m (float or array_like) – The halo mass to be changed, in \(M_\odot/h\). Must be broadcastable with c, if provided.
mdef (
MassDefinitionsubclass instance) – The mass definition to which to change.profile (
halomod.profiles.Profileinstance, optional) – An instantiated profile object from which to calculate the expected definition change. If not provided, a mocked NFW profile is used.c (float or array_like, optional) – The concentration(s) of the halos given. If not given, the concentrations will be automatically calculated using the profile object.
- Returns:
m_f (float or array_like) – The masses of the halos in the new definition.
r_f (float or array_like) – The radii of the halos in the new definition.
c_f (float or array_like) – The concentrations of the halos in the new definition.
- static critical_density(z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Get the critical density of the Universe at redshift z, [h^2 Msun/Mpc^3].
- classmethod get_models() dict[str, type]
Get a dictionary of all implemented models for this component.
- halo_density(z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))[source]
The density of halos under this mass definition.
Note that for FoF halos, this is very approximate. We follow [1] and define \(rho_{FOF} = 9/(2\pi b^3) \rho_m\), with b the linking length. This assumes all groups are spherical and singular isothermal spheres.
References
[1]White, Martin, Lars Hernquist, and Volker Springel. “The Halo Model and Numerical Simulations.” The Astrophysical Journal 550, no. 2 (April 2001): L129-32. https://doi.org/10.1086/319644.
- halo_overdensity_crit(z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Compute the halo overdensity with respect to the critical density.
- halo_overdensity_mean(z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Compute the halo overdensity with respect to the mean density.
- m_to_r(m, z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Return the radius corresponding to m for this mass definition.
- Parameters:
m (float or array_like) – The mass to convert to radius. Should be in the same units (modulo volume) as
halo_density().
Notes
Computed as \(\left(\frac{3m}{4\pi \rho_{\rm halo}\right)\).
- classmethod mean_density(z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Get the mean density of the Universe at redshift z, [h^2 Msun / Mpc^3].
- r_to_m(r, z=0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486))
Return the mass corresponding to r for this mass definition.
- Parameters:
r (float or array_like) – The radius to convert to mass. Units should be compatible with
halo_density().
Notes
Computed as \(\frac{4\pi r^3}{3} \rho_{\rm halo}\).