Added Attenuator

This commit is contained in:
Roman Mankowsky
2017-11-13 18:56:11 +01:00
parent 718cf90d3c
commit 4055fba7e7
2 changed files with 29 additions and 11 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ aliases = {
'SAROP21-OATT135' : {
'alias' : 'Att',
'z_und' : 135,
'desc' : 'Attenuator Bernina'},
'desc' : 'Attenuator Bernina',
'eco_type' : 'xoptics.attenuator_aramis.AttenuatorAramis'},
'SAROP21-OAPU136' : {
'alias' : 'SlitAtt',
'z_und' : 136,
+27 -10
View File
@@ -1,25 +1,42 @@
from ..devices_general.motors import MotorRecord
from epics import PV
class AttenuatorAramis:
def __init__(Id,elog=None):
def __init__(self, Id):
self.Id = Id
pass
def __call__():
pass
def __str__():
pass
def __status__():
def updateE():
def __call__(self):
pass
def set_transmission(self,value):
def __str__(self):
pass
def setE():
def __status__(self):
pass
def updateE(self, THG = False):
energy = PV("SARUN03-UIND030:FELPHOTENE").value
if (THG == True):
energy = energy*3
energy = energy *1000
PV(self.Id+":ENERGY").put(energy)
print("Set energy to %s eV"%energy)
return
def set_transmission(self,value, THG = False):
self.updateE(THG)
PV(self.Id+":TRANS_SP").put(value)
self.updateE(THG = False)
print("Transmission Fundamental: %s THG: %s"%self.get_transmission())
pass
def get_transmission(self,E=current):
def setE(self):
pass
def get_transmission(self):
tFun = PV(self.Id+":TRANS_RB").value
tTHG = PV(self.Id+":TRANS3EDHARM_RB").value
return (tFun, tTHG)