Utilities
- Synopsis:
Compilation of some useful classes and functions for use in SOLikeT.
- class soliket.utils.OneWithCls(info: Mapping[str, Any] = mappingproxy({}), name: str | None = None, timing: bool | None = None, packages_path: str | None = None, initialize=True, standalone=True)[source]
Bases:
oneExtension of cobaya.likelihoods.one which creates a dummy \(C_\ell\) requirements dictionary with an \(\ell_{\rm max}\) of 1000 to force computation of
pp,tt,te,eeandbb\(C_\ell\) s.- get_requirements()[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)
- soliket.utils.binner(ell: ndarray, cl_values: ndarray, bin_edges: ndarray) tuple[ndarray, ndarray][source]
Simple function intended for binning \(\ell\)-by-\(\ell\) data into band powers with a top hat window function.
Note that the centers are computed as \(0.5({\rm LHE}+{\rm RHE})\), where \({\rm LHE}\) and \({\rm RHE}\) are the bin edges. While this is ok for plotting purposes, the user may need to recompute the bin center in case of integer
ellif the correct baricenter is needed.- Parameters:
ell – Axis along which to bin
cl_values – Values to be binned
bin_edges – The edges of the bins. Note that all but the last bin are open to the right. The last bin is closed.
- Returns:
The centers of the bins and the average of
cl_valueswithin the bins.