Files
sf-op/script/Undulators/und_scan_set.py
2025-12-15 16:53:16 +01:00

19 lines
482 B
Python

if get_exec_pars().args: # args is set by callin process (Qt panel)
und = args[0]
scan = args[1]
if scan == "AR_K":
set_channel = und + "-UIND030:K_SET"
elif scan == "AR_PHI":
set_channel = und + "-UPHS060:PHI_SET"
elif scan == "AT_K":
set_channel = und + "-UIND030:K_SET"
elif scan == "AT_PHI":
set_channel = und + "-UDLY060:PH-SHIFT-OP"
set_value = caget(und + ":SCAN-CREST")
caput(set_channel, set_value)
set_return([set_channel, set_value])