pyrtlib.uncertainty.AbsModUncertainty.uncertainty_propagation#
- static AbsModUncertainty.uncertainty_propagation(fun: str, A: ndarray, B: ndarray, sA: ndarray, sB: ndarray, a: Optional[float] = 1.0, b: Optional[float] = 1.0, sAB: Optional[float] = 0.0) Tuple[ndarray, ndarray] #
This function propagates uncertainty given two variables A, B and their associated uncertainty.
Function
Standard deviation
\(f=aA\)
\(\sigma_{f}=|a|\sigma _{A}\)
\(\displaystyle f=aA+bB\)
\(\displaystyle \sigma _{f}={\sqrt {a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}+2ab\,\sigma _{AB}}}\)
\(\displaystyle f=aA-bB\)
\(\displaystyle \sigma _{f}={\sqrt {a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}-2ab\,\sigma _{AB}}}\)
\(\displaystyle f=AB\)
\(\displaystyle \sigma _{f}\approx \left|f\right|{\sqrt {\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}+2{\frac {\sigma _{AB}}{AB}}}}\)
\(\displaystyle f={\frac {A}{B}}\)
\(\displaystyle \sigma _{f}\approx \left|f\right|{\sqrt {\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}-2{\frac {\sigma _{AB}}{AB}}}}\)
\(\displaystyle f=A^{a}\)
\(\displaystyle \sigma _{f}=|a|A^{a-1}\sigma _{A}\)
- Parameters:
fun (str) – [description].
A (numpy.ndarray) – variable A
B (numpy.ndarray) – variable B
sA (numpy.ndarray) – uncertainty on A
sB (numpy.ndarray) – uncertainty on B
a (float) – multiplier for A. Defaults to 1.0.
b (float) – multiplier for B. Defaults to 1.0.
sAB (float) – sqrt of covariance between A and B. Defaults to 0.0.
- Raises:
ValueError – Raise if fun argument is not defined.
- Returns:
function computed with imput variables and uncertainty on function used
- Return type:
References