Closedown
This commit is contained in:
@@ -186,7 +186,7 @@ def get_bpms():
|
||||
ret.append(element[1])
|
||||
return ret
|
||||
|
||||
def get_wire_scans():
|
||||
def get_wire_scanners():
|
||||
ret = []
|
||||
for element in elements:
|
||||
if element[0]==DWSC:
|
||||
@@ -195,7 +195,7 @@ def get_wire_scans():
|
||||
|
||||
|
||||
|
||||
def get_wire_scans_bpms(wire_scan):
|
||||
def get_wire_scanners_bpms(wire_scan):
|
||||
last = None
|
||||
ret = []
|
||||
for element in elements:
|
||||
@@ -209,6 +209,6 @@ def get_wire_scans_bpms(wire_scan):
|
||||
return None
|
||||
|
||||
|
||||
#for w in get_wire_scans():
|
||||
# print w, get_wire_scans_bpms(w)
|
||||
#for w in get_wire_scanners():
|
||||
# print w, get_wire_scanners_bpms(w)
|
||||
|
||||
|
||||
@@ -147,10 +147,13 @@ class WireScanner(WireScanInfo):
|
||||
caputq(self.prefix + ":ABORT.PROC", 1)
|
||||
|
||||
def init(self):
|
||||
#if self.selection is not None:
|
||||
# self.wire_sel.put(WireScanner.Selection.index(self.selection))
|
||||
caputq(self.prefix + ":INIT.PROC", 1)
|
||||
|
||||
def park(self):
|
||||
caputq(self.prefix + ":GARAGE_SEL.PROC", 1)
|
||||
caputq(self.prefix + ":INIT.PROC", 1)
|
||||
|
||||
def scan(self):
|
||||
self.cycles = self.nb_cycles.get()
|
||||
|
||||
@@ -11,12 +11,12 @@ scan_type = args[1] if is_panel else WireScanner.WireX1
|
||||
scan_range = args[2] if is_panel else [-2000, 2000, -2000, 2000]
|
||||
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_scans_bpms(prefix)
|
||||
bpms = args[5] if is_panel else get_wire_scanners_bpms(prefix)
|
||||
print "WireScan parameters: ", prefix, scan_type, scan_range, cycles, cycles, bpms
|
||||
|
||||
#Creating WireScanner object
|
||||
print "Creating scanner..."
|
||||
if prefix not in get_wire_scans():
|
||||
if prefix not in get_wire_scanners():
|
||||
raise Exception("Invalid wire scan: " + prefix)
|
||||
scanner = WireScanner(prefix, scan_range, cycles, velocity, True)
|
||||
scanner.set_selection(get_scan_selection(scan_type))
|
||||
|
||||
Reference in New Issue
Block a user