From 39965d4e2f4088161e7ef70e7dff59c77fc3352e Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 18 Aug 2016 12:01:07 +0200 Subject: [PATCH] Script execution --- script/local.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/script/local.py b/script/local.py index 0011591..36d6704 100755 --- a/script/local.py +++ b/script/local.py @@ -12,11 +12,11 @@ import java.awt.Color as Color LASER_SETTLING_TIME = 0.1 def laser_on(): - caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0) + #caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0) time.sleep(LASER_SETTLING_TIME) def laser_off(): - caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1) + #caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1) time.sleep(LASER_SETTLING_TIME) @@ -220,6 +220,19 @@ def add_convex_hull_plot(title, x,y, name=None, clear = False, x_range = None, y return [hx,hy] +import random +class ComX(ReadonlyRegisterBase): + def doRead(self): + return gun_solenoid.read()/10.0 + random.random() +class ComY(ReadonlyRegisterBase): + def doRead(self): + return gun_solenoid.read()/15.0 + random.random() +comx = ComX() +comy = ComY() +avx = create_averager(comx, 5, 0.001) +avy = create_averager(comy, 5, 0.001) + +camtool.com_x_mean, camtool.com_y_mean, camtool.com_x_stdev, camtool.com_y_stdev #CAS if controller.isServerEnabled():