choderalab / bayesian-itc

Python tools for the analysis and modeling of isothermal titration calorimetry (ITC) experiments.
GNU General Public License v3.0
5 stars 10 forks source link

Implement significant digits on output in bitc_util.py #59

Open bas-rustenburg opened 9 years ago

bas-rustenburg commented 9 years ago

Implement using 1 significant digit on the standard error.

We can use https://pypi.python.org/pypi/sigfig/0.1

import sigfig

x = 1.234567
e1 = 0.12
e2 = 0.012
print(sigfig.round_unc(x,e1,crop=0))
print(sigfig.round_unc(x,e2,crop=0))

which returns

1.2
1.23