From 44679b6ce4e328324afbaab9427940d19b5fb51e Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 27 Apr 2017 11:23:41 +0200 Subject: [PATCH] Script execution --- script/Diagnostics/WireScan.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/script/Diagnostics/WireScan.py b/script/Diagnostics/WireScan.py index b135e67..4da4ec7 100644 --- a/script/Diagnostics/WireScan.py +++ b/script/Diagnostics/WireScan.py @@ -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"