Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hvparks committed Mar 26, 2019
1 parent 7fbdb39 commit d6c6b6b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 28 deletions.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# MetroloPy

tools for dealing with physical quantities: uncertainty propagation and unit conversion
Expand All @@ -15,25 +14,25 @@ $ pip install metrolopy

Physical quantities can then be represented in Python as `gummy` objects:

```
>>> import metrolopy as uc
>>> a = uc.gummy(1.2345,u=0.0234,unit='cm')
>>> a
<pre><code>&gt;&gt;&gt; import metrolopy as uc
&gt;&gt;&gt; a = uc.gummy(1.2345,u=0.0234,unit='cm')
&gt;&gt;&gt; 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/cm²
&gt;&gt;&gt; b = uc.gummy(3.034,u=0.174,unit='mm')
&gt;&gt;&gt; f = uc.gummy(uc.UniformDist(center=0.9345,half_width=0.096),unit='N')
&gt;&gt;&gt; p = f/(a*b)
&gt;&gt;&gt; p
2.50(21) N/cm<sup>2</sup>

>>> p.unit = 'kPa'
>>> p.uunit = '%'
>>> p
25.0 kPa ± 8.5%
```
&gt;&gt;&gt; p.unit = 'kPa'
&gt;&gt;&gt; p.uunit = '%'
&gt;&gt;&gt; p
25.0 kPa &plusmn; 8.5%
</code></pre>

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:

* [a tutorial](https://nrc-cnrc.github.io/MetroloPy/_build/html/_static/tutorial.html) (or <a href="https://nrc-cnrc.github.io/MetroloPy/_build/html/_downloads/tutorial.ipynb" download> download the tutorial as Jupyter notebook</a>)
* [the documentation](https://nrc-cnrc.github.io/MetroloPy/)
* [the issues page on GitHub](https://github.com/nrc-cnrc/Metrolopy/issues)
Binary file removed dist/metrolopy-0.5-py3-none-any.whl
Binary file not shown.
Binary file removed dist/metrolopy-0.5.tar.gz
Binary file not shown.
Binary file removed dist/metrolopy-0.5.zip
Binary file not shown.
16 changes: 5 additions & 11 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 documentation</title>
<title>MetroloPy, the docs &#8212; metrolopy 0.5.0 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',
VERSION: '0.5.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -35,10 +35,7 @@ <h3>Navigation</h3>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<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 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.0 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -126,7 +123,7 @@ <h2>Where did the name for the gummy class come from?<a class="headerlink" href=
</div>
<div class="section" id="version-history">
<h2>version history<a class="headerlink" href="#version-history" title="Permalink to this headline"></a></h2>
<p>Version 0.5, built 26 March 2019, is the first public release.</p>
<p>Version 0.5.0, built 26 March 2019, is the first public release.</p>
</div>
<div class="section" id="author">
<h2>author<a class="headerlink" href="#author" title="Permalink to this headline"></a></h2>
Expand Down Expand Up @@ -191,10 +188,7 @@ <h3>Navigation</h3>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<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 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">metrolopy 0.5.0 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
2 changes: 1 addition & 1 deletion metrolopy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# You should have received a copy of the GNU General Public License along with
# MetroloPy. If not, see <http://www.gnu.org/licenses/>.

__version__ = '0.5'
__version__ = '0.5.0'
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
zip_safe = True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Framework :: Jupyter",
Expand Down

0 comments on commit d6c6b6b

Please sign in to comment.