comet_maths.generate_sample.generate_sample.generate_error_sample#
- comet_maths.generate_sample.generate_sample.generate_error_sample(MCsteps, x, u_x, corr_x, i=None, dtype=None, pdf_shape='gaussian', pdf_params=None, comp_list=False)[source]#
Generate the errors of a correlated MC sample of input quantity with given uncertainties and correlation matrix.
- Parameters:
x (list[array]) – list of input quantities (usually numpy arrays)
u_x (list[array]) – list of uncertainties/covariances on input quantities (usually numpy arrays)
corr_x (list[array]) – list of correlation matrices (n,n) along non-repeating axis, or list of correlation matrices for each repeated measurement.
i (int, optional) – index of the input quantity (in x)
dtype (numpy.dtype, optional) – dtype of the produced sample
pdf_shape (str, optional) – string identifier of the probability density function shape, defaults to gaussian
pdf_params (dict, optional) – dictionaries defining optional additional parameters that define the probability density function, Defaults to None (gaussian does not require additional parameters)
comp_list (bool, optional) – boolean to define whether u_x and corr_x are given as a list or individual uncertainty components. Defaults to False, in chich case a single combined uncertainty component is given per input quantity.
- Returns:
generated sample
- Return type:
array