This commit is contained in:
gobbo_a
2025-01-14 16:18:27 +01:00
parent 8beeb7dbc7
commit 7a0da7c48c
80 changed files with 1698 additions and 590 deletions
+7 -7
View File
@@ -4,19 +4,19 @@ udlylist = ("SATUN06","SATUN07","SATUN08","SATUN09","SATUN10",
uindlist = ("SATUN06","SATUN07","SATUN08","SATUN09","SATUN10","SATUN11","SATUN12","SATUN13",
"SATUN15","SATUN16","SATUN17","SATUN18","SATUN19","SATUN20","SATUN21","SATUN22")
#for udly in udlylist: caputq(udly + "-UDLY060:OFF-OP-SIMU", caget(udly + "-UDLY060:OFF-OP"))
#for udly in udlylist: caputq(udly + "-UDLY060:DEL-OP-SIMU", caget(udly + "-UDLY060:DEL-OP"))
#for udly in udlylist: caputq(udly + "-UDLY060:PH-SHIFT-OP-SIMU", caget(udly + "-UDLY060:PH-SHIFT-OP"))
for udly in udlylist: caputq(udly + "-UDLY060:OFF-OP-SIMU", caget(udly + "-UDLY060:OFF-OP"))
for udly in udlylist: caputq(udly + "-UDLY060:DEL-OP-SIMU", caget(udly + "-UDLY060:DEL-OP"))
for udly in udlylist: caputq(udly + "-UDLY060:PH-SHIFT-OP-SIMU", caget(udly + "-UDLY060:PH-SHIFT-OP"))
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-U-SET-SIMU", caget(udly + "-CHIC:G1"))
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-D-SET-SIMU", caget(udly + "-CHIC:G2"))
for udly in udlylist: caputq(udly + "-UDLY060:GAP-U-SET-SIMU", caget(udly + "-UDLY060:GAP-U-SET"))
for udly in udlylist: caputq(udly + "-UDLY060:GAP-D-SET-SIMU", caget(udly + "-UDLY060:GAP-D-SET"))
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-U-SET-SIMU", caget(udly + "-UDLY060:GAP-U-SET"))
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-D-SET-SIMU", caget(udly + "-UDLY060:GAP-D-SET"))
#for udly in udlylist: caputq(udly + "-UDLY060:OFF-OP-SIMU", 0.0)
#for udly in udlylist: caputq(udly + "-UDLY060:DEL-OP-SIMU", 0.020)
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-U-SET-SIMU", 70)
#for udly in udlylist: caputq(udly + "-UDLY060:GAP-D-SET-SIMU", 60)
#for udly in udlylist: caputq(udly + "-UDLY060:PH-SHIFT-OP-SIMU", 0.0)
#for udly in udlylist: caputq(udly + "-UDLY060:PH-SHIFT-OP-SIMU", caget(udly + "-UDLY060:PH-SHIFT-OP-SIMU") + 360)
#for uind in uindlist: caputq(uind + "-UIND030:K_SET_SIMU", caget(uind + "-UIND030:K_SET"))
#for uind in uindlist: caputq(uind + "-UIND030:POL-SET-SIMU", caget(uind + "-UIND030:POL-SET"))
for uind in uindlist: caputq(uind + "-UIND030:K_SET_SIMU", caget(uind + "-UIND030:K_UND_SET"))
for uind in uindlist: caputq(uind + "-UIND030:POL-SET-SIMU", caget(uind + "-UIND030:POL-SET"))
#caputq("SATCB01:ENE-FILT-OP-SIMU", caget("SATCB01:ENE-FILT-OP"))
+3 -1
View File
@@ -19,4 +19,6 @@ if do_elog:
title = "Wavelength change"
log_msg = "Old photon energy: %0.2f" % Eph1 + " kev\n"
log_msg = log_msg + "New photon energy: %0.2f" % Eph2 + " keV\n"
elog(title, log_msg)
elog(title, log_msg)
set_return("Success")
+3 -1
View File
@@ -19,4 +19,6 @@ if do_elog:
title = "Wavelength change"
log_msg = "Old photon energy: %0.2f" % Eph1 + " kev\n"
log_msg = log_msg + "New photon energy: %0.2f" % Eph2 + " keV\n"
elog(title, log_msg)
elog(title, log_msg)
set_return("Success")
+5 -7
View File
@@ -1,20 +1,18 @@
from random import random
undlist = ("SARUN03","SARUN04","SARUN05","SARUN06","SARUN07","SARUN08","SARUN09",
"SARUN10","SARUN11","SARUN12","SARUN13","SARUN14","SARUN15")
i = 0
amp = 0.10
for und in undlist:
K_taper = (-1)**i * 0.25 + random() * 0.050 - 0.025
rand = random() * 0.7 + 0.3
K_taper = (-1)**i * amp * rand
i = i + 1
K = caget(und + "-UIND030:K_SET")
K_min = caget(und + "-UIND030:K_SET.DRVL")
K_max = caget(und + "-UIND030:K_SET.DRVH")
if K + K_taper > K_max:
K_taper = K_max - K - random() * 0.025
K_taper = -K_taper
if K + K_taper < K_min:
K_taper = K_min - K + random() * 0.025
print(K, K_taper, K + K_taper)
K_taper = -K_taper
caputq(und + "-UIND030:K_TAPER_SET", K_taper)
set_return("Success")
+1 -1
View File
@@ -23,4 +23,4 @@ if do_elog:
log_msg = "Old photon energy: %0.3f" % Eph1 + " kev\n"
log_msg = log_msg + "New photon energy: %0.3f" % Eph2 + " keV\n"
elog(title, log_msg)
set_return("Success")
+2 -1
View File
@@ -7,4 +7,5 @@ for und in undlist:
K = K + K_taper
caputq(und + "-UIND030:K_SET", K)
caputq(und + "-UIND030:K_TAPER_SET", 0.0)
set_return("Success")
+5 -7
View File
@@ -1,22 +1,20 @@
from random import random
undlist = ("SATUN06","SATUN07","SATUN08","SATUN09",
"SATUN10","SATUN11","SATUN12","SATUN13",
"SATUN15","SATUN16","SATUN17","SATUN18",
"SATUN19","SATUN20","SATUN21","SATUN22")
i = 0
amp = 0.6
for und in undlist:
K_taper = (-1)**i * 0.25 + random() * 0.180 - 0.090
rand = random() * 0.7 + 0.3
K_taper = (-1)**i * amp * rand
i = i + 1
K = caget(und + "-UIND030:K_SET")
K_min = caget(und + "-UIND030:K_SET.DRVL")
K_max = caget(und + "-UIND030:K_SET.DRVH")
if K + K_taper > K_max:
K_taper = K_max - K - random() * 0.025
K_taper = -K_taper
if K + K_taper < K_min:
K_taper = K_min - K + random() * 0.025
print(K_taper)
K_taper = -K_taper
caputq(und + "-UIND030:K_TAPER_SET", K_taper)
set_return("Success")
+2
View File
@@ -18,3 +18,5 @@ 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)
set_return("Success")
+2
View File
@@ -17,3 +17,5 @@ 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)
set_return("Success")
+2
View File
@@ -17,3 +17,5 @@ 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)
set_return("Success")
+1
View File
@@ -16,3 +16,4 @@ for und in undlist:
if taper_qua_start <= u <= taper_qua_stop: j = j + 1
caputq(und + "-UIND030:K_TAPER_SET", K_taper)
u = u + 1
set_return("Success")
+1
View File
@@ -16,3 +16,4 @@ for und in undlist:
if taper_qua_start <= u <= taper_qua_stop: j = j + 1
if 0 <= u <= 7: caputq(und + "-UIND030:K_TAPER_SET", K_taper)
u = u + 1
set_return("Success")
+1
View File
@@ -16,3 +16,4 @@ for und in undlist:
if taper_qua_start <= u <= taper_qua_stop: j = j + 1
if 8 <= u <= 15: caputq(und + "-UIND030:K_TAPER_SET", K_taper)
u = u + 1
set_return("Success")
+1 -1
View File
@@ -7,4 +7,4 @@ for und in undlist:
K = K + K_taper
caputq(und + "-UIND030:K_SET", K)
caputq(und + "-UIND030:K_TAPER_SET", 0.0)
set_return("Success")
+3 -3
View File
@@ -5,9 +5,9 @@ IN_POSITION_BAND = 10.0
# EInkommentieren fuer Messungen Mit PSCR136
# Auskommentieren fuer Messungen Mit PCEL
#
#cam_server.start("SATOP31-PSCR136_sp1", True)
cam_server.start("SATOP31-PSRD175_sp1", True)
#cam_server.start("SATOP31-PPRM176_sp1", True)
#cam_server.start("SATOP31-PSCR136_sp", True)
cam_server.start("SATOP31-PSRD175_sp", True)
#cam_server.start("SATOP31-PPRM176_sp", True)
cam_server.stream.waitCacheChange(-1)
i= cam_server.stream.getChild("intensity")
i_avg = create_averager(i, 20, interval = -1)