added Eugenio's phase-shifter/CHIC calculation (still disabled)
This commit is contained in:
@ -20,9 +20,10 @@ und_name_cal = "SATUN12-UIND030"
|
|||||||
|
|
||||||
class Undulators(Adjustable):
|
class Undulators(Adjustable):
|
||||||
|
|
||||||
def __init__(self, scaled=True):
|
def __init__(self, scaled=True, name="Athos Undulators", units="eV"):
|
||||||
super().__init__(name="z Athos Undulators", units="eV")
|
super().__init__(name=name, units=units)
|
||||||
self.adjs = {name: Undulator(name) for name in und_names}
|
self.adjs = {name: Undulator(name) for name in und_names}
|
||||||
|
self.chic = CHIC(name, units)
|
||||||
|
|
||||||
self.scaled = scaled
|
self.scaled = scaled
|
||||||
|
|
||||||
@ -63,6 +64,8 @@ class Undulators(Adjustable):
|
|||||||
t = a.set_target_value(k_new, hold=False)
|
t = a.set_target_value(k_new, hold=False)
|
||||||
tasks.append(t)
|
tasks.append(t)
|
||||||
wait_for_all(tasks)
|
wait_for_all(tasks)
|
||||||
|
print("Warning: CHIC adjustment is still commented!")
|
||||||
|
# self.chic.set_target_value(value) #TODO: test whether an additional sleep is needed
|
||||||
|
|
||||||
return self._as_task(change, hold=hold)
|
return self._as_task(change, hold=hold)
|
||||||
|
|
||||||
@ -150,3 +153,21 @@ class ScalerEK:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class CHIC(PVAdjustable):
|
||||||
|
|
||||||
|
def __init__(self, name, units):
|
||||||
|
name += " CHIC Energy"
|
||||||
|
super().__init__("SATUN-CHIC:PHOTON-ENERGY", name=name)
|
||||||
|
self.pvs.start = PV("SATUN-CHIC:APPLY-DELAY-OFFSET-PHASE")
|
||||||
|
self.units = units
|
||||||
|
|
||||||
|
def set_target_value(self, value):
|
||||||
|
value /= 1000
|
||||||
|
super().set_target_value(value)
|
||||||
|
self.pv_start.put(1)
|
||||||
|
|
||||||
|
def get_current_value(self):
|
||||||
|
return super().get_current_value() * 1000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ from slic.utils import devices
|
|||||||
#from slic.core.acquisition.fakeacquisition import FakeAcquisition
|
#from slic.core.acquisition.fakeacquisition import FakeAcquisition
|
||||||
|
|
||||||
from devices.attenuator import Attenuator
|
from devices.attenuator import Attenuator
|
||||||
from devices.undulator import Undulators, Undulator
|
from devices.undulator import Undulators
|
||||||
|
|
||||||
|
|
||||||
dummy = DummyAdjustable(units="au")
|
dummy = DummyAdjustable(units="au")
|
||||||
@ -28,7 +28,7 @@ source_y = Motor("SATES20-MANIP1:MOTOR_1", name="Source manipulator y")
|
|||||||
source_x = Motor("SATES20-MANIP1:MOTOR_2", name="Source manipulator x")
|
source_x = Motor("SATES20-MANIP1:MOTOR_2", name="Source manipulator x")
|
||||||
|
|
||||||
att = Attenuator("SATFE10-OATT064")
|
att = Attenuator("SATFE10-OATT064")
|
||||||
und = Undulators()
|
und = Undulators(name="z Athos Undulators")
|
||||||
|
|
||||||
xota_z_trans = Motor("SATES21-XOTA166:W_Z", name="Table 1: Z coordinated")
|
xota_z_trans = Motor("SATES21-XOTA166:W_Z", name="Table 1: Z coordinated")
|
||||||
#xota_hori_z = Motor("SATES21-XOTA166:MOTOR_Z", name="Table 1: Z raw")
|
#xota_hori_z = Motor("SATES21-XOTA166:MOTOR_Z", name="Table 1: Z raw")
|
||||||
|
Reference in New Issue
Block a user