Transfer

class hmf.density_field.transfer.Transfer(*args, **kwargs)[source]

A transfer function framework.

The purpose of this hmf._frameworks.Framework is to calculate transfer functions, power spectra and several tightly associated quantities given a basic model for the transfer function.

As in all frameworks, to update parameters optimally, use the update() method. All output quantities are calculated only when needed (but stored after first calculation for quick access).

In addition to the parameters directly passed to this class, others are available which are passed on to its superclass. To read a standard documented list of (all) parameters, use Transfer.parameter_info(). If you want to just see the plain list of available parameters, use Transfer.get_all_parameters().To see the actual defaults for each parameter, use Transfer.get_all_parameter_defaults().

By default, the growth_model is GrowthFactor. However, if using a wCDM cosmology and camb is installed, it will default to CambGrowth.

Attributes

Methods

__init__(sigma_8=0.8159, n=0.9667, z=0.0, lnk_min=np.float64(-18.420680743952367), lnk_max=np.float64(9.903487552536127), dlnk=0.05, transfer_model=<class 'hmf.density_field.transfer_models.CAMB'>, transfer_params=None, takahashi=True, growth_model=None, growth_params=None, use_splined_growth=False, **kwargs)[source]
clone(**kwargs)

Create and return an updated clone of the current object.

classmethod get_all_parameter_defaults(recursive=True)

Dictionary of all parameters and defaults.

classmethod get_all_parameter_names()

Yield all parameter names in the class.

get_dependencies(*q)

Determine all parameter dependencies of the quantities in q.

Parameters:

q (str) – String(s) labelling a quantity

Returns:

deps – A set containing all parameters on which quantities in q are dependent.

Return type:

set

classmethod parameter_info(names=None)

Prints information about each parameter in the class.

Optionally, restrict printed parameters to those found in the list of names provided.

classmethod quantities_available()

Obtain a list of all available output quantities.

update(**kwargs)

Update parameters of the framework with kwargs.

validate()[source]

Perform validation of the input parameters as they relate to each other.