This commit is contained in:
voulot_d
2017-04-10 10:53:04 +02:00
parent f1dc9c7511
commit 33dce4dda3
4 changed files with 277 additions and 0 deletions
+6
View File
@@ -9,6 +9,7 @@
# look at the centroid position (BPM or screen) downstream of the gun.
import datetime
import ch.psi.utils.Chrono as Chrono
mode = "camtool" # "camtool", "bpm" or "direct"
camera_name = "simulation"
@@ -52,9 +53,14 @@ if mode == "camtool":
#camtool.stop()
#camtool.startPipeline(camera_name, 0, use_background, None, 0.0, None)
#camtool.startReceiver();
c = Chrono()
print "t1 = " , c.ellapsed
camtool.start(camera_name, 0, use_background, None, 0.0, None)
print "t2 = " , c.ellapsed
if camtool.value is not None: print "Started " , camtool.value.getTimestamp()
wait_camtool_message()
print "t3 = " , c.ellapsed
print "OK"
else:
if mode == "bpm":
+26
View File
@@ -0,0 +1,26 @@
if get_exec_pars().source == CommandSource.ui:
prefix = "SARCL02-DWSC270"
sel = WireScan.W1X
else:
prefix = args[0]
sel = args[1]
run("Devices/Elements")
run("Devices/WireScan")
print get_wire_scans()
wire_scan = WireScan(prefix, sel)
print wire_scan.start.read()
print wire_scan.end.read()
time.sleep(1.0)
print wire_scan.current_cycle
wire_scan.close()