Estimates propagation error tolerances for systems of equations.
Project description
Error Solver
About
This package contains classes for estimating the propagation error tolerances for a system of equations.
Installation
This package may be installed via pip:
pip install error_solver
The above installation only install the dependencies required for the
ErrorSolverPy
class. To also install the dependencies necessary for the
ErrorSolver
class, use the following command instead:
pip install error_solver[all]
Example: Error in Cylinder
The below example determines the propagation error tolerances for the cross sectional
area A
and volume V
of a cylinder given the measurement tolerance for the radius
r
and height h
.
from error_solver import ErrorSolver
# Define the equations
EQUATIONS = [
'A = pi * r**2',
'V = A * h'
]
# Solve the equations by some means and assemble the values in a dictionary
values = {
'h': 12,
'r': 5,
'A': 78.54,
'V': 942.48
}
# Define the known error tolerances
errors = {
'h': 0.05,
'r': 0.05
}
solver = ErrorSolver(EQUATIONS)
solver.solve(values, errors)
# value error pct_error is_calc
# var
# A 78.539816 1.570796 2.000000 True
# V 942.477796 22.776547 2.416667 True
# h 12.000000 0.050000 0.416667 False
# r 5.000000 0.050000 1.000000 False
Project details
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 error_solver-2.1.1.tar.gz
.
File metadata
- Download URL: error_solver-2.1.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e7d6102c1e639dc78ac4f401de9df59b009794ca32d15227f1b0ef3cbf74a58 |
|
MD5 | 78becad7abedeed5d5a6e64abe739501 |
|
BLAKE2b-256 | 9eafcb70c562e782e32075e45930c8c53f64b879ce9fb0e8a417dddffa9009dc |
File details
Details for the file error_solver-2.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: error_solver-2.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4dc631487094654aabaf9757a8f957bc26db5cc1f27d16464656f3660856d0 |
|
MD5 | bb501bd8bf8dfe11a23214e5c5439dc9 |
|
BLAKE2b-256 | 5f57bade0923f0c86371895a0895006ce9572399001a702228e1b6f89e444faf |