Tinker10

class hmf.core.fits.Tinker10(*, alpha_200=0.368, alpha_300=0.363, alpha_400=0.385, alpha_600=0.389, alpha_800=0.393, alpha_1200=0.365, alpha_1600=0.379, alpha_2400=0.355, alpha_3200=0.327, beta_200=0.589, beta_300=0.585, beta_400=0.544, beta_600=0.543, beta_800=0.564, beta_1200=0.623, beta_1600=0.637, beta_2400=0.673, beta_3200=0.702, gamma_200=0.864, gamma_300=0.922, gamma_400=0.987, gamma_600=1.09, gamma_800=1.2, gamma_1200=1.34, gamma_1600=1.5, gamma_2400=1.68, gamma_3200=1.81, phi_200=-0.729, phi_300=-0.789, phi_400=-0.91, phi_600=-1.05, phi_800=-1.2, phi_1200=-1.26, phi_1600=-1.45, phi_2400=-1.5, phi_3200=-1.49, eta_200=-0.243, eta_300=-0.261, eta_400=-0.261, eta_600=-0.273, eta_800=-0.278, eta_1200=-0.301, eta_1600=-0.301, eta_2400=-0.319, eta_3200=-0.336, beta_exp=0.2, phi_exp=-0.08, eta_exp=0.27, gamma_exp=-0.01, max_z=3.0)[source]

The Tinker et al. (2010) mass function.

\[f(\sigma) = \alpha\left[1 + (\beta\nu)^{-2\phi}\right]\nu^{2\eta + 1} \exp(-\gamma\nu^2/2)\]

(eq. 8 times \(\nu\)). The parameters are tabulated at nine overdensities (relative to the mean; Table 4) and splined in \(\log_{10}\Delta\). They evolve as \(\beta_0(1+z)^{0.2}\), \(\phi_0(1+z)^{-0.08}\), \(\eta_0(1+z)^{0.27}\) and \(\gamma_0(1+z)^{-0.01}\) (eqs. 9-12), frozen at max_z = 3, as the paper recommends. \(\alpha\) is the tabulated value at z = 0 and a tabulated \(\Delta\), and otherwise the value that normalises the fit (which needs \(\beta, \gamma > 0\), \(\eta > -1/2\) and \(\eta - \phi > -1/2\); otherwise it raises).

Parameters:
  • alpha_200 (float, default 0.368) – The normalisation alpha (used at z = 0 only) at Delta = 200.

  • alpha_300 (float, default 0.363) – The normalisation alpha (used at z = 0 only) at Delta = 300.

  • alpha_400 (float, default 0.385) – The normalisation alpha (used at z = 0 only) at Delta = 400.

  • alpha_600 (float, default 0.389) – The normalisation alpha (used at z = 0 only) at Delta = 600.

  • alpha_800 (float, default 0.393) – The normalisation alpha (used at z = 0 only) at Delta = 800.

  • alpha_1200 (float, default 0.365) – The normalisation alpha (used at z = 0 only) at Delta = 1200.

  • alpha_1600 (float, default 0.379) – The normalisation alpha (used at z = 0 only) at Delta = 1600.

  • alpha_2400 (float, default 0.355) – The normalisation alpha (used at z = 0 only) at Delta = 2400.

  • alpha_3200 (float, default 0.327) – The normalisation alpha (used at z = 0 only) at Delta = 3200.

  • beta_200 (float, default 0.589) – The parameter beta at Delta = 200.

  • beta_300 (float, default 0.585) – The parameter beta at Delta = 300.

  • beta_400 (float, default 0.544) – The parameter beta at Delta = 400.

  • beta_600 (float, default 0.543) – The parameter beta at Delta = 600.

  • beta_800 (float, default 0.564) – The parameter beta at Delta = 800.

  • beta_1200 (float, default 0.623) – The parameter beta at Delta = 1200.

  • beta_1600 (float, default 0.637) – The parameter beta at Delta = 1600.

  • beta_2400 (float, default 0.673) – The parameter beta at Delta = 2400.

  • beta_3200 (float, default 0.702) – The parameter beta at Delta = 3200.

  • gamma_200 (float, default 0.864) – The parameter gamma at Delta = 200.

  • gamma_300 (float, default 0.922) – The parameter gamma at Delta = 300.

  • gamma_400 (float, default 0.987) – The parameter gamma at Delta = 400.

  • gamma_600 (float, default 1.09) – The parameter gamma at Delta = 600.

  • gamma_800 (float, default 1.2) – The parameter gamma at Delta = 800.

  • gamma_1200 (float, default 1.34) – The parameter gamma at Delta = 1200.

  • gamma_1600 (float, default 1.5) – The parameter gamma at Delta = 1600.

  • gamma_2400 (float, default 1.68) – The parameter gamma at Delta = 2400.

  • gamma_3200 (float, default 1.81) – The parameter gamma at Delta = 3200.

  • phi_200 (float, default -0.729) – The parameter phi at Delta = 200.

  • phi_300 (float, default -0.789) – The parameter phi at Delta = 300.

  • phi_400 (float, default -0.91) – The parameter phi at Delta = 400.

  • phi_600 (float, default -1.05) – The parameter phi at Delta = 600.

  • phi_800 (float, default -1.2) – The parameter phi at Delta = 800.

  • phi_1200 (float, default -1.26) – The parameter phi at Delta = 1200.

  • phi_1600 (float, default -1.45) – The parameter phi at Delta = 1600.

  • phi_2400 (float, default -1.5) – The parameter phi at Delta = 2400.

  • phi_3200 (float, default -1.49) – The parameter phi at Delta = 3200.

  • eta_200 (float, default -0.243) – The parameter eta at Delta = 200.

  • eta_300 (float, default -0.261) – The parameter eta at Delta = 300.

  • eta_400 (float, default -0.261) – The parameter eta at Delta = 400.

  • eta_600 (float, default -0.273) – The parameter eta at Delta = 600.

  • eta_800 (float, default -0.278) – The parameter eta at Delta = 800.

  • eta_1200 (float, default -0.301) – The parameter eta at Delta = 1200.

  • eta_1600 (float, default -0.301) – The parameter eta at Delta = 1600.

  • eta_2400 (float, default -0.319) – The parameter eta at Delta = 2400.

  • eta_3200 (float, default -0.336) – The parameter eta at Delta = 3200.

  • beta_exp (float, default 0.2) – beta(z) = beta (1+z)^beta_exp.

  • phi_exp (float, default -0.08) – phi(z) = phi (1+z)^phi_exp.

  • eta_exp (float, default 0.27) – eta(z) = eta (1+z)^eta_exp.

  • gamma_exp (float, default -0.01) – gamma(z) = gamma (1+z)^gamma_exp.

  • max_z (float, default 3.0) – The redshift above which the parameters stop evolving.

Model metadata

alias: ClassVar[str | None] = 'Tinker10'

The short name the model is registered under, if any. Set by the alias class keyword; never inherited.

calibration_domain: ClassVar[Domain | None] = Domain(bounds=(('delta_halo', Interval(lower=200.0, upper=3200.0, unit=None, lower_open=False, upper_open=False)), ('sigma', Interval(lower=0.4, upper=4.0, unit=None, lower_open=False, upper_open=False)), ('z', Interval(lower=0.0, upper=2.5, unit=None, lower_open=False, upper_open=False))), source="Tinker et al. 2010 fit the z = 0 Tinker et al. 2008 data for 200 <= Delta <= 3200 (Table 4; Sec. 4), so the sigma range is Tinker08's 0.25 <~ 1/sigma <~ 2.5 (T08 Sec. 4; T10 states none). The redshift evolution (eqs. 9-12) is calibrated for Delta = 200 only (Sec. 4), on the T08 outputs (z <= 2.5); at other Delta only z = 0 is calibrated. Accuracy ~5% for nu > 0.6 relative to T08 (Sec. 4).")

Where the fit was calibrated against simulations, with its source; None for a fit that was not calibrated (e.g. an analytic one).

measured_mass_definition: ClassVar[MeasuredMassDefinition] = MeasuredMassDefinition(kind='so_any', linking_length=None, overdensity=None, preferred=MeasuredMassDefinition(kind='so_mean', linking_length=None, overdensity=200, preferred=None, note=''), note='Tinker et al. 2010, Sec. 1: SO relative to the background.')

The halo mass definition the fit was measured in.

modifies_dndm: ClassVar[bool] = False

Whether modify_dndm_kernel() changes the mass function (see “Post-processing the mass function” in the module documentation); if False, it is the identity.

normalized

Whether \(f\) integrates to 1 over \(\ln\sigma^{-1}\) (all mass in haloes).

parameter_source: ClassVar[str] = 'Tinker et al. 2010 (arXiv v2), Table 4 and eqs. 9-12 (and the z = 3 cap, Sec. 4).'

The exact source (paper, version, table or equation) of the parameter defaults, e.g. “Tinker et al. 2008, ApJ 688, 709 (published), Table 2”.

references: ClassVar[tuple[str, ...]] = ('Tinker, J., et al., 2010. ApJ 724, 878. https://doi.org/10.1088/0004-637X/724/2/878',)

References to cite when the model is used, each a formatted citation.

requires: ClassVar[frozenset[str]] = frozenset({'delta_c', 'delta_halo', 'z'})

The inputs (from INPUTS) that fsigma() needs, besides sigma.

simulations: ClassVar[SimulationDetails | None] = SimulationDetails(box_size=<Quantity [ 768.,  384.,  271.,  192.,   96., 1280.,  500.,  250.,  120.,              80., 1000.,  500.,  500.,  500.,  384.,  384.,  120.,   80.] Mpc / littleh>, n_particles=(1073741824, 1073741824, 1073741824, 1073741824, 1073741824, 262144000, 1073741824, 134217728, 134217728, 134217728, 1073741824, 134217728, 134217728, 134217728, 1073741824, 1073741824, 1073741824, 134217728), omega_m=(0.3, 0.3, 0.3, 0.3, 0.3, 0.27, 0.3, 0.3, 0.3, 0.3, 0.27, 0.24, 0.24, 0.24, 0.26, 0.2, 0.27, 0.23), omega_b=(0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.045, 0.04, 0.04, 0.04, 0.044, 0.042, 0.042, 0.042, 0.044, 0.04, 0.044, 0.04), sigma_8=(0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.79, 0.75, 0.75, 0.8, 0.75, 0.9, 0.79, 0.75), h=(0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.73, 0.73, 0.73, 0.71, 0.7, 0.7, 0.73), n_s=(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.95, 0.95, 0.95, 0.95, 0.94, 1.0, 0.95, 0.95), softening=<Quantity [0.025 , 0.014 , 0.01  , 0.0049, 0.0014, 0.12  , 0.015 , 0.0076,            0.0018, 0.0012, 0.03  , 0.015 , 0.015 , 0.015 , 0.014 , 0.014 ,            0.0009, 0.0012] Mpc / littleh>, transfer=None, z_start=(40, 48, 51, 54, 65, 49, 40, 49, 49, 49, 60, 40, 40, 40, 35, 42, 100, 49), initial_conditions=('ZA', 'ZA', 'ZA', 'ZA', 'ZA', '2LPT', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA', 'ZA'), halo_finder='SO (own, about density peaks)', n_min=None, z_range=(0.0, 2.5), names=('H768', 'H384', 'H271', 'H192', 'H96', 'L1280', 'L500', 'L250', 'L120', 'L80', 'L1000W', 'L500Wa', 'L500Wb', 'L500Wc', 'H384W', 'H384Om', 'L120W', 'L80W'), notes="Tinker et al. 2010 fit the z = 0 mass functions of Tinker et al. 2008, so these are Tinker08's simulations (T10's own Table 1 lists 15 of them, for the bias). Outputs at z = 0, 0.5, 1.25 and 2.5 (not all for every run). The L500 runs have as many SPH gas particles as dark matter (no cooling). The minimum particle number depends on Delta: 400-1600 (Table 2). Table 1's particle mass for H192 (5.89e8) does not follow from its box size (5.49e8). hmf 3.x's Omega_b list was shifted by one from H384W on, and had all runs starting from ZA.", source='Tinker et al. 2008, Sec. 2.1 and Table 1.')

The simulations the fit was calibrated on (None for a fit to no simulations).

valid_domain: ClassVar[Domain] = Domain(bounds=(('delta_c', Interval(lower=0.0, upper=inf, unit=None, lower_open=True, upper_open=True)), ('delta_halo', Interval(lower=70.0, upper=3600.0, unit=None, lower_open=False, upper_open=False)), ('sigma', Interval(lower=0.0, upper=inf, unit=None, lower_open=True, upper_open=True)), ('z', Interval(lower=0.0, upper=inf, unit=None, lower_open=False, upper_open=True))), source='sigma > 0, z >= 0, delta_c > 0, and 70 <= Delta <= 3600: there the spline of the default Table 4 parameters can be normalised (beta, gamma > 0, eta > -1/2, eta - phi > -1/2) at every z (it fails below 67.7 and above 3662). Parameters that can not be normalised raise in any case.')

fsigma() raises outside it.

Type:

Where the formula is defined or sensible

Methods

check_required(x: FitInputs) → None

Raise if an input needed to evaluate the fit is missing from x.

Raises:

ValueError – If an input in requires (or needed to check valid_domain) is missing.

check_valid(x: FitInputs) → None

Raise if any input is outside valid_domain.

Raises:

DomainError – Always, if any value is outside the valid domain: this does not depend on any policy.

classmethod coerce(value: object) → Self

Convert a value to a model of this kind: the converter of a model field.

Parameters:

value – An instance of cls, which is returned as it is; or a name, import path or class that get() accepts, which is looked up and instantiated with its default parameters.

Returns:

An instance of cls.

Return type:

Model

Raises:
  • ModelNotFoundError – If value is a name that no model of this kind is known by.

  • TypeError – If value is of any other type, or names a class that is not a concrete subclass of cls.

Examples

>>> from hmf.core.filters import Filter, TopHat
>>> Filter.coerce("TopHat") == TopHat()
True
classmethod domain_inputs() → frozenset[str]

The inputs (besides sigma) needed to evaluate the fit and check both domains.

classmethod fields_info() → tuple[FieldInfo, ...]

Describe this class’s fields, without creating an instance.

Returns:

The name, type, default and documentation of each field.

Return type:

tuple of FieldInfo

fsigma(sigma: ArrayLike, *, z: ArrayLike | None = None, omega_m_z: ArrayLike | None = None, delta_halo: ArrayLike | None = None, delta_c: ArrayLike | None = None, n_eff: ArrayLike | None = None, m: ArrayLike | None = None) → ndarray[tuple[Any, ...], dtype[float64]]

The multiplicity function, \(f(\sigma) = \nu f(\nu)\).

m must be a Quantity (see hmf.core.units); every other input is dimensionless. Code that already has plain arrays in canonical units calls fsigma_kernel() or evaluate_fsigma() instead (see “Evaluating a fit” in the module documentation). It applies no calibration policy (see evaluate_fsigma() for that), but always checks valid_domain.

Parameters:
  • sigma – \(\sigma(m, z)\).

  • z – Redshift.

  • omega_m_z – \(\Omega_m(z)\).

  • delta_halo – The halo overdensity relative to the mean density.

  • delta_c – The critical overdensity for collapse.

  • n_eff – The effective spectral index.

  • m – The halo mass, a Quantity (e.g. in Msun_h).

Returns:

\(f(\sigma)\) (dimensionless), broadcast over the inputs.

Return type:

numpy.ndarray

Raises:
  • ValueError – If an input the fit requires is not given.

  • UnitBoundaryError – If m is not a Quantity.

  • DomainError – If any input is outside valid_domain, or makes the fit’s parameters unphysical.

fsigma_kernel(x: FitInputs) → ndarray[tuple[Any, ...], dtype[float64]]

fsigma() at kernel level, from inputs that are plain arrays.

The inputs are in canonical units (the mass in Msun/h); see hmf.core._kernels. It checks the valid domain, as fsigma() does, and applies no calibration policy (see evaluate_fsigma()).

Parameters:

x – The inputs.

Return type:

numpy.ndarray

Raises:
  • ValueError – If an input the fit requires is not in x.

  • DomainError – As for fsigma().

classmethod get(name: str | type[Model]) → type[Self]

Look up a model of this kind.

Parameters:

name – An alias ("Tinker08"), a qualified name ("hmf.core.fits:Tinker08"), an import path to a class not yet imported ("pkg.mod:Cls" or "pkg.mod.Cls"), or a class.

Returns:

The model class (not an instance). It is always a subclass of cls.

Return type:

type

Raises:
  • ModelNotFoundError – If no model of this kind is known by name, even after loading the hmf.models entry points and trying name as an import path.

  • TypeError – If name resolves to something that is not a concrete subclass of cls.

classmethod get_aliases() → Mapping[str, str]

Return a read-only mapping from alias to qualified name, for this kind.

classmethod get_models() → Mapping[str, type[Self]]

Return the registered models of this kind, by qualified name.

Plugins advertised in the hmf.models entry-point group are loaded first.

Returns:

A read-only mapping from qualified name to class. Called on a kind, it is a live view of the registry. Called on a non-kind subclass, it holds only the models that subclass it.

Return type:

Mapping

in_calibration_domain(x: FitInputs) → bool | ndarray[tuple[Any, ...], dtype[bool]]

Whether each input is inside calibration_domain.

Parameters:

x – The inputs, from inputs().

Returns:

A bool if every input is a scalar, else the broadcast array. True if the fit has no calibration domain (it is None).

Return type:

bool or numpy.ndarray of bool

Raises:

ValueError – If an input needed to check the domain was not given.

inputs(sigma: ArrayLike, *, z: ArrayLike | None = None, omega_m_z: ArrayLike | None = None, delta_halo: ArrayLike | None = None, delta_c: ArrayLike | None = None, n_eff: ArrayLike | None = None, m: ArrayLike | None = None) → FitInputs

Collect the inputs, checking that the required ones are given.

Parameters are as for fsigma() (m is a Quantity). Code that already has plain arrays in canonical units builds FitInputs directly (see “Evaluating a fit” in the module documentation).

Returns:

The inputs as plain arrays, in canonical units.

Return type:

FitInputs

Raises:

ValueError – If an input in requires (or needed to check valid_domain) is missing.

modify_dndm(m: Any, dndm: Any, *, z: ArrayLike, ngtm: Any, H0: Any, omega_m0: ArrayLike) → Any

Map the mass function computed from fsigma() to the fit’s.

The identity unless modifies_dndm (see “Post-processing the mass function” in the module documentation). Every fit takes the same arguments, whether it uses them or not. This method converts them and calls modify_dndm_kernel(), which a mass-function Stage calls directly.

Parameters:
  • m – Halo masses, a Quantity: in h-units, or physical units (converted with H0).

  • dndm – The mass function from fsigma(), a Quantity (number density per mass).

  • z – Redshift.

  • ngtm – The cumulative mass function n(>m) from fsigma(), a Quantity.

  • H0 – The Hubble constant, a scalar Quantity (e.g. 70 * H0_unit). It converts physical units, and gives h to fits whose formula is in physical units.

  • omega_m0 – The density parameter of CDM + baryons today.

Returns:

The fit’s mass function, in dndm_unit.

Return type:

Quantity

modify_dndm_kernel(m: ArrayLike, dndm: ArrayLike, *, z: ArrayLike, ngtm: ArrayLike, h: ArrayLike, omega_m0: ArrayLike) → ndarray[tuple[Any, ...], dtype[float64]]

modify_dndm() at kernel level, on plain arrays.

A pure kernel in canonical units (see hmf.core._kernels): the identity, unless the fit sets modifies_dndm (its class documentation describes the correction). All arguments broadcast. It checks the arguments that say where the mass function is evaluated (m, z, h, omega_m0), from their extent; dndm and ngtm are values it maps, and may be NaN (e.g. masked by a domain policy).

Parameters:
  • m – Halo masses, in Msun/h.

  • dndm – The mass function from fsigma(), in h^4 / (Msun Mpc^3).

  • z – Redshift.

  • ngtm – The cumulative mass function n(>m) from fsigma(), in h^3 / Mpc^3.

  • h – The dimensionless Hubble parameter, H0 / (100 km/s/Mpc).

  • omega_m0 – The density parameter of CDM + baryons today.

Returns:

The fit’s mass function, in h^4 / (Msun Mpc^3).

Return type:

numpy.ndarray

Raises:

DomainError – If an m, h or omega_m0 is not finite and > 0, or a z is not finite and >= 0.

parameters(delta_halo: ArrayLike, z: ArrayLike) → tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]][source]

The parameters \((\alpha, \beta, \gamma, \phi, \eta)\) at delta_halo, z.

Parameters:
  • delta_halo – The halo overdensity relative to the mean density.

  • z – Redshift.

Returns:

alpha, beta, gamma, phi, eta, broadcast over the inputs.

Return type:

tuple of numpy.ndarray

Raises:

DomainError – If the parameters can not be normalised.

classmethod qualified_name() → str

Return this class’s qualified name, package.module:Class.