Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kirienko/unseries
Allows to deal with power series which coefficients contain uncertainties
https://github.com/kirienko/unseries
python taylor-series uncertainties uncertainty-propagation
Last synced: about 2 months ago
JSON representation
Allows to deal with power series which coefficients contain uncertainties
- Host: GitHub
- URL: https://github.com/kirienko/unseries
- Owner: kirienko
- License: gpl-3.0
- Created: 2017-02-22T09:52:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-05T11:44:50.000Z (over 6 years ago)
- Last Synced: 2024-10-13T14:44:53.416Z (3 months ago)
- Topics: python, taylor-series, uncertainties, uncertainty-propagation
- Language: Python
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
unseries
########.. image:: https://badge.fury.io/py/unseries.svg
:target: https://badge.fury.io/py/unseries.. image:: https://travis-ci.org/kirienko/unseries.svg?branch=master
:target: https://travis-ci.org/kirienko/unseries.. image:: https://landscape.io/github/kirienko/unseries/master/landscape.png
:target: https://landscape.io/github/kirienko/unseries/masterThis package allows to deal with power series which coefficients contain uncertainties.
It is build on top of ``uncertainties`` python package (see `here `_).
Scope
-----
For now the following fuctions are available:
- series addition and subtraction
- comparision (*greater than*, *less than*)
- series multiplication
- series inversion, i.e. ``Z(g) ➝ 1/Z(g)``
- series division (in the assumption that all powers are non-negative)
- exponentiation
- analitic differentiation
- substitution, i.e. calculation of a series ``Z(g)`` at the point ``g₀`` to a number with uncertainty
- approximation
- some technical functions: ``pprint``, ``save`` [to file],Example
-------
Assume two series:``Z₁(g) = 1.00(30) + 2.0000(30) g``
``Z₂(g) = -1.0(4) - 2.000(4) g + 999.00(10) g²``
Then
``Z₁+Z₂ = 0.0(5) + 0.000(5) g + 999.00(10) g²``.. code-block:: python
from unseries import Series
z1 = Series(2, {0: ufloat(1, 0.3), 1: ufloat(2, .003)})
z2 = Series(3, {0: ufloat(-1, 0.4), 1: ufloat(-2, .004), 2: ufloat(999, .1)})
print z1 + z2