Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Estimates propagation error tolerances for systems of equations.

Project description

Error Solver

PyPI - Python Version PyPI Build Status Documentation Status codecov

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.

Files for error-solver, version 2.1.1
Filename, size File type Python version Upload date Hashes
Filename, size error_solver-2.1.1-py2.py3-none-any.whl (19.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size error_solver-2.1.1.tar.gz (13.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page