From 77d292d17f4e939722a4d95e656d087c47877f53 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 15 Mar 2012 22:05:12 -0400 Subject: [PATCH] Use scipy's C2K instead of hardcoding temperature conversion algorithm. --- pyafm/temperature.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyafm/temperature.py b/pyafm/temperature.py index 9d85a7e..e4b04d1 100644 --- a/pyafm/temperature.py +++ b/pyafm/temperature.py @@ -16,6 +16,7 @@ # License along with unfold_protein. If not, see # . +from scipy.constants import C2K as _C2K from pypid.backend.melcor import MelcorBackend as _TemperatureBackend from . import LOG as _LOG @@ -70,7 +71,7 @@ class Temperature (object): if unit == Kelvin: # convert K -> K pass elif unit == Celsius: # convert C -> K - temp += 273.15 + temp = _C2K(temp) else: raise NotImplementedError(unit) _LOG.info('measured temperature of {:g} K'.format(temp)) -- 2.26.2