-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the documentation wiki for the Asymmetric Uncertainty package.
pip install git+https://github.com/cgobat/asymmetric_uncertainty.git
or
git clone https://github.com/cgobat/asymmetric_uncertainty
cd asymmetric_uncertainty
pip install .
or
git clone https://github.com/cgobat/asymmetric_uncertainty
cd asymmetric_uncertainty
python setup.py install
The package's main utility is the a_u
class, which provides an object type for representing and manipulating numbers with asymmetric errors. First, we must make the class available within our Python environment:
from asymmetric_uncertainty import a_u
We can then create an instance of it using the following syntax: a_u(nominal,pos_err,neg_err)
, where nominal
, pos_err
, and neg_err
are the nominal value, positive-side uncertainty, and negative-side uncertainty, respectively. You can also initialize using a single str
in the form "{nominal} (+{pos_err}, -{neg_err})"
or, if the uncertainty is symmetric, "{nominal} ± {err}"
. The value of err
will be then be used for both pos_err
and neg_err
.
Detailed usage information can be found in the API Reference.