GUI for error calulations
Project description
"ErroRCalcS" is a GUI-tool to calculate uncertainties by using the uncertainties and the PyQt5 packages.
update 0.3.1
In version 0.3.1 there are some new features:
- you can chose now where to save the formula file via the 'save here'-button
- you can open the file directly by clicking 'open'
- the Program checks the internetconnection in order to chose from where to open the usage.md
- completely new structure: some functions have been moved from GUI. py and calc. py to a new script (add. py) to make the program code easier to read.
Furthermore some bugs were fixed.
Usage / funktion
The aplication starts with a window with different input fields (see picture below):
- variable (name of variable, e.g. d)
- value (Value of variable e.g. 7.1)
- error (correspondending error on the variable, e.g. 0.8 or 0,8)
- formula (desired formula, using the variables and further values and arithmetic characters
By clicking on the 'add-variable' button, the entries are written to files in a folder named '.__log__'. By clicking on the 'calculation' button, the formula entry is also written to a file in the '.__log__' and 'calc.py' starts running, and writes the calculation and the result in files into the '.__log__'. Variables can be overwritten.
By selecting a format behind 'Safe used Formula for' the used formula for error propagation is written into a file named 'saved_formula.txt' in the current directory. By clicking the 'save-here'-button you can chose, where to save the used formula. Clicking the 'open'-button leads directly to the file where the formula was saved in.
If LaTex is selected, the formula is also written to the .txt file. You can copy this into a .tex document. If you import there the 'amsmath' module (\usepackage{amsmath}), you can use this formula without editing.
Input and Result Examples
General Inpus
variable | value | error | formula | result |
---|---|---|---|---|
V, T, n | 2, 283.5, 4.3 | 0, 0.5, 0.03 | (n*8.314*T)/V | 5067.591+/-36.467 |
x | 4.3 | 1.1 | sin(x)*3.5 | -3.2066+/-1.5431 |
y | 3.254 | 0.032 | log10(y) | 0.5124175+/-0,0042709 |
x, y | 4.3, 3.254 | 1.1, 0.032 | log(x)**y | 3.4156+/-1.9497 |
Arithmetic Characters
characters and operators | meaning | example |
---|---|---|
+ | plus | 4+2=6 |
- | minus | 4-2=2 |
* | multiplication | 4*2=8 |
/ | division | 4/2=2 |
** | exponent | 4**2=16 |
sqrt(x) | square root | sqrt(4)=2 |
log(x) | natural logarithm | log(2.71828)=1 |
logY(x) | logarithm with base Y | log10(2.71828)=0.4343 |
sin(x) | sinus in radian | sin(1)=0.8415 |
cos(x) | cosinus in radian | cos(1)=0.5403 |
tan(x) | tangens in radian | tan(1)=1.5574 |
asin(x) | arcsinus in radian | asin(1)=1.5707 |
acos(x) | arccosinus in radian | acos(1)=0 |
atan(x) | arctangens in radian | atan(1)=0.7854 |
exp(x) | exponentialfunktion of e^(x) | exp(2)=7.3891 |
Requirements
- Python >= 3.4
- uncertainties
- PyQt5
Installation
errorcalcs can be installed by pip3 install errorcalcs
(Linux) or simply pip install errorcalcs
(Windows). You can run the GUI with following code:
from errorcalcs.errorcalcs import run\_e\_c
run\_e\_c()
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
File details
Details for the file errorcalcs-0.3.4.tar.gz
.
File metadata
- Download URL: errorcalcs-0.3.4.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ceb7b8333862c41a849187cb1f8a2ffaf9d10b7ca2ca57b84031ba45057e6d |
|
MD5 | 98ca6249187513d2db7a4fd904c862bf |
|
BLAKE2b-256 | f10e2855eaa56b7ef6b5df38b545d64d6a0a218dfebf539c51a2d00197a4d325 |
File details
Details for the file errorcalcs-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: errorcalcs-0.3.4-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5c7bdecc33aedba0535f029c7de6c0b8b9e070a528b971366764444986f7ab |
|
MD5 | 6c26c0635d6f4533d359380db6dbdfc9 |
|
BLAKE2b-256 | 98b5ec3eb55f5c70e0da2d68011c2c9108ee6fe5f074bf7a7f196d067779eb75 |