firecrown.utils

firecrown.utils#

Some utility functions for patterns common in Firecrown.

Functions

base_model_from_yaml

Create a base model from a yaml string.

base_model_to_yaml

Convert a base model to a yaml string.

cached_angular_cl

Wrapper for pyccl.angular_cl, with automatic caching.

compare_optional_arrays

Compare two arrays, allowing for either or both to be None.

compare_optionals

Compare two objects, allowing for either or both to be None.

make_log_interpolator

Return a function object that does 1D spline interpolation.

save_to_sacc

Save a data vector into a (new) SACC object, copied from sacc_data.

upper_triangle_indices

Returns the upper triangular indices for an (n x n) matrix.

Classes

YAMLSerializable

Protocol for classes that can be serialized to and from YAML.