Files
sf-op/script/Tools/BunchLengthRestore.py
gobbo_a 8beeb7dbc7
2023-08-17 15:16:51 +02:00

27 lines
710 B
Python

#Parameters
is_panel = get_exec_pars().source != CommandSource.ui # run from panel
if is_panel:
tds = args[0]
else:
tds = "S30CB14"
run("Tools/BunchLengthTDSdata.py")
# stop the beam
caput("SIN-TIMAST-TMA:Beam-RF-OnDelay-Sel", 1)
caput("SIN-TIMAST-TMA:Beam-Apply-Cmd.PROC", 1)
caput("SIN-TIMAST-TMA:Bunch-1-Freq-Sel", 10)
caput("SIN-TIMAST-TMA:Bunch-2-Freq-Sel", 10)
# beam stopper and coll.
if tds == "S30CB14":
#caput("SARCL01-DCOL030:GAP", 5.0)
caput("SARCL02-VCOL290:GAP", 5.0)
# restore nominal optics
quads = tds_data[tds]["quads"]
k1l = tds_data[tds]["K1L-nom"]
for i in range(len(quads)):
caput(quads[i] + ":K1L-SET", k1l[i])
# show message: restore optics and coll.