Core Cosmology Library (CCL) Calculator

Class Methods

class soliket.CCL(info: Mapping[str, Any] = mappingproxy({}), name: str | None = None, timing: bool | None = None, packages_path: str | None = None, initialize=True, standalone=True)[source]

A theory code wrapper for CCL.

calculate(state: dict, want_derived: bool = True, **params_values_dict)[source]

Do the actual calculation and store results in state dict

Parameters:
  • state – dictionary to store results

  • want_derived – whether to set state[‘derived’] derived parameters

  • params_values_dict – parameter values

Returns:

None or True if success, False for fail

get_can_support_params() Sequence[str][source]

Get a list of parameters supported by this component, can be used to support parameters that don’t explicitly appear in the .yaml or class params attribute or are otherwise explicitly supported (e.g. via requirements)

Returns:

iterable of names of parameters

get_requirements() set[source]

Get a dictionary of requirements (or a list of requirement name, option tuples) that are always needed (e.g. must be calculated by another component or provided as input parameters).

Returns:

dictionary or list of tuples of requirement names and options (or iterable of requirement names if no optional parameters are needed)

must_provide(**requirements) dict[source]

Function called by Cobaya with the actual products that this component needs to compute (i.e. the things this component can provide that are actually used by other components). The function can return conditional requirements that this component needs from other components in order to compute those things.

The requirements argument is a requirement name with any optional parameters. This function may be called more than once with different requirements.

Returns:

optional dictionary (or list of requirement name, option tuples) of conditional requirements for the ones requested.