v1.10
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
|
||||
import ch.psi.pshell.epics.ChannelDouble as ChannelDouble
|
||||
A1 = ChannelDouble("Phase (deg.)", "SARUN11-UIND030:PHI_SET")
|
||||
A1 = ChannelDouble("Phase (deg.)", "SARUN11-UIND030:PHI_SET")
|
||||
S1 = ChannelDouble("energy per pulse (uJ)", "SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US")
|
||||
S2 = ChannelDouble("HAMP", "SARFE10-PBPG050:HAMP-INTENSITY-CAL")
|
||||
S2 = ChannelDouble("HAMP", "SARFE10-PBPG050:HAMP-INTENSITY-CAL")
|
||||
A1.initialize()
|
||||
S1.initialize()
|
||||
S2.initialize()
|
||||
@@ -10,19 +10,12 @@ A1_init = A1.read()
|
||||
A1i = -180
|
||||
A1f = 180
|
||||
nstep = 72
|
||||
lat = 0.11
|
||||
nav = 100
|
||||
lat = 0.05
|
||||
nav = 40
|
||||
plt = plot(None, title="Output")[0]
|
||||
plt.clear()
|
||||
plt.setStyle(plt.Style.ErrorY)
|
||||
plt.addSeries(LinePlotErrorSeries("Sensor1", Color.red))
|
||||
def before(position, scan):
|
||||
caput(GAP + ":GO", 1)
|
||||
start = time.time()
|
||||
while abs(readout.read() - GAP.read()) > TOLERANCE:
|
||||
time.sleep(0.1)
|
||||
if time.time() - start > TIMEOUT:
|
||||
raise Exception ("Timeout waiting gap change")
|
||||
def after_sample(record, scan):
|
||||
plt.getSeries(0).appendData(record.positions[0], record.values[0].mean, record.values[0].stdev)
|
||||
try:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Eph1 = 8.7 # actual photon energy
|
||||
Eph2 = 5.8 # desired photon energy
|
||||
Eph1 = 10.8 # actual photon energy
|
||||
Eph2 = 12.0 # desired photon energy
|
||||
|
||||
do_elog = True
|
||||
|
||||
@@ -14,9 +14,9 @@ print K1,K2
|
||||
# set laser on-delay
|
||||
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel",1)
|
||||
caput("SIN-TIMAST-TMA:Beam-Apply-Cmd.PROC",1)
|
||||
if Eph2 < Eph1 :
|
||||
for und in undlist: caput(und + "-UIND030:K_SET", 1.1)
|
||||
time.sleep(40.0)
|
||||
#if Eph2 > Eph1 :
|
||||
# for und in undlist: caput(und + "-UIND030:K_SET", 1.1)
|
||||
# time.sleep(40.0)
|
||||
for und in undlist: caput(und + "-UIND030:K_SET", K2[und])
|
||||
time.sleep(10.0)
|
||||
# set laser on-beam
|
||||
|
||||
Reference in New Issue
Block a user