firecrown.connector.cobaya.likelihood
Cobaya Likelihood Connector.
Module for providing a likelihood for use in Cobaya.
This module provides the class LikelihoodConnector, which is an implementation
of a Cobaya likelihood.
Classes
A class implementing cobaya.likelihood.Likelihood. |
Functions
|
Creates a dictionary of pyccl arguments. |
Module Contents
- firecrown.connector.cobaya.likelihood.compute_pyccl_args_options(ccl_cosmo)[source]
Creates a dictionary of pyccl arguments.
This method uses the CCLFactory to create a pyccl object and returns the dictionary of precision options for the pyccl object.
- Parameters:
ccl_cosmo (pyccl.Cosmology)
- Return type:
tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], float]
- class firecrown.connector.cobaya.likelihood.LikelihoodConnector(info=empty_dict, name=None, timing=None, packages_path=None, initialize=True, standalone=True)[source]
Bases:
cobaya.likelihood.Likelihood
A class implementing cobaya.likelihood.Likelihood.
- Parameters:
info (cobaya.typing.LikeDictIn)
name (Optional[str])
timing (Optional[bool])
packages_path (Optional[str])
- known_options = ['firecrownIni', 'input_style', 'build_parameters', 'derived_parameters']
- input_style: str | None = None
- likelihood: firecrown.likelihood.likelihood.Likelihood
- firecrownIni: str = ''
- derived_parameters: list[str] = []
- build_parameters: firecrown.likelihood.likelihood.NamedParameters
- initialize_with_params()[source]
Complete the initialization of a LikelihoodConnector object.
Required by Cobaya.
This version has nothing to do.
- Return type:
None
- initialize_with_provider(provider)[source]
Set the object’s provider.
Required by Cobaya.
- Parameters:
provider – A Cobaya provider.
- Return type:
None
- get_can_provide_params()[source]
Return the list of params provided.
Required by Cobaya.
Returns an empty list.
- Return type:
list[str]
- get_can_support_params()[source]
Return a list containing the names of the mapping’s parameter names.
Required by Cobaya. :return: The list of parameter names.
- Return type:
list[str]
- get_allow_agnostic()[source]
Is it allowed to pass all unassigned input parameters to this component.
Required by Cobaya.
Return False.
- Return type:
bool
- get_requirements()[source]
Returns a dictionary.
Returns a dictionary with keys corresponding the contained likelihood’s required parameter the values give the required options.
Required by Cobaya. :return: a dictionary
- Return type:
dict[str, None | dict[str, numpy.typing.NDArray[numpy.float64]] | dict[str, object]]
- must_provide(**requirements)[source]
Required by Cobaya.
This version does nothing.
- Return type:
None
- calculate_args(params_values)[source]
Calculate the curr ent cosmology, and set state[“pyccl”] to the result.
- Parameters:
state – The state dictionary to update.
params_values (firecrown.parameters.ParamsMap) – The values of the parameters to use.
- Return type:
tuple[firecrown.ccl_factory.CCLCalculatorArgs, dict[str, float]]