punpy.mc.mc_propagation.MCPropagation.process_samples#
- MCPropagation.process_samples(MC_x, MC_y, return_corr=False, return_samples=False, yshapes=None, corr_dims=-99, separate_corr_dims=False, fixed_corr=None, PD_corr=True, output_vars=1)[source]#
Run the MC-generated samples of input quantities through the measurement function and calculate correlation matrix if required.
- Parameters:
MC_x (array[array]) – MC-generated samples of input quantities
MC_y (array[array]) – MC sample of measurand
return_corr (bool) – set to True to return correlation matrix of measurand
return_samples (bool) – set to True to return generated samples
corr_dims (integer, optional) – set to positive integer to select the axis used in the correlation matrix. The correlation matrix will then be averaged over other dimensions. Defaults to -99, for which the input array will be flattened and the full correlation matrix calculated. When the combined correlation of 2 or more (but not all) dimensions is required, they can be provided as a string containing the different dimension integers, separated by a dot (e.g. “0.2”). When multiple error_correlations should be calculated, they can be provided as a list.
separate_corr_dims (bool, optional) – When set to True and output_vars>1, corr_dims should be a list providing the corr_dims for each output variable, each following the format defined in the corr_dims description. Defaults to False
fixed_corr (array) – correlation matrix to be copied without changing, defaults to None (correlation matrix is calculated rather than copied)
PD_corr (bool, optional) – set to True to make sure returned correlation matrices are positive semi-definite, default to True
output_vars (integer, optional) – number of output parameters in the measurement function. Defaults to 1.
- Returns:
uncertainties on measurand
- Return type:
array