Script execution
This commit is contained in:
@@ -13,7 +13,7 @@ cycles = args[3] if is_panel else 5
|
||||
velocity = args[4] if is_panel else 200
|
||||
bpms = args[5] if is_panel else get_wire_scanners_bpms(prefix)
|
||||
blms = args[6] if is_panel else get_wire_scanners_blms(prefix)
|
||||
bkgrd = args[7] if is_panel else 0
|
||||
bkgrd = args[7] if is_panel else 10
|
||||
plt = args[8] if is_panel else plot(None, title = "Wire Scan")[0]
|
||||
do_elog = True if is_panel else False
|
||||
print "WireScan parameters: ", prefix, scan_type, scan_range, cycles, cycles, bpms
|
||||
@@ -89,18 +89,13 @@ def check_end_scan(record, scan):
|
||||
#for s in plt.getAllSeries():
|
||||
# s.clear()
|
||||
for i in range (len(blms)):
|
||||
plt.getSeries(i).appendData(position, record[5 + i])
|
||||
|
||||
def wait_scanner_ready():
|
||||
time.sleep(0.5)
|
||||
scanner.waitValue("At start", 60000)
|
||||
plt.getSeries(i).appendData(position, record[5 + i])
|
||||
|
||||
#Process background
|
||||
def do_background():
|
||||
#Store Background
|
||||
if bkgrd>0:
|
||||
#scanner.park()
|
||||
#wait_scanner_ready()
|
||||
scanner.park(wait=True)
|
||||
set_exec_pars(group = "background")
|
||||
r = mscan (st, st.getReadables()[4:], bkgrd)
|
||||
for i in range(len(r.getReadables())):
|
||||
@@ -123,7 +118,7 @@ def do_scan(index):
|
||||
else:
|
||||
plt.getAxis(plt.AxisId.X).setRange(scan_range[2], scan_range[3])
|
||||
|
||||
scanner.init()
|
||||
scanner.init(wait=True)
|
||||
wait_scanner_ready()
|
||||
|
||||
scanner.curr_cycl.write(0)
|
||||
|
||||
Reference in New Issue
Block a user