Skip to main content

The GUM Tree Calculator for Python

Project description

Documentation Status github tests pypi zenodo

The GUM Tree Calculator is a Python package for processing data with measurement uncertainty.

Python objects, called uncertain numbers, are used to encapsulate information about measured quantities. Calculations of derived quantities that involve uncertain numbers will propagate this information automatically. So, data processing results are always accompanied by uncertainties.

GTC follows international guidelines on the evaluation of measurement data and measurement uncertainty (the so-called GUM). It has been developed for use in the context of metrology, test and calibration work.

Example: an electrical circuit

Suppose the DC electrical current flowing in a circuit and the voltage across a circuit element have both been measured.

The values obtained were 0.1 V, for the voltage, and 15 mA for the current. These values have the associated standard uncertainties 0.001 V and 0.5 mA, respectively.

Uncertain numbers for voltage and current can be defined using the function ureal()

>>> V = ureal(0.1,1E-3)
>>> I = ureal(15E-3,0.5E-3)

The resistance of the circuit element can then be calculated directly using Ohm’s law

>>> R = V/I
>>> print(R)
6.67(23)

The uncertain number R represents the resistance of the circuit element. The value 6.67 ohm is an estimate (or approximation) of the actual resistance. The standard uncertainty associated with this value, is 0.23 ohm.

Installation

GTC is available as a PyPI package. It can be installed using pip

pip install gtc

Dependencies

Documentation

The documentation for GTC can be found here.

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

GTC-1.4.0.tar.gz (198.3 kB view details)

Uploaded Source

Built Distribution

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

GTC-1.4.0-py2.py3-none-any.whl (106.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file GTC-1.4.0.tar.gz.

File metadata

  • Download URL: GTC-1.4.0.tar.gz
  • Upload date:
  • Size: 198.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.13

File hashes

Hashes for GTC-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fdef7390ba0bb471a4729ae4eb110c6e7f548154c6146632c4a7c4225593f695
MD5 cd8acf3bd086bb9a808439e608b8e9e0
BLAKE2b-256 6f19841e4fad03e81ff04ae1c63d23e4ab0c59920328f4443520847a7aaf0b3e

See more details on using hashes here.

File details

Details for the file GTC-1.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: GTC-1.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 106.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.13

File hashes

Hashes for GTC-1.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7c71da5734057a70c3ab262ef065e3628683860963b8fbe7ae865caae08f9343
MD5 eb2da5bdfbff776db8a69637c11876b6
BLAKE2b-256 b52c518791fc8b3683a66315ecebd75f7f516ac67920689819e8c2cc4510ff47

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