This commit is contained in:
18
script/RFscan/GunEnergyScan.py
Executable file → Normal file
18
script/RFscan/GunEnergyScan.py
Executable file → Normal file
@@ -22,7 +22,7 @@ else:
|
||||
stop = 95.0
|
||||
step = 0.5
|
||||
nb = 3
|
||||
lat = 0.15
|
||||
lat = 0.4
|
||||
disp = -0.387
|
||||
p0 = 7.1
|
||||
plt = plot(None, title="Output")[0]
|
||||
@@ -44,7 +44,8 @@ plt.setLegendVisible(True)
|
||||
|
||||
#Creating Phase positioner
|
||||
if dry_run:
|
||||
phase = Positioner("Gun Phase", "SINEG01-RSYS:SET-BEAM-PHASE-SIM", "SINEG01-RSYS:SET-BEAM-PHASE-SIM")
|
||||
#phase = Positioner("Gun Phase", "SINEG01-RSYS:SET-BEAM-PHASE-SIM", "SINEG01-RSYS:SET-BEAM-PHASE-SIM")
|
||||
phase = DummyPositioner("Gun Phase")
|
||||
camera_name = "simulation"
|
||||
else:
|
||||
phase = Positioner("Gun Phase", "SINEG01-RSYS:SET-BEAM-PHASE", "SINEG01-RSYS:GET-BEAM-PHASE")
|
||||
@@ -88,7 +89,7 @@ def after_sample(record, scan):
|
||||
#The scan loop
|
||||
try:
|
||||
phase.write(start)
|
||||
time.sleep(2.0)
|
||||
time.sleep(1.0)
|
||||
r = lscan(phase, [x_averager, dx_averager], start, stop, step , latency=lat, after_read = after_sample)
|
||||
finally:
|
||||
phase.write(phase0)
|
||||
@@ -142,14 +143,11 @@ if do_elog:
|
||||
title = "Gun Energy Scan"
|
||||
Laser = str(caget("SLG-LGEN:WHICH_LASER"))
|
||||
log_msg = "Data file: " + get_exec_pars().path + "\n\n"
|
||||
log_msg = log_msg + "Laser: " + Laser + "\n"
|
||||
if Laser == "Alcor":
|
||||
log_msg = log_msg + "Bunch: " + Laser + "\n"
|
||||
if Laser == "Bunch 1":
|
||||
log_msg = log_msg + "Energy plate Alcor: %0.2f" % caget("SLAUV01-LATN100:MOT.RBV") + " deg \n"
|
||||
elif Laser == "Jaguar":
|
||||
log_msg = log_msg + "Energy plate Jaguar: %0.2f" % caget("SLJUV01-LATN100:MOT.RBV") + " deg \n"
|
||||
elif Laser == "Both":
|
||||
log_msg = log_msg + "Energy plate Alcor: %0.2f" % caget("SLAUV01-LATN100:MOT.RBV") + " deg \n"
|
||||
log_msg = log_msg + "Energy plate Jaguar: %0.2f" % caget("SLJUV01-LATN100:MOT.RBV") + " deg \n"
|
||||
elif Laser == "Bunch 2":
|
||||
log_msg = log_msg + "Energy plate Mizar: %0.2f" % caget("SLMUV01-LATN100:MOT.RBV") + " deg \n"
|
||||
if caget("SLAUV01-LAPT100:IRIS-POS-GET") == "IRIS":
|
||||
log_msg = log_msg + "Collimator Alcor: IRIS %0.2f" % caget("SLAUV01-LAPT100:SIZE-GET") + " mm \n"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user