This commit is contained in:
voulot_d
2017-05-30 17:28:37 +02:00
parent a65efe7076
commit 202cf3bb79
7 changed files with 110 additions and 32 deletions
+16 -6
View File
@@ -1,11 +1,11 @@
import ch.psi.pshell.epics.ControlledVariable as ControlledVariable
if get_exec_pars().source == CommandSource.ui:
start = -30.0
stop = 30.0
start = -10.0
stop = 10.0
step = 5.0
nb = 1
lat = 0.100
nb = 3
lat = 0.300
else:
start = args[0]
stop = args[1]
@@ -13,8 +13,8 @@ else:
nb = int(args[3])
lat = args[4]
phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS:GET-VSUM-PHASE")
#phase = ControlledVariable("Phase", "S10CB09-RSYS:SET-VSUM-PHASE", "S10CB09-RSYS:SET-VSUM-PHASE")
phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-BEAM-PHASE", "SINEG01-RSYS:GET-BEAM-PHASE")
#phase = ControlledVariable("Phase", "S10CB09-RSYS:SET-BEAM-PHASE", "S10CB09-RSYS:SET-BEAM-PHASE")
phase.config.minValue =-180.0
phase.config.maxValue = 360.0
phase.config.precision = 3
@@ -50,3 +50,13 @@ index_max = y.index(max(y))
phase_ref = x[index_max] - 80
set_return(phase_ref)
# save the entry in the logbook
#if get_option("Generated data file:\n" + get_exec_pars().path +"\n\n" + "Save to ELOG?", "YesNo") == "Yes":
# log_msg = "Start: %0.1f" % start + "deg\n"
# log_msg = log_msg + "Stop: %0.1f" % stop + "deg\n"
# log_msg = log_msg + "Step: %0.1f" % nb + "deg\n"
# log_msg = log_msg + "Nb samples: %0.0f" % nb + "\n"
# log_msg = log_msg + "Latency: %0.3f" % lat + "s\n"
# log_msg = log_msg + "Data file: " + get_exec_pars().path
# elog("Schottky Scan", log_msg, get_plot_snapshots())