Skip to content

Commit fc04b3e

Browse files
committed
Merge remote-tracking branch 'origin/master' into development
2 parents 3a23873 + d26e7eb commit fc04b3e

File tree

3 files changed

+37
-26
lines changed

3 files changed

+37
-26
lines changed
Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
1-
# This workflows will upload a Python Package using pypa/gh-action-pypi-publish@master when a release is created
1+
# This workflow will upload a Python Package using Twine when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

4-
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
4+
name: Publish Python 🐍 distributions 📦 to PyPI
55

66
on:
77
release:
88
types: [created]
99

1010
jobs:
11-
build-n-publish:
12-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
13-
runs-on: ubuntu-18.04
11+
deploy:
12+
13+
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@master
16-
- name: Set up Python 3.x
17-
uses: actions/setup-python@v1
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
1818
with:
19-
python-version: 3.x
19+
python-version: '3.x'
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install setuptools wheel
24-
- name: Build a binary wheel and a source tarball
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
2528
run: |
2629
python setup.py sdist bdist_wheel
27-
- name: Publish distribution 📦 to Test PyPI
28-
uses: pypa/gh-action-pypi-publish@master
29-
with:
30-
user: __token__
31-
password: ${{ secrets.test_pypi_password }}
32-
repository_url: https://test.pypi.org/legacy/
33-
- name: Publish distribution 📦 to PyPI
34-
uses: pypa/gh-action-pypi-publish@master
35-
with:
36-
user: __token__
37-
password: ${{ secrets.pypi_password }}
30+
twine upload dist/*

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
# labfis.py
22

3-
[![Travis - CI](https://img.shields.io/travis/com/phisgroup/labfis.py/development?style=for-the-badge)](https://travis-ci.com/phisgroup/labfis.py) [![PyPI](https://img.shields.io/pypi/v/labfis?style=for-the-badge)](https://pypi.org/project/labfis/) [![License](https://img.shields.io/github/license/phisgroup/labfis.py?style=for-the-badge)](https://github.com/phisgroup/labfis.py/blob/master/LICENSE)
3+
[![Travis - CI](https://img.shields.io/travis/com/phisgroup/labfis.py/master?style=for-the-badge)](https://travis-ci.com/phisgroup/labfis.py) [![PyPI](https://img.shields.io/pypi/v/labfis?style=for-the-badge)](https://pypi.org/project/labfis/) [![License](https://img.shields.io/github/license/phisgroup/labfis.py?style=for-the-badge)](https://github.com/phisgroup/labfis.py/blob/master/LICENSE)
44

55
## Description
66

7-
Small library (currently only one class) for uncertainty calculations and error propagation.
7+
Small library for uncertainty calculations and error propagation.
88

9-
The uncertainty calculations are in accordance with gaussian’s propagation, as calculated by an analytical method:
9+
### Error propagation:
10+
11+
The uncertainty is calculated analytically in accordance with the gaussian propagation:
1012

1113
<p align="center">
1214
<img src="https://latex.codecogs.com/svg.latex?%5Cdpi%7B120%7D%20%5CDelta_f%20%3D%20%5Csqrt%7B%5Cleft%28%5Cfrac%7B%5Cpartial%20f%7D%7B%5Cpartial%20x%7D%5Cright%29%5E2%7B%5CDelta_x%7D%5E2%20&plus;%20%5Cleft%28%5Cfrac%7B%5Cpartial%20f%7D%7B%5Cpartial%20y%7D%5Cright%29%5E2%7B%5CDelta_y%7D%5E2%20&plus;%20%5Cleft%28%5Cfrac%7B%5Cpartial%20f%7D%7B%5Cpartial%20z%7D%5Cright%29%5E2%7B%5CDelta_z%7D%5E2%20&plus;%20...%7D">
1315
</p>
1416

17+
18+
### To compare two labfloats it is used the following methods:
19+
20+
Assuming:
21+
<img src="https://latex.codecogs.com/svg.image?%5Cbg_white%20%5Cinline%20labfloat(x_i,%5Csigma_i)%5Cequiv%20x_i%20%5Cpm%20%5Csigma_i">
22+
23+
- If they are equal they must satisfy:
24+
<img src="https://latex.codecogs.com/svg.image?%5Cbg_white%20%5Cinline%20%5Cleft%7Cx_1%20-%20x_2%5Cright%7C%20%3C%202(%5Csigma_1%20&plus;%20%5Csigma_2)">
25+
26+
- If they are different they must satisfy:
27+
<img src="https://latex.codecogs.com/svg.image?%5Cbg_white%20%5Cinline%20%5Cleft%7Cx_1%20-%20x_2%5Cright%7C%20%3E%203(%5Csigma_1%20&plus;%20%5Csigma_2)">
28+
29+
> **_NOTE:_** Two labfloats can be not different and not equal at the same time by these methods.
30+
1531
Made by and for Physics Laboratory students in IFSC, who can't use uncertainties.py because of mean’s absolute deviation used in its calculation.
1632

1733
## Usage
@@ -57,3 +73,5 @@ pip install git+https://github.com/phisgroup/labfis.py@development
5773
11. ["Strategies for Variance Estimation"](http://www.sagepub.com/upm-data/6427_Chapter_4__Lee_%28Analyzing%29_I_PDF_6.pdf) (PDF). p. 37. Retrieved 2013-01-18.
5874
12. Harris, Daniel C. (2003), [_Quantitative chemical analysis_](https://books.google.com/books?id=csTsQr-v0d0C&pg=PA56)(6th ed.), Macmillan, p. 56, [ISBN](https://en.wikipedia.org/wiki/ISBN_(identifier) "ISBN (identifier)") [978-0-7167-4464-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-7167-4464-1 "Special:BookSources/978-0-7167-4464-1")
5975
13. ["Error Propagation tutorial"](http://www.foothill.edu/psme/daley/tutorials_files/10.%20Error%20Propagation.pdf) (PDF). _Foothill College_. October 9, 2009. Retrieved 2012-03-01.
76+
14. Helene, O.; Vanin, V.. Tratamento estatístico de dados em física experimental. São Paulo: Editora Edgard Blücher, 1981.
77+
15. Vuolo, J. E.. Fundamentos da teoria de erros. 2. ed. São Paulo: Editora Edgard Blücher, 1993.

labfis/uncertainty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def uncertainty(self):
223223
return self._uncertainty
224224

225225
def __getitem__(self, idx):
226-
vals = (self.uncertainty, self.mean)
226+
vals = (self.mean, self.uncertainty)
227227
return vals[idx]
228228

229229
def __pos__(self):

0 commit comments

Comments
 (0)