Script execution

This commit is contained in:
sfop
2017-04-27 11:23:41 +02:00
parent 3f8f9c6885
commit 44679b6ce4
+12 -12
View File
@@ -7,7 +7,7 @@ BPM_SENSORS = [("x","X1"), ("y","Y1"), ("q","Q1")] #(logic name sufix, channel s
#Paramter parsing
prefix = args[0] if is_panel else "SINDI01-DWSC090" #"S30CB09-DWSC440"
scan_type = args[1] if is_panel else WireScanner.Set1 #WireScanner.WireX1
scan_type = args[1] if is_panel else WireScanner.WireX1
scan_range = args[2] if is_panel else [-200, 200, -400, 400]
cycles = args[3] if is_panel else 5
velocity = args[4] if is_panel else 200
@@ -49,7 +49,8 @@ st.waitCacheChange(10000) #Wait stream be running before starting scan
#Pseudo-device returning the wire position
class w_pos(Readable):
def read(self):
return scanner.get_sel_wire_pos(st.getChildren()[0].take())
#return scanner.get_sel_wire_pos(st.getChildren()[0].take())
return scanner.get_sel_wire_pos(scanner.motor_bs_readback)
#End of scan checking
scan_complete = None
@@ -102,16 +103,15 @@ try:
scanner.waitValue("At start", 60000)
set_exec_pars(group="y_{count}", reset=True)
do_scan()
# save the entry in the logbook
gsa_log_msg = "Data file: " + get_exec_pars().path
#gsa_log_msg = gsa_log_msg + "\nWire Scanner: " + prefix
#gsa_log_msg = gsa_log_msg + "\nScan Type: " + str(scan_range)
#gsa_log_msg = gsa_log_msg + "\nRange: " + str(number_images)
#gsa_log_msg = gsa_log_msg + "\nCycles: " + str(cycles)
#gsa_log_msg = gsa_log_msg + "\nWire Velocity: " + str(velocity)
elog("Wire Scan", gsa_log_msg)
# save the entry in the logbook
gsa_log_msg = "Data file: " + get_exec_pars().path
gsa_log_msg = gsa_log_msg + "\nWire Scanner: " + prefix
gsa_log_msg = gsa_log_msg + "\nScan Type: " + str(scan_type)
gsa_log_msg = gsa_log_msg + "\nRange: " + str(scan_range)
gsa_log_msg = gsa_log_msg + "\nCycles: " + str(cycles)
gsa_log_msg = gsa_log_msg + "\nWire Velocity: " + str(velocity)
elog("Wire Scan", gsa_log_msg)
finally:
print "Closing scanner"