.. metrolopy documentation master file, created by
sphinx-quickstart on Fri Feb 22 16:15:02 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. toctree::
:maxdepth: 2
:caption: Contents:
===================
MetroloPy, the docs
===================
tools for dealing with physical quantities: uncertainty propagation and unit
conversion
getting started
===============
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 ``pip install metrolopy`` or
``conda install -c conda-forge metrolopy``.
Physical quantities can then be represented in Python as `gummy`_ objects
with an uncertainty and (or) a unit:
.. _gummy: hand_made_doc.html#class-gummy
.. raw:: html
>>> 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`_.
.. _Monte-Carlo uncertainty propagation: _static/tutorial.html#Monte-Carlo-uncertainty-propagation
.. _uncertainty budget tables: _static/tutorial.html#an-uncertainty-budget
.. _curve fitting: _static/tutorial.html#curve-fitting
.. _expanded uncertainties: _static/tutorial.html#expanded-uncertainty
.. _degrees of freedom: _static/tutorial.html#degrees-of-freedom-and-uncertainty-types
.. _correlated quantities: _static/tutorial.html#creating-correlated-gummys
.. _complex valued quantities: hand_made_doc.html#jummy
further reading
===============
* `a tutorial <_static/tutorial.html>`_ (or :download:`download the tutorial as a Jupyter notebook `)
* :ref:`the API documentation ` (see the auto-generated docs below for an alternative set of documentation)
* `a list of the measurement units built into MetroloPy <_static/units.html>`_
* `a list of the physical constants built into MetroloPy `_
* :ref:`package development and to do `
* `the issues page on GitHub `_
* `the source code on GitHub `_
the auto-generated docs (indices and tables)
============================================
These pages were automatically generated from the doc strings in the source
code. They are slightly more comprehensive but perhaps slightly more confusing
than the handmade API docs referenced in the further reading section above.
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Where did the name for the gummy class come from?
=================================================
The name comes from the
`JGCM/ISO Guide to the Expression of Uncertainty in Measurement `_
which is also known as the GUM. The GUM is the international standard used by
metrology institutes and calibration labs for expressing and propagating
measurement uncertainty. The gummy object implements many of the
recommendations outlined in the GUM.
Other references of note are the
`draft 9th edition of the SI Brochure `_
which contains the definitions of the SI units, and
`NIST Special Publication 1038 `_
where many of the US customary units are defined. Some physical constants
used for unit definitions are from the
`2014 CODATA recommended values `_
and the
`IAU 2009 system of astronomical constants `_.
version history
===============
* Version 0.5.0, built 26 March 2019, is the first public release.
* Version 0.5.1, built 2 April 2019, fixed a major bug that generated negative
uncertainties in some cases and fixed some other minor bugs. Improved support
for fraction.Fraction and mpmath.mpf values.
* Version 0.5.2, built 5 April 2019, fixed a major bug that propagated
uncertainty incorrectly if a gummy was created with an uncertainty set with
an integer data type. Fixed several other minor bugs.
* Version 0.5.3, built 10 April 2019, minor bug fixes.
* Version 0.5.4, built 15 April 2019, minor bug fixes.
* Version 0.5.5, built 7 May 2020, minor bug fixes.
* Version 0.5.6, built 24 September 2020, minor bug fixes.
* Version 0.5.7, built 26 September 2020, minor change to setup.py.
* Verison 0.6.0, built 19 October 2020, added the `Quantity` and `immy` classes
as well as a library of physical constants.
* Version 0.6.1 built 19 October 2020, bug fixes
* Version 0.6.2 built 10 July 2021, bug fixes
* Version 0.6.3 built 13 May 2022, bug fixes
author
======
Harold Parks, parksh@nrc.ca, National Research Council Canada
license
=======
MetroloPy is distributed as free software under the terms of the
`GNU General Public License version 3 `_.
In practice, this license imposes
no restriction on using MetroloPy. However, if you want to further convey
verbatim or modified versions of the code you must do so under the same license
terms. Please contact NRC if you wish to license MetroloPy under different
terms.