Skip to main content

Uncertainty propagation of intercorrelated multidimensional quantities

Project description

Measurements are precise only up to a particular uncertainty. Such measurement results are thus called uncertain quantities. When performing calculations with uncertain quantities, the uncertainties of the results depend on the uncertainties of the operands involved. The quantification of uncertainties resulting from a mathematical operation involving uncertain operands is called uncertainty propagation.

From a programmer’s point of view, uncertainties might be associated with the respective nominal values, such that the propagation of uncertainties happens automatically, and existing algorithms can be re-used with the uncertain quantities as arguments. Here I am proposing a Python package to define uncertain operands, to carry out calculations using such operands with uncertainty propagation, and to provide string representations of uncertain quantities involved.

Complex numbers can be used to define uncertain quantities; for such complex-valued uncertainties no net uncertainty can be calculated.

The objects holding uncertain values have array properties, though scalar arrays can be used; elements of an uncertain array behave as if they were uncertain quantities on their own.

When requesting a string representation of an uncertain quantity, the typeset result depends on the number of standard deviations to use and on the chosen precision, given by the number of digits with respect to the uncertainty. Furthermore, when typesetting multidimensional arrays with uncertainty, the decimal fractions are aligned to improve readability of the results.

upy uses algorithmic differentiation (also known as automatic differentation) to track uncertainties through the operations. Uncertain values might be used in calculations together with other uncertain values as well as with any numeric Python or numpy.ndarray objects. A range of mathematical functions is supported.

upy provides several syntactic conventions appropriate to the subject. For instance, defining uncertain quantities is possible by writing:

uvalue = nominal +- u(uncertainty)

where u is a function provided by upy. Uncertain values constructed in this way will be independent of each other with respect to their uncertainties; upy will keep track of the correlations arising from combination of uncertain quantities in mathematical operations. All functionality is suited both for use in the interactive Python shell as well as in programs for numerical analysis.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upy2-2.3.4.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upy2-2.3.4-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file upy2-2.3.4.tar.gz.

File metadata

  • Download URL: upy2-2.3.4.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for upy2-2.3.4.tar.gz
Algorithm Hash digest
SHA256 25dc0707f66c763f43b479ef2482b737de169a19482f4c6e1fd58aaef982fee0
MD5 129100e79866e7b1bd4947d4664cf73c
BLAKE2b-256 a51edc481cbafcf91e1d148f43be4f67f7e83dce59c57b92aabc1c9e98096940

See more details on using hashes here.

File details

Details for the file upy2-2.3.4-py3-none-any.whl.

File metadata

  • Download URL: upy2-2.3.4-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for upy2-2.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1f23920287b7c956f4b10547c86b2e16342d4ce104abef09b0f0803a702bafe4
MD5 2871ab2a834c14a5e74e79493f0e7d9f
BLAKE2b-256 c4801b960c5600b5555f56e5251bb998474eca88d2549dddc805c51fd382c54c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page