curepy.container.ancillary_parameter module#

Container for ancillary parameter information

class curepy.container.ancillary_parameter.AncillaryParameter(b: list | None = None, u_b: list | None = None, corr_b: list | None = None, corr_between_b: ndarray | None = None, b_samples: ndarray | None = None, b_MC_steps: int | None = None)[source]#

Bases: object

calculate_b_cov() ndarray | None[source]#

Calculate the full covariance matrix for all ancillary parameters.

Constructs per-parameter correlation matrices, flattens and combines them with corr_between_b (if set) using comet_maths.calculate_flattened_corr. Returns None if insufficient data is available and emits a warning.

Returns:

Combined covariance matrix for all ancillary parameters, or None if it cannot be computed.

generate_b_samples()[source]#

Generate Monte Carlo samples for the ancillary parameters.

Uses punpy.MCPropagation to draw samples from the joint distribution defined by b, u_b, corr_b, and corr_between_b. If b is None the resulting b_samples attribute is set to None. If b_samples has already been provided it is left unchanged.