BondEfs

class hmf.core.transfer_models.BondEfs(*, a=6.4, b=3.0, c=1.7, nu=1.13)[source]

The Bond & Efstathiou (1984) fit, in the shape-parameter form of EBW92.

\[T(k) = \left[1 + \left(aq + (bq)^{3/2} + (cq)^2\right)^\nu\right]^{-1/\nu}, \qquad q = k/\Gamma, \qquad \Gamma = \Omega_{m,0} h,\]

with k in h/Mpc (Efstathiou, Bond & White 1992, Eq. 7). The defaults are EBW92’s, which the GIF and Virgo simulations used. The form has no baryon suppression; use EH_NoBAO for that.

Parameters:
  • a (float, default 6.4) – Coefficient a, in Mpc/h at Gamma = 1.

  • b (float, default 3.0) – Coefficient b, in Mpc/h at Gamma = 1.

  • c (float, default 1.7) – Coefficient c, in Mpc/h at Gamma = 1.

  • nu (float, default 1.13) – The exponent nu.

Attributes

a: float
b: float
c: float
nu: float
alias: ClassVar[str | None] = 'BondEfs'

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

backend: ClassVar[str | None] = None

The Boltzmann code that computes the model ("camb" or "class"), if any.

calibration

Where this model was calibrated, with its source (None if it was not).

The class’s calibration_domain, unless it depends on the instance’s parameters.

calibration_domain: ClassVar[Domain | None] = None

The calibration domain of the class, with its source (None if it was not calibrated): that of its default parameters. Ask an instance for calibration.

parameter_source: ClassVar[str] = 'Efstathiou, Bond & White 1992, MNRAS 258, 1P, Eq. 7'

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, ...]] = ('Bond, J. R., Efstathiou, G., 1984. ApJ 285, L45. https://doi.org/10.1086/184362', 'Efstathiou, G., Bond, J. R., White, S. D. M., 1992. MNRAS 258, 1P. https://doi.org/10.1093/mnras/258.1.1P')

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

valid_domain: ClassVar[Domain] = Domain(bounds=(('k', Interval(lower=0.0, upper=inf, unit=Unit("littleh / Mpc"), lower_open=True, upper_open=True)),), source='T(k) is defined for k > 0.')

any k > 0. The Transfer stage checks k against the model’s class’s domain, so a model can narrow it.

Type:

Where the model can be evaluated

Methods

check_cosmology(cosmology: FLRW) → None

Raise if the model does not apply to cosmology (by default it does).

Raises:

ValueError – If it does not apply: a model that does not apply to a cosmology is a configuration error.

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 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

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

classmethod qualified_name() → str

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

solve(cosmology: FLRW, k_accuracy: KAccuracy, *, disk_cache: DiskCache | None = None) → TransferSolution[source]

Compute the transfer function (see TransferModel.solve()).

Parameters:
Returns:

The transfer function of every species.

Return type:

TransferSolution