diff --git a/cfg/sim_uniax_cfg.py b/cfg/sim_uniax_cfg.py index 8c35d776..c9c2a5be 100644 --- a/cfg/sim_uniax_cfg.py +++ b/cfg/sim_uniax_cfg.py @@ -54,7 +54,7 @@ Mod('T', 'frappy_psi.softcal.Sensor', 'temperature sensor, soft calibration', rawsensor='res', - calib='X132254', + calcurve='X132254', value=Param( unit='K', ), diff --git a/cfg/softcal_cfg.py b/cfg/softcal_cfg.py index 6d0fdf0f..11b2c7c0 100644 --- a/cfg/softcal_cfg.py +++ b/cfg/softcal_cfg.py @@ -16,5 +16,5 @@ Mod('T2', '', value = Param(unit = 'K'), rawsensor = 'r2', - calib = 'X131346', + calcurve = 'X131346', ) diff --git a/cfg/stick/PEstick_cfg.py b/cfg/stick/PEstick_cfg.py index 63ce6db6..f5c7a5db 100644 --- a/cfg/stick/PEstick_cfg.py +++ b/cfg/stick/PEstick_cfg.py @@ -43,5 +43,5 @@ Mod('ts', 'calibrated value for ts', value = Param(unit = 'K'), rawsensor = 'tsraw', - calib = 'X133834', + calcurve = 'X133834', ) diff --git a/cfg/stick/gas10ka_cfg.py b/cfg/stick/gas10ka_cfg.py index 1764c89f..47dff581 100644 --- a/cfg/stick/gas10ka_cfg.py +++ b/cfg/stick/gas10ka_cfg.py @@ -38,6 +38,6 @@ Mod('T_sample', output_module='htr_sample', p=1, i=0.01, - calib='X161269', + calcurve='X161269', value=Param(unit='K'), ) diff --git a/cfg/uniax_cfg.py b/cfg/uniax_cfg.py index fd7d8495..927ad90f 100644 --- a/cfg/uniax_cfg.py +++ b/cfg/uniax_cfg.py @@ -52,7 +52,7 @@ Mod('T', 'frappy_psi.softcal.Sensor', 'sample T', rawsensor='res', - calib='X132254', + calcurve='X132254', value=Param( unit='K', ), diff --git a/frappy_psi/softcal.py b/frappy_psi/softcal.py index 94192fa4..c617bd26 100644 --- a/frappy_psi/softcal.py +++ b/frappy_psi/softcal.py @@ -176,7 +176,7 @@ class CalCurve: class Sensor(Readable): rawsensor = Attached() - calib = Parameter('calibration name', datatype=StringType(), readonly=False) + calcurve = Parameter('calibration name', datatype=StringType(), readonly=False) abs = Parameter('True: take abs(raw) before calib', datatype=BoolType(), readonly=False, default=True) value = Parameter(datatype=FloatRange(unit='K')) pollinterval = Parameter(export=False) @@ -193,18 +193,18 @@ class Sensor(Readable): def initModule(self): super().initModule() self.rawsensor.registerCallbacks(self, ['status']) # auto update status - self._calib = CalCurve(self.calib) + self._calcurve = CalCurve(self.calcurve) if self.description == '_': - self.description = f'{self.rawsensor!r} calibrated with curve {self.calib!r}' + self.description = f'{self.rawsensor!r} calibrated with curve {self.calcurve!r}' - def write_calib(self, value): - self._calib = CalCurve(value) + def write_calcurve(self, value): + self._calcurve = CalCurve(value) return value def _get_value(self, rawvalue): if self.abs: rawvalue = abs(float(rawvalue)) - return self._calib(rawvalue) + return self._calcurve(rawvalue) def _get_status(self, rawstatus): return rawstatus if self._value_error is None else (self.Status.ERROR, self._value_error)