This commit is contained in:
19
script/Undulators/K_AT_scale2.py
Normal file
19
script/Undulators/K_AT_scale2.py
Normal file
@@ -0,0 +1,19 @@
|
||||
dEph = caget("SATUN:USER-DELTA")
|
||||
Eph1 = caget("SATUN15-UIND030:FELPHOTENE")
|
||||
|
||||
Eph2 = Eph1 + dEph
|
||||
|
||||
undlist = ("SATUN15","SATUN16","SATUN17","SATUN18","SATUN19","SATUN20","SATUN21","SATUN22")
|
||||
|
||||
K1, K2 = {}, {}
|
||||
for und in undlist:
|
||||
K = caget(und + "-UIND030:K_SET")
|
||||
K1[und] = K
|
||||
K2[und] = ((Eph1 / Eph2 * (K**2 + 2) - 2))**0.5
|
||||
print K1,K2
|
||||
for und in undlist: caputq(und + "-UIND030:K_SET", K2[und])
|
||||
time.sleep(0.5) # Make sure the new K values have been written
|
||||
|
||||
#Switching on radial motors (and pushing go) to ensure proper movements
|
||||
for und in undlist: caput(und + "-UIND030:RADIAL-ON.PROC", 1)
|
||||
for und in undlist: caput(und + "-UIND030:RADIAL-GO.PROC", 1)
|
||||
Reference in New Issue
Block a user