comet_maths.generate_sample.generate_sample.generate_sample_cov

comet_maths.generate_sample.generate_sample.generate_sample_cov#

comet_maths.generate_sample.generate_sample.generate_sample_cov(MCsteps, param, cov_param, diff=0.05, dtype=None, pdf_shape='gaussian', pdf_params=None)[source]#

Generate correlated MC sample of input quantity with a given covariance matrix. sample are generated independent and then correlated using Cholesky decomposition.

Parameters:
  • MCsteps (int) – number of MC steps

  • param (array) – values of input quantity (mean of distribution)

  • cov_param (array) – covariance matrix for input quantity

  • diff (float, optional) – maximum difference that the error correlation matrix is allowed to be changed by to make it positive definite. Defaults to 0.001

  • 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)

Returns:

generated sample

Return type:

array