MeasuredMassDefinition

class hmf.core.fits.MeasuredMassDefinition(*, kind: MassDefinitionKind, linking_length: float | None = None, overdensity: float | None = None, preferred: MeasuredMassDefinition | None = None, note: str = '')[source]

The halo mass definition a fit was measured in.

This is a simple, hashable record, to be mapped onto the mass-definition types of issue #392. It does no conversion, but gives the overdensity relative to the mean density (delta_halo_mean_kernel()), the delta_halo input of the fits.

Parameters:
  • kind (Literal['fof', 'so_mean', 'so_critical', 'so_virial', 'so_any', 'self_bound']) – "fof" (friends-of-friends), "so_mean" / "so_critical" (spherical overdensity relative to the mean / critical density), "so_virial" (the Bryan & Norman 1998 virial overdensity), or "so_any" (a fit parameterised by the SO overdensity, which accepts any SO definition), or "self_bound" (the bound mass of SUBFIND (sub)haloes).

  • linking_length (float | None) – The FoF linking length b, in units of the mean interparticle separation.

  • overdensity (float | None) – The SO overdensity, relative to the density named by kind.

  • preferred (hmf.core.fits.MeasuredMassDefinition | None) – For "so_any": the definition used when none is given.

  • note (str) – Anything else worth knowing (halo finder, unbinding, …).

Model metadata

Methods

delta_halo_mean_kernel(omega_m_z: ArrayLike) → ndarray[tuple[Any, ...], dtype[float64]][source]

The halo overdensity relative to the mean density, \(\Delta_m\).

A pure, elementwise kernel of \(\Omega_m(z)\) (of CDM + baryons, see the module documentation), on plain arrays:

"so_mean"

the overdensity itself;

"so_critical"

\(\Delta_c/\Omega_m(z)\);

"so_virial"

Bryan & Norman (1998): \((18\pi^2 + 82x - 39x^2)/\Omega_m(z)\), with \(x = \Omega_m(z) - 1\) (so \(18\pi^2\) in Einstein-de Sitter);

"fof"

the overdensity of the isodensity surface the linking length b selects, for a singular isothermal sphere: \(9/(2\pi b^3)\), independent of \(\Omega_m(z)\) (White, Hernquist & Springel 2001; about 179 for b = 0.2), as hmf 3.x’s FOF;

"so_any"

that of the preferred definition.

Parameters:

omega_m_z – \(\Omega_m(z)\), dimensionless.

Returns:

\(\Delta_m\), dimensionless, with the shape of omega_m_z.

Return type:

numpy.ndarray

Raises:
  • DomainError – If an \(\Omega_m(z)\) is not finite and > 0.

  • ValueError – For "self_bound", which has no overdensity.