added switch between scaled Ks and same K for all
This commit is contained in:
@ -20,10 +20,12 @@ und_name_cal = "SATUN12-UIND030"
|
|||||||
|
|
||||||
class Undulators(Adjustable):
|
class Undulators(Adjustable):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, scaled=True):
|
||||||
super().__init__(name="Athos Undulators", units="eV")
|
super().__init__(name="Athos Undulators", units="eV")
|
||||||
self.adjs = {name: Undulator(name) for name in und_names}
|
self.adjs = {name: Undulator(name) for name in und_names}
|
||||||
|
|
||||||
|
self.scaled = scaled
|
||||||
|
|
||||||
self.convert = ConverterEK()
|
self.convert = ConverterEK()
|
||||||
|
|
||||||
a = self.adjs[und_name_cal]
|
a = self.adjs[und_name_cal]
|
||||||
@ -39,13 +41,15 @@ class Undulators(Adjustable):
|
|||||||
|
|
||||||
ks_current = [a.get_current_value(readback=False) for a in self.adjs.values()]
|
ks_current = [a.get_current_value(readback=False) for a in self.adjs.values()]
|
||||||
|
|
||||||
|
if scaled:
|
||||||
|
header = "scaled: "
|
||||||
ks_target = self.scale.K(value, ks_current)
|
ks_target = self.scale.K(value, ks_current)
|
||||||
print("scaled: ", ks_target)
|
else:
|
||||||
print()
|
header = "all equal:"
|
||||||
|
ks_target = k * np.ones_like(ks_current)
|
||||||
|
|
||||||
# ks_target = k * np.ones_like(ks_current)
|
print(header, ks_target)
|
||||||
# print("all equal:", ks_target)
|
print()
|
||||||
# print()
|
|
||||||
|
|
||||||
def change():
|
def change():
|
||||||
#TODO: replace by set_all_target_values_and_wait when print not needed anymore
|
#TODO: replace by set_all_target_values_and_wait when print not needed anymore
|
||||||
|
Reference in New Issue
Block a user