API reference#

This page provides an auto-generated summary of punpy’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

MCPropagation#

mc.mc_propagation.MCPropagation(steps[, ...])

Class to propagate uncertainties using Monte Carlo (MC)

mc.mc_propagation.MCPropagation.propagate_standard(...)

Propagate uncertainties through measurement function with n input quantities.

mc.mc_propagation.MCPropagation.propagate_random(...)

Propagate random uncertainties through measurement function with n input quantities.

mc.mc_propagation.MCPropagation.propagate_systematic(...)

Propagate systematic uncertainties through measurement function with n input quantities.

mc.mc_propagation.MCPropagation.propagate_cov(...)

Propagate uncertainties with given covariance matrix through measurement function with n input quantities.

mc.mc_propagation.MCPropagation.generate_MC_sample(x, ...)

function to generate MC sample for input quantities

mc.mc_propagation.MCPropagation.generate_MC_sample_cov(x, ...)

function to generate MC sample for input quantities from covariance matrix

mc.mc_propagation.MCPropagation.propagate_cov_flattened(...)

Propagate uncertainties with given covariance matrix through measurement function with n input quantities.

mc.mc_propagation.MCPropagation.run_samples(...)

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

mc.mc_propagation.MCPropagation.combine_samples(...)

Function to combine MC samples from individual runs

mc.mc_propagation.MCPropagation.process_samples(...)

Run the MC-generated samples of input quantities through the measurement function and calculate correlation matrix if required.

LPUPropagation#

lpu.lpu_propagation.LPUPropagation([...])

Class to propagate uncertainties using the Law of Propagation of Uncertainty

lpu.lpu_propagation.LPUPropagation.propagate_standard(...)

Propagate uncertainties through measurement function with n input quantities.

lpu.lpu_propagation.LPUPropagation.propagate_random(...)

Propagate random uncertainties through measurement function with n input quantities.

lpu.lpu_propagation.LPUPropagation.propagate_systematic(...)

Propagate systematic uncertainties through measurement function with n input quantities.

lpu.lpu_propagation.LPUPropagation.propagate_cov(...)

Propagate uncertainties with given covariance matrix through measurement function with n input quantities.

lpu.lpu_propagation.LPUPropagation.propagate_flattened_cov(...)

Propagate uncertainties with given covariance matrix through measurement function with n input quantities.

lpu.lpu_propagation.LPUPropagation.process_jacobian(J, ...)

Digital Effects Tables#

digital_effects_table.measurement_function.MeasurementFunction([...])

MeasurementFunction class which provides all the functionality for propagating uncertainties using obsarray digital effects tables.

digital_effects_table.measurement_function.MeasurementFunction.meas_function(...)

meas_function is the measurement function itself, to be used in the uncertainty propagation.

digital_effects_table.measurement_function.MeasurementFunction.get_argument_names()

This function allows to return the names of the input quantities as a list of strings.

digital_effects_table.measurement_function.MeasurementFunction.get_measurand_name_and_unit()

This function allows to return the name and unit of the measurand as strings.

digital_effects_table.measurement_function.MeasurementFunction.update_measurand(...)

digital_effects_table.measurement_function.MeasurementFunction.setup(...)

This function is to provide a setup stage that can be run before propagating uncertainties.

digital_effects_table.measurement_function.MeasurementFunction.propagate_ds(*args)

Function to propagate the uncertainties on the input quantities present in the digital effects tables provided as the input arguments, through the measurement function to produce an output digital effects table with the combined random, systematic and structured uncertainties on the measurand

digital_effects_table.measurement_function.MeasurementFunction.propagate_ds_total(*args)

Function to propagate the total uncertainties present in the digital effects tables in the input arguments, through the measurement function to produce an output digital effects table with the total uncertainties on the measurand

digital_effects_table.measurement_function.MeasurementFunction.propagate_ds_specific(...)

Function to propagate the uncertainties on the input quantities present in the digital effects tables provided as the input arguments, through the measurement function to produce an output digital effects table with the uncertainties of specific components listed in comp_list.

digital_effects_table.measurement_function.MeasurementFunction.propagate_ds_all(*args)

Function to propagate the uncertainties on the input quantities present in the digital effects tables provided as the input arguments, through the measurement function to produce an output digital effects table with the combined random, systematic and structured uncertainties on the measurand

digital_effects_table.measurement_function.MeasurementFunction.run(*args)

Function to calculate the measurand by running input quantities through measurement function.

digital_effects_table.measurement_function.MeasurementFunction.propagate_total(*args)

Function to propagate uncertainties for the total uncertainty component.

digital_effects_table.measurement_function.MeasurementFunction.propagate_random(*args)

Function to propagate uncertainties for the random uncertainty component.

digital_effects_table.measurement_function.MeasurementFunction.propagate_systematic(*args)

Function to propagate uncertainties for the systemtic uncertainty component.

digital_effects_table.measurement_function.MeasurementFunction.propagate_structured(*args)

Function to propagate uncertainties for the structured uncertainty component.

digital_effects_table.measurement_function.MeasurementFunction.propagate_specific(...)

Function to propagate uncertainties for a specific uncertainty component.

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.find_comps(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.get_input_qty(*args)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.get_input_unc(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.calculate_unc(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.calculate_unc_missingdim(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.get_input_corr(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.calculate_corr(...)

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

digital_effects_table.measurement_function_utils.MeasurementFunctionUtils.calculate_corr_missingdim(...)

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

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates(...)

DigitalEffectsTableTemplates class allows to make templates for digital effects table creation for measurand

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates.make_template_main(...)

Make the digital effects table template for the case where random, systematic and structured uncertainties are propagated seperately

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates.make_template_tot(...)

Make the digital effects table template for the case where uncertainties are combined and only the total uncertainty is returned.

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates.make_template_specific(...)

Make the digital effects table template for the case where uncertainties are combined and only the total uncertainty is returned.

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates.remove_unc_component(ds, ...)

Function to remove an uncertainty component from a dataset

digital_effects_table.digital_effects_table_templates.DigitalEffectsTableTemplates.join_with_preexisting_ds(ds, ...)

Function to combine digital effects table, with previously populated dataset.