-
Notifications
You must be signed in to change notification settings - Fork 4
API Reference
class
asymmetric_uncertainty.a_u(nominal, pos_err=0, neg_err=0)
Class for representing and handling propagation of asymmetric uncertainties assuming a pseudo-Gaussian probability distribution where the plus and minus errors in each direction of the nominal value are like modified 1-sigma standard deviations.
nominal
: numeric
Nominal value of the represented quantity
pos_err
: numeric
Plus error on the value
neg_err
: numeric
Minus error on the value
value
: numeric
The nominal value of the represented quantity
plus
: numeric
The positive error on the value
minus
: numeric
The negative error on the value
maximum
: numeric
The negative error on the value
minimum
: numeric
The negative error on the value
sign
: 1 or -1
1 if value
is positive or 0, -1 if value
is negative
is_symmetric
: boolTrue
if plus
and minus
are equal. False
otherwise.
func
asymmetric_uncertainty.a_u.items()
Returns a tuple of (value,plus,minus).
func
asymmetric_uncertainty.a_u.add_error(delta, method='quadrature', inplace=False)
Adds delta
to an instance's existing error. Possible method
s are "quadrature"
, "straight"
, or "split"
. If inplace
is True
, the object's errors are modified in place. If it is False
, a new instance is returned.
func
asymmetric_uncertainty.a_u.pdf(x)
Computes and returns the values of the probability distribution function for the specified input.
func
asymmetric_uncertainty.a_u.cdf(x)
Computes and returns the values of the cumulative distribution function for the specified input.
func
pdfplot(num_sigma=5, discretization=100, **kwargs)
Plots the associated PDF over the specified number of sigma, using 2*discretization points. **kwargs are passed on to matplotlib for configuration of the resulting plot.
func
cdfplot(num_sigma=5, discretization=100, **kwargs)
Plots the associated CDF over the specified number of sigma, using 2*discretization points. **kwargs are passed on to matplotlib for configuration of the resulting plot.
func
asymmetric_uncertainty.a_u.isna()
pandas
-style NaN checker. Returns True
if value
is NaN or None, and False
if neither.
func
asymmetric_uncertainty.a_u.notna()
Inverse of isna()
. Returns True
if value
is neither NaN nor None, and False
if it is.
class
asymmetric_uncertainty.UncertaintyArray(array)
Class for representing an array of a_u
objects. Mostly provides utilities for slicing and accessing various attributes.
func
asymmetric_uncertainty.pos_errors(array)
Stand-alone function to return an array of the positive errors of an array of a_u
objects. Functional equivalent to UncertaintyArray(array).plus
.
func
asymmetric_uncertainty.neg_errors(array)
Stand-alone function to return an array of the negative errors of an array of a_u
objects. Functional equivalent to UncertaintyArray(array).minus
.