Script execution

This commit is contained in:
sfop
2017-06-12 11:31:25 +02:00
parent 1a51aa8a9e
commit 4c95a51af6

View File

@@ -41,14 +41,15 @@ try:
xb = create_averager(x, nb, -1) # -1 event based, waits for the next value
dxb = create_averager(dx, nb, -1)
dxb.monitored=True # not blocking, will return last nb values
time.sleep(1.0)
r = lscan(phase, [xb, dxb], start, stop, step , latency=lat)
rf_phase = r.getPositions(0)
E = [energy0 * (1 + val.mean / 1e6 / disp) for val in r.getReadable(0)]
dE = [energy0 * ( val.mean / 1e6 / abs(disp)) for val in r.getReadable(1)]
finally:
phase.write(phase0)
phase.close()
camtool.stop() # stops camtool but does not close it camtool is a global object
#phase.close()
#camtool.stop() # stops camtool but does not close it camtool is a global object
p = plot(None, title="Output")[0]
p.clear()