Duffy08¶
- class hmf.core.concentration.Duffy08(*, definition: Literal['200c', 'vir', '200m'] = '200c', sample: Literal['full', 'relaxed'] = 'full', redshifts: Literal['0-2', '0'] = '0-2')[source]¶
The NFW concentration-mass relation of Duffy et al. (2008).
\[c = A\left(\frac{M}{2\times10^{12}\,h^{-1}M_\odot}\right)^B (1+z)^C,\]with (A, B, C) from their Table 1 (
DUFFY08_PARAMETERS), for the chosen mass definition, sample and redshift range. M and c are indefinition. It was fitted to haloes of \(10^{11}\)-\(10^{15}\) M☉/h, at z = 0-2 (or z = 0), in the WMAP5 cosmology. The full sample, the default, is the median of all haloes, which is what a mass function counts; the relaxed sample’s concentrations are about 10% higher.- Parameters:
definition (Literal['200c', 'vir', '200m'], default '200c') – The mass definition of the parameter set: ‘200c’ (200 times the critical density), ‘vir’ (Bryan & Norman 1998) or ‘200m’ (200 times the mean).
sample (Literal['full', 'relaxed'], default 'full') – The halo sample: ‘full’ (all haloes) or ‘relaxed’.
redshifts (Literal['0-2', '0'], default '0-2') – The redshift range the set was fitted to: ‘0-2’, or ‘0’ (with C = 0).
Attributes
- alias: ClassVar[str | None] = 'Duffy08'¶
The short name the model is registered under, if any. Set by the
aliasclass keyword; never inherited.
- calibration¶
1e11-1e15 Msun/h (in
definition), and z = 0-2 (or z = 0).
- calibration_domain: ClassVar[Domain | None] = Domain(bounds=(('m', Interval(lower=100000000000.0, upper=1000000000000000.0, unit=Unit("solMass / littleh"), lower_open=False, upper_open=False)), ('z', Interval(lower=0.0, upper=2.0, unit=None, lower_open=False, upper_open=False))), source="Duffy et al. 2008 (arXiv:0804.2486 v4): haloes of 1e11-1e15 Msun/h (abstract; Sec. 3), in the relation's own mass definition; z = 0-2 (Table 1). One cosmology (WMAP5: Omega_m = 0.258, sigma_8 = 0.796; Sec. 2).")¶
ask an instance for
calibration, that of its set.- Type:
The calibration domain of the default set (z = 0-2)
- mass_definition¶
SOCritical(200), SOVirial() or SOMean(200), from
definition.
- parameter_source: ClassVar[str] = 'Duffy et al. 2008 (arXiv:0804.2486 v4), Table 1, NFW.'¶
The exact source (paper, version, table or equation) of the parameter defaults, e.g. “Tinker et al. 2008, ApJ 688, 709 (published), Table 2”.
- parameters¶
The parameters (A, B, C) of the chosen set.
- references: ClassVar[tuple[str, ...]] = ('Duffy, A. R., Schaye, J., Kay, S. T., Dalla Vecchia, C., 2008. MNRAS 390, L64. https://doi.org/10.1111/j.1745-3933.2008.00537.x',)¶
References to cite when the model is used, each a formatted citation.
- valid_domain: ClassVar[Domain] = Domain(bounds=(('m', Interval(lower=0.0, upper=inf, unit=Unit("solMass / littleh"), lower_open=True, upper_open=True)), ('z', Interval(lower=0.0, upper=inf, unit=None, lower_open=False, upper_open=True))), source='m > 0, z >= 0.')¶
ln_concentration_and_slope_kernel()raises aDomainErroroutside it.- Type:
Where the relation can be evaluated
Methods
- 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
- concentration(*, m: Any, z: ArrayLike) ndarray[tuple[Any, ...], dtype[float64]]¶
The median concentration c(M, z), in
mass_definition.- Parameters:
m (Quantity) – Masses in Msun/h, in
mass_definition.z (float or array_like) – Redshifts, broadcast with
m.
- Returns:
Dimensionless, with the broadcast shape.
- Return type:
numpy.float64 or numpy.ndarray
- Raises:
DomainError – Outside
valid_domain.
- 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
- in_calibration_domain_kernel(*, m: ArrayLike, z: ArrayLike) ndarray[tuple[Any, ...], dtype[bool]]¶
Whether (m, z) is inside
calibration, at kernel level.- Parameters:
m – Masses in Msun/h, in
mass_definition.z – Redshifts, broadcast with
m.
- Returns:
With the broadcast shape; True everywhere without a calibration domain.
- Return type:
- Raises:
DomainError – If a mass or redshift is outside
valid_domain(from their extent).
- ln_concentration_and_slope_kernel(*, m: ArrayLike, z: ArrayLike) tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]]¶
Ln c(M, z) and its slope \(d\ln c/d\ln M\), at kernel level.
- Parameters:
m – Masses in Msun/h, in
mass_definition: a plain array.z – Redshifts, broadcast with
m.
- Returns:
ln_c, dln_c_dln_m – Dimensionless, with the broadcast shape.
- Return type:
- Raises:
DomainError – If a mass or redshift is outside
valid_domain(from their extent).