punpy.mc.mc_propagation.MCPropagation.run_samples

punpy.mc.mc_propagation.MCPropagation.run_samples#

MCPropagation.run_samples(func, MC_x, output_vars=1, start=None, end=None, sli=None, allow_some_nans=True)[source]#

process all the MC samples of input quantities through the measurand function

Parameters:
  • func (function) – measurement function

  • MC_x (array[array]) – MC-generated samples of input quantities

  • output_vars (integer, optional) – number of output parameters in the measurement function. Defaults to 1.

  • start (integer, optional) – set this parameter to propagate the input quantities through the measurement function starting from a specfic index. All input quantities before this index are ignored. Defaults to None, in which case no input quantities are ignored.

  • end (integer, optional) – set this parameter to propagate the input quantities through the measurement function up until a specfic index. All input quantities after this index are ignored. Defaults to None, in which case no input quantities are ignored.

  • sli (slice, optional) – set this parameter to a slice to set which input quantities will be processed through the measurment function. All other input quantities are ignored. Can only be used if start and end are not set. Defaults to None, in which case no input quantities are ignored.

  • allow_some_nans (bool, optional) – set to False to ignore any MC sample which has any nan’s in the measurand. Defaults to True, in which case only MC samples with only nan’s are ignored.

Returns:

MC sample of measurand

Return type:

array[array]