Commit e4f67a45 authored by bliss administrator's avatar bliss administrator
Browse files

ExternalInput for regulation SoftLoop out of Moco Diodes

parent 710c59ac
......@@ -13,7 +13,7 @@ from bliss.common.regulation import SoftLoop
from bliss.common.logtools import log_debug
class Chi2DiodeInput(ExternalInput):
class MocoDiodeInput(ExternalInput):
""" """
def __init__(self, name, config):
......@@ -26,14 +26,14 @@ class Chi2DiodeInput(ExternalInput):
self.signal_max = config.get('signal_max',np.infty)
self._last_value = 0
def _get_chi2_counts(self):
count_chi2 = self.device.comm('?fbeam')
count_finm = float(count_chi2.split()[0])
count_foutm = float(count_chi2.split()[1])
def _get_moco_counts(self):
count_moco = self.device.comm('?fbeam')
count_finm = float(count_moco.split()[0])
count_foutm = float(count_moco.split()[1])
return count_finm, count_foutm
def allow_regulation(self):
count_finm, count_foutm = self._get_chi2_counts()
count_finm, count_foutm = self._get_moco_counts()
d1 = count_finm - self.offset_finm
d2 = count_foutm - self.offset_foutm
......@@ -49,7 +49,7 @@ class Chi2DiodeInput(ExternalInput):
def read(self):
""" """
count_finm, count_foutm = self._get_chi2_counts()
count_finm, count_foutm = self._get_moco_counts()
d1 = count_finm - self.offset_finm
d2 = count_foutm - self.offset_foutm
......@@ -64,7 +64,7 @@ class Chi2DiodeInput(ExternalInput):
def state(self):
""" returns the input device state """
log_debug(self, "Chi2DiodeInput:state")
log_debug(self, "MocoDiodeInput:state")
return "READY"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment