#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 == "SINDI01": caput("S10CB01-RSYS:REQUIRED-OP", 0) caput("S10CB02-RSYS:REQUIRED-OP", 0) caput("S10DI01-MBND100:P-SET", 297.0) if tds == "S30CB14": caput("SARMA02-MBNP100:REQUEST", 1) #caput("SARCL01-DCOL030:GAP", 5.0) caput("SARCL02-VCOL290:GAP", 8.0) # set optics quads = tds_data[tds]["quads"] k1l = tds_data[tds]["K1L-meas"] for i in range(len(quads)): caput(quads[i] + ":K1L-SET", k1l[i])