WDM

class hmf.alternatives.wdm.WDM(mx, cosmo=FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897), z: float | None = None, **model_params)[source]

Base class for all WDM components.

Do not use this class directly. The primary purpose of the WDM Component is to modify the transfer function. Thus, the only requisite method to define in any given subclass is transfer(), which calculates this quantity in the proposed WDM model.

Parameters:
  • mx (float) – Mass of the particle in keV

  • cosmo (hmf.cosmo.Cosmology instance) – A cosmology. Defaults to hmf.cosmology.cosmo.DEFAULT_COSMOLOGY.

  • z (float, optional) – Deprecated and ignored. The WDM transfer function and its characteristic (comoving) scales and masses are independent of redshift.

  • **model_parameters (unpack-dict) – Parameters specific to a model. To see the default values, check the _defaults class attribute.

rho_mean

Comoving mean matter density, in \(h^2 M_\odot {\rm Mpc}^{-3}\).

Type:

float

Attributes

references

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

Methods

classmethod get_models() → Mapping[str, type]

Get a read-only mapping of all implemented models for this component.

The mapping is a live view of the registry, so it shows models registered later, but it can not be used to add or remove models.

transfer(lnk)[source]

Transfer function for WDM models.

Parameters:

lnk (array) – The wavenumbers k/h corresponding to power_cdm.

Returns:

transfer – The WDM transfer function at lnk.

Return type:

array_like