I just startet using the uncertainties
module found at http://pythonhosted.org/uncertainties/index.html#
Suppose we have an experimental setup with a temperature sensor which was calibrated. Now consider that the calibration yielded a variable measurement error, e.g. a linear increase from ± 1 K @ 0 °C to ± 4 K @ 100 °C. Is it possible to define a custom function to be used when defining a variable with the uncertainties
module?
Example:
>>> from uncertainties import ufloat
>>> def err_fun(temp_in_C):
..: return 1 + 3 / 100 * temp_in_C
>>> temp_meas = ufloat(10, err_fun, 'tag')
>>> print temp_meas
10+/-1.3
If so, does the uncertainty of the variable change, when its nominal value is changed?
Example:
>>> print temp_meas
10+/-1.3
>>> temp_meas.nominal_value = 50
>>> print temp_meas
50+/-2.5