punpy.digital_effects_table.measurement_function_utils.MeasurementFunctionUtils

punpy.digital_effects_table.measurement_function_utils.MeasurementFunctionUtils#

class punpy.digital_effects_table.measurement_function_utils.MeasurementFunctionUtils(xvariables, uncxvariables, ydims, str_repeat_dims, str_repeat_noncorr_dims, verbose, templ, use_err_corr_dict, broadcast_correlation, param_fixed)[source]#

Class with utility functions to help in the uncertainty propagation and handling of error correlations

Parameters:
  • xvariables (list(str)) – list of input quantity names, in same order as arguments in measurement function and with same exact names as provided in input datasets.

  • uncxvariables (list(str), optional) – list of input quantity names for which uncertainties should be propagated. Should be a subset of input quantity names. Defaults to None, in which case uncertainties on all input quantities are used.

  • ydims (list(str), optional) – list of dimensions of the measurand, in correct order. list of list of dimensions when there are multiple measurands. Default to None, in which case it is assumed to be the same as refxvar (see below) input quantity.

  • str_repeat_dims (list(str)) – Strings used to select the axis which has repeated measurements. Axis can be specified using the name(s) of the dimension.

  • str_repeat_noncorr_dims (list(str)) – list of dimension names to be used as repeated dims

  • verbose (bool) – boolean to set verbosity

  • templ (punpy.digital_effects_table_template) – templater object

  • use_err_corr_dict (bool, optional) – when possible, use dictionaries with separate error-correlation info per dimension in order to save memory

  • broadcast_correlation (str) – correlation form (“rand” or “syst” to use when broadcasting

  • param_fixed (list of bools, optional) – set to true or false to indicate for each input quantity whether it has to remain unmodified either when expand=true or when using repeated measurements, defaults to None (no inputs fixed).

__init__(xvariables, uncxvariables, ydims, str_repeat_dims, str_repeat_noncorr_dims, verbose, templ, use_err_corr_dict, broadcast_correlation, param_fixed)[source]#

Methods

__init__(xvariables, uncxvariables, ydims, ...)

calculate_corr(form, ds, var)

Function to extract error-correlation matrices of given form on given variable from the given datasets and return as array.

calculate_corr_missingdim(form, ds, var[, ...])

Function to extract error-correlation matrices of given form on given variable from the given datasets when there are missing dimensions.

calculate_unc(form, ds, var)

Function to extract uncertainties of given form on given variable from the given datasets and return as array.

calculate_unc_missingdim(form, ds, var[, ...])

Function to extract uncertainties of given form on given variable from the given datasets when there are missing dimensions.

find_comps(form, dataset, var[, ...])

Function to find the components corresponding to provided uncertainty form (name or type).

get_input_corr(form, *args[, ydims, ...])

Function to extract error-correlation matrices for the input quantities from datasets and return as list of arrays.

get_input_qty(*args[, ydims, sizes_dict, expand])

Function to extract input quantities from datasets and return as list of arrays.

get_input_unc(form, *args[, ydims, ...])

Function to extract uncertainties on the input quantities from datasets and return as list of arrays.