BBKS¶
- class hmf.core.transfer_models.BBKS(*, a=2.34, b=3.89, c=16.1, d=5.46, e=6.71, baryons: Literal['sugiyama95', 'sugiyama95_preprint', 'none'] = 'sugiyama95')[source]¶
The Bardeen et al. (1986) fit, with a baryon correction to the shape parameter.
\[T(k) = \frac{\ln(1+aq)}{aq} \left(1 + bq + (cq)^2 + (dq)^3 + (eq)^4\right)^{-1/4}, \qquad q = k / \Gamma,\]with k in h/Mpc and \(\Gamma = \Omega_{m,0} h\) (BBKS Eq. G3). The baryon correction multiplies \(\Gamma\) by
"sugiyama95"(the default): \(\exp(-\Omega_b(1 + \sqrt{2h}/\Omega_m))\), the published form of Sugiyama (1995), as quoted by Meiksin, White & Peacock (1999, Eq. 4) and Liddle & Lyth (2000, Eq. 5.14);"sugiyama95_preprint": \(\exp(-\Omega_b(1 + 1/\Omega_m))\), the form of the preprint (astro-ph/9412025, Eq. 3.9);"none": 1.
The two Sugiyama forms agree at h = 0.5. (In hmf v3 these were the
use_liddle_baryonsanduse_sugiyama_baryonsflags.)- Parameters:
a (float, default 2.34) – Coefficient a of Eq. G3.
b (float, default 3.89) – Coefficient b of Eq. G3.
c (float, default 16.1) – Coefficient c of Eq. G3.
d (float, default 5.46) – Coefficient d of Eq. G3.
e (float, default 6.71) – Coefficient e of Eq. G3.
baryons (Literal['sugiyama95', 'sugiyama95_preprint', 'none'], default 'sugiyama95') – The baryon correction to the shape parameter (see above).
Attributes
- alias: ClassVar[str | None] = 'BBKS'¶
The short name the model is registered under, if any. Set by the
aliasclass keyword; never inherited.
- backend: ClassVar[str | None] = None¶
The Boltzmann code that computes the model (
"camb"or"class"), if any.
- calibration_domain: ClassVar[Domain | None] = None¶
Where the model was calibrated, if that is stated by its source.
- parameter_source: ClassVar[str] = 'Bardeen et al. 1986, ApJ 304, 15, Eq. G3'¶
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, ...]] = ('Bardeen, J. M., Bond, J. R., Kaiser, N., Szalay, A. S., 1986. ApJ 304, 15. https://doi.org/10.1086/164143', 'Sugiyama, N., 1995. ApJS 100, 281. https://doi.org/10.1086/192220')¶
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
Transferstage 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 thatget()accepts, which is looked up and instantiated with its default parameters.- Returns:
An instance of
cls.- Return type:
- Raises:
ModelNotFoundError – If
valueis a name that no model of this kind is known by.TypeError – If
valueis of any other type, or names a class that is not a concrete subclass ofcls.
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:
- Raises:
ModelNotFoundError – If no model of this kind is known by
name, even after loading thehmf.modelsentry points and tryingnameas an import path.TypeError – If
nameresolves to something that is not a concrete subclass ofcls.
- 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.modelsentry-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
- shape_parameter(cosmology: FLRW) Any[source]¶
The shape parameter Gamma, including the baryon correction.
- Parameters:
cosmology – The cosmology.
- Returns:
\(\Gamma\), a scalar Quantity in h/Mpc.
- Return type:
- solve(cosmology: FLRW, k_accuracy: KAccuracy, *, disk_cache: DiskCache | None = None) TransferSolution[source]¶
Compute the transfer function (see
TransferModel.solve()).