Skip to content

Commit

Permalink
Merge pull request #6 from nrc-cnrc/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
hvparks authored Apr 6, 2019
2 parents 2be1427 + b02a8e8 commit 009e90e
Show file tree
Hide file tree
Showing 28 changed files with 366 additions and 283 deletions.
Binary file removed dist/metrolopy-0.5.1.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/metrolopy-0.5.2.tar.gz
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/hand_made_doc.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/metrolopy.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/metrolopy.tests.doctree
Binary file not shown.
35 changes: 17 additions & 18 deletions docs/_build/html/_sources/hand_made_doc.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class gummy
===========

class metrolopy.\ **gummy(x, u=0, unit=one, dof=float('inf'), k=1, p=None,
p_method=None, uunit=None, utype=None, name=None)**
uunit=None, utype=None, name=None)**

A gummy object represents a numerical value with an uncertainty and (or)
a unit. They can be used in place of float values in Python expressions
Expand Down Expand Up @@ -97,21 +97,6 @@ gummy parameters
0.22
>>> g.u
0.11224696052342387

.. _p_method:

- **p_method**: ({'loc', 'cp', 'gauss',
'ccp', 'chebyshev', None}) If the *p* parameter is
specified, *p_method* sets the method that is used to calculate the
coverage factor. If p_method is omitted or set to 'loc', then the
uncertainty is assumed to be represented by a normal probability
distribution if *dof* = float('inf') and shifted and scaled Student's
t distribution otherwise. If *p_method* = 'gauss' or 'cp' then the
Guass inequality is used, and if *p_method* = 'chebyshev' or 'ccp'
then the Chebyshev inequality is used. For *p* = 0.95 and *dof* =
float('inf'), *p_method* = 'loc' gives *k* = 2.0, while *p_method*
= 'gauss' gives *k* = 3.0 and *p_method* = 'chebyshev' gives *k* =
4.5.
.. _parameter-uunit:

Expand Down Expand Up @@ -196,9 +181,20 @@ basic gummy properties
the relation between the value of this property and the property *k*
is defined by the *p_method* property

.. _property-p-method:
.. _p_method:

- **p_method**: see the p_method_ parameter
- **p_method**: ({'loc', 'cp', 'gauss',
'ccp', 'chebyshev', None}) If the *p* parameter is
specified, *p_method* sets the method that is used to calculate the
coverage factor. If p_method is omitted or set to 'loc', then the
uncertainty is assumed to be represented by a normal probability
distribution if *dof* = float('inf') and shifted and scaled Student's
t distribution otherwise. If *p_method* = 'gauss' or 'cp' then the
Guass inequality is used, and if *p_method* = 'chebyshev' or 'ccp'
then the Chebyshev inequality is used. For *p* = 0.95 and *dof* =
float('inf'), *p_method* = 'loc' gives *k* = 2.0, while *p_method*
= 'gauss' gives *k* = 3.0 and *p_method* = 'chebyshev' gives *k* =
4.5. This property may only be set at the class level.

.. _name:

Expand Down Expand Up @@ -270,6 +266,9 @@ basic gummy properties
can give some idea of the magnitude of the floating point errors, but is
not a substitute for a full numerical error analysis. The default value
is ``False``.

- **cmp_k**, **cmp_p**: k or p values for comparisons, e.g. a > b is True
if c.x > k*c.u where c = b - a. Set only at the class level.

basic gummy methods
-------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ version history
* 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.


author
Expand Down
24 changes: 13 additions & 11 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Index &#8212; metrolopy 0.5.1 documentation</title>
<title>Index &#8212; metrolopy 0.5.2 documentation</title>

<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.5.1',
VERSION: '0.5.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -39,7 +39,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -913,12 +913,8 @@ <h2 id="P">P</h2>
<li><a href="metrolopy.html#metrolopy.fit.SinFit.p0">(metrolopy.fit.SinFit attribute)</a>
</li>
</ul></li>
<li><a href="metrolopy.html#metrolopy.gummy.gummy.p_method">p_method (metrolopy.gummy.gummy attribute)</a>

<ul>
<li><a href="metrolopy.html#metrolopy.gummy.MetaGummy.p_method">(metrolopy.gummy.MetaGummy attribute)</a>
<li><a href="metrolopy.html#metrolopy.gummy.MetaGummy.p_method">p_method (metrolopy.gummy.MetaGummy attribute)</a>
</li>
</ul></li>
<li><a href="metrolopy.html#metrolopy.fit.DoubleExpFit.pf">pf (metrolopy.fit.DoubleExpFit attribute)</a>

<ul>
Expand Down Expand Up @@ -1194,6 +1190,8 @@ <h2 id="T">T</h2>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_abs">test_abs() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_add">test_add() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_addxmul">test_addxmul() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_ap1sincos">test_ap1sincos() (in module metrolopy.tests.test_create)</a>
</li>
Expand All @@ -1208,6 +1206,10 @@ <h2 id="T">T</h2>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_mod">test_mod() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_mul">test_mul() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_mulxnpow">test_mulxnpow() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_mulxpow">test_mulxpow() (in module metrolopy.tests.test_create)</a>
</li>
<li><a href="metrolopy.tests.html#metrolopy.tests.test_create.test_neg">test_neg() (in module metrolopy.tests.test_create)</a>
</li>
Expand All @@ -1225,14 +1227,14 @@ <h2 id="T">T</h2>
</li>
<li><a href="metrolopy.html#metrolopy.ummy.ummy.thousand_spaces">thousand_spaces (metrolopy.ummy.ummy attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="metrolopy.html#metrolopy.nonlinearunit.ReciprocalConversion.to">to() (metrolopy.nonlinearunit.ReciprocalConversion method)</a>

<ul>
<li><a href="metrolopy.html#metrolopy.unit.Conversion.to">(metrolopy.unit.Conversion method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="metrolopy.html#metrolopy.nonlinearunit.NonlinearUnit.to_uunit">to_uunit() (metrolopy.nonlinearunit.NonlinearUnit method)</a>
</li>
<li><a href="metrolopy.html#metrolopy.fit.Fit.toascii">toascii() (metrolopy.fit.Fit method)</a>
Expand Down Expand Up @@ -1619,7 +1621,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
42 changes: 21 additions & 21 deletions docs/_build/html/hand_made_doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>MetroloPy &#8212; metrolopy 0.5.1 documentation</title>
<title>MetroloPy &#8212; metrolopy 0.5.2 documentation</title>

<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.5.1',
VERSION: '0.5.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -38,7 +38,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>

Expand All @@ -55,7 +55,7 @@ <h3>Navigation</h3>
<div class="section" id="class-gummy">
<span id="gummy"></span><h1>class gummy<a class="headerlink" href="#class-gummy" title="Permalink to this headline"></a></h1>
<p>class metrolopy.<strong>gummy(x, u=0, unit=one, dof=float(&#8216;inf&#8217;), k=1, p=None,
p_method=None, uunit=None, utype=None, name=None)</strong></p>
uunit=None, utype=None, name=None)</strong></p>
<p>A gummy object represents a numerical value with an uncertainty and (or)
a unit. They can be used in place of float values in Python expressions
and the uncertainty can be propagated with with both first-order and
Expand Down Expand Up @@ -142,20 +142,6 @@ <h2>gummy parameters<a class="headerlink" href="#gummy-parameters" title="Permal
</div>
</li>
</ul>
<ul class="simple" id="p-method">
<li><strong>p_method</strong>: ({&#8216;loc&#8217;, &#8216;cp&#8217;, &#8216;gauss&#8217;,
&#8216;ccp&#8217;, &#8216;chebyshev&#8217;, None}) If the <em>p</em> parameter is
specified, <em>p_method</em> sets the method that is used to calculate the
coverage factor. If p_method is omitted or set to &#8216;loc&#8217;, then the
uncertainty is assumed to be represented by a normal probability
distribution if <em>dof</em> = float(&#8216;inf&#8217;) and shifted and scaled Student&#8217;s
t distribution otherwise. If <em>p_method</em> = &#8216;gauss&#8217; or &#8216;cp&#8217; then the
Guass inequality is used, and if <em>p_method</em> = &#8216;chebyshev&#8217; or &#8216;ccp&#8217;
then the Chebyshev inequality is used. For <em>p</em> = 0.95 and <em>dof</em> =
float(&#8216;inf&#8217;), <em>p_method</em> = &#8216;loc&#8217; gives <em>k</em> = 2.0, while <em>p_method</em>
= &#8216;gauss&#8217; gives <em>k</em> = 3.0 and <em>p_method</em> = &#8216;chebyshev&#8217; gives <em>k</em> =
4.5.</li>
</ul>
<ul class="simple" id="parameter-uunit">
<li><strong>uunit</strong>: (str or <a class="reference internal" href="#class-unit"><span class="std std-ref">Unit</span></a> ) This represents the units of
<em>u</em>. It may be a unit with the same dimension as the <em>unit</em>
Expand Down Expand Up @@ -228,8 +214,19 @@ <h2>basic gummy properties<a class="headerlink" href="#basic-gummy-properties" t
the relation between the value of this property and the property <em>k</em>
is defined by the <em>p_method</em> property</li>
</ul>
<ul class="simple" id="property-p-method">
<li><strong>p_method</strong>: see the <a class="reference internal" href="#p-method">p_method</a> parameter</li>
<ul class="simple" id="p-method">
<li><strong>p_method</strong>: ({&#8216;loc&#8217;, &#8216;cp&#8217;, &#8216;gauss&#8217;,
&#8216;ccp&#8217;, &#8216;chebyshev&#8217;, None}) If the <em>p</em> parameter is
specified, <em>p_method</em> sets the method that is used to calculate the
coverage factor. If p_method is omitted or set to &#8216;loc&#8217;, then the
uncertainty is assumed to be represented by a normal probability
distribution if <em>dof</em> = float(&#8216;inf&#8217;) and shifted and scaled Student&#8217;s
t distribution otherwise. If <em>p_method</em> = &#8216;gauss&#8217; or &#8216;cp&#8217; then the
Guass inequality is used, and if <em>p_method</em> = &#8216;chebyshev&#8217; or &#8216;ccp&#8217;
then the Chebyshev inequality is used. For <em>p</em> = 0.95 and <em>dof</em> =
float(&#8216;inf&#8217;), <em>p_method</em> = &#8216;loc&#8217; gives <em>k</em> = 2.0, while <em>p_method</em>
= &#8216;gauss&#8217; gives <em>k</em> = 3.0 and <em>p_method</em> = &#8216;chebyshev&#8217; gives <em>k</em> =
4.5. This property may only be set at the class level.</li>
</ul>
<ul id="name">
<li><p class="first"><strong>name</strong>: An arbitrary string naming the gummy. The name is used when
Expand Down Expand Up @@ -302,6 +299,9 @@ <h2>basic gummy properties<a class="headerlink" href="#basic-gummy-properties" t
not a substitute for a full numerical error analysis. The default value
is <code class="docutils literal"><span class="pre">False</span></code>.</p>
</li>
<li><p class="first"><strong>cmp_k</strong>, <strong>cmp_p</strong>: k or p values for comparisons, e.g. a &gt; b is True
if c.x &gt; k*c.u where c = b - a. Set only at the class level.</p>
</li>
</ul>
</div>
<div class="section" id="basic-gummy-methods">
Expand Down Expand Up @@ -2157,7 +2157,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
11 changes: 7 additions & 4 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>MetroloPy, the docs &#8212; metrolopy 0.5.1 documentation</title>
<title>MetroloPy, the docs &#8212; metrolopy 0.5.2 documentation</title>

<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.5.1',
VERSION: '0.5.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -38,7 +38,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -132,6 +132,9 @@ <h2>version history<a class="headerlink" href="#version-history" title="Permalin
<li>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.</li>
<li>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.</li>
</ul>
</div>
<div class="section" id="author">
Expand Down Expand Up @@ -200,7 +203,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
Loading

0 comments on commit 009e90e

Please sign in to comment.