FromFile

class hmf.density_field.transfer_models.FromFile(cosmo, **model_parameters)[source]

Import a transfer function from file.

Note

The file should be in the same format as output from CAMB, or else in two-column ASCII format (k,T).

Parameters:
  • cosmo (astropy.cosmology.FLRW instance) – The cosmology used in the calculation

  • **model_parameters (unpack-dict) –

    Parameters specific to this model. In this case, available parameters are the following. To see their default values, check the _defaults class attribute.

    fname:

    str Location of the file to import.

Methods

__init__(cosmo, **model_parameters)
classmethod get_models() dict[str, type]

Get a dictionary of all implemented models for this component.

lnt(lnk)[source]

Natural log of the transfer function.

Parameters:

lnk (array_like) – Wavenumbers [Mpc/h]

Returns:

lnt – The log of the transfer function at lnk.

Return type:

array_like