tools for dealing with measured quantities: uncertainty propagation and unit conversion
Project description
MetroloPy
tools for dealing with physical quantities: uncertainty propagation and unit conversion
MetroloPy is a pure python package and requires Python 3 and the SciPy stack (NumPy, SciPy, Pandas, and IPython). It looks best in a Jupyter Notebook.
Install MetroloPy with conda or pip:
$ pip install metrolopy
Physical quantities can then be represented in Python as gummy
objects with an uncertainty and (or) a unit:
>>> import metrolopy as uc
>>> a = uc.gummy(1.2345,u=0.0234,unit='cm')
>>> a
1.234(23) cm
>>> b = uc.gummy(3.034,u=0.174,unit='mm')
>>> f = uc.gummy(uc.UniformDist(center=0.9345,half_width=0.096),unit='N')
>>> p = f/(a*b)
>>> p
2.50(21) N/cm2
>>> p.unit = 'kPa'
>>> p.uunit = '%'
>>> p
25.0 kPa ± 8.5%
MetroloPy can do much more including Monte-Carlo uncertainty propagation, generating uncertainty budget tables, and curve fitting. It can also handle expanded uncertainties, degrees of freedom, correlated quantities, and complex valued quantities. See:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for metrolopy-0.5.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89a2b367961aea7e44f9b1a63a0d68f57a8a52426f7d7bd1ad46f9fe5033a891 |
|
MD5 | e91aa0861c022a219eeb37729b50831c |
|
BLAKE2b-256 | fa1061500c54f2f9e770fd217ce4729c30e558d5eafaf1a69e61dda4cca4b7c6 |