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

attenuator setup channels for factor and thickness to be displayed in daiquiri

parent e0832e21
Pipeline #56133 failed
from bliss.scanning.scan_meta import get_user_scan_meta
from bliss.config.channels import Cache
'''
class: ID26attenuator
package: id26.controllers.attenuator
......@@ -28,6 +28,12 @@ class ID26Attenuator:
self.unit = float(config_dict ['attenuation_unit'])
self.filters = config_dict['filters']
self.__factor = Cache(self, "factor", default_value=0)
self.__thickness = Cache(self, "thickness", default_value=0)
self.factor()
self.thickness()
self._init_meta_data_publishing()
def _init_meta_data_publishing(self):
......@@ -76,7 +82,7 @@ class ID26Attenuator:
self.wago.set (self.wkey, register)
register = self.wago.get(self.wkey)
factor = int(''.join(list(map(str,register)))[::-1], base=2)
self.__factor.value = factor
return factor
def thickness (self, value = None):
......@@ -84,7 +90,7 @@ class ID26Attenuator:
newvalue = int(value/self.unit)
self.factor(newvalue)
value = self.unit*self.factor()
self.__thickness.value = value
return value
def insert (self, *channel):
......
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