From 1a263f2c5f5dbe1c8248cac557655cf2072e836b Mon Sep 17 00:00:00 2001 From: sfop Date: Tue, 14 Feb 2017 15:41:12 +0100 Subject: [PATCH] Closedown --- script/RFscan/GunScan.py | 12 ++---------- script/local.py | 17 ++++++++--------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/script/RFscan/GunScan.py b/script/RFscan/GunScan.py index 70c8835..d6635c1 100644 --- a/script/RFscan/GunScan.py +++ b/script/RFscan/GunScan.py @@ -27,18 +27,10 @@ phase.initialize() camtool.stop() camtool.start("simulation") -class FitMean(Readable): - def read(self): - return camtool.getValue("gr_x_fit_mean") - -class FitStdev(Readable): - def read(self): - return camtool.getValue("gr_x_fit_standard_deviation") - #x = Channel("SINEG01-DSCR190:X-SIM", type = 'd', alias='SCR-X') #dx = Channel("SINEG01-DSCR190:DX-SIM", type = 'd', alias='SCR-DX') -x = FitMean() -dx = FitStdev() +x = CamtoolValue("gr_x_fit_mean") +dx = CamtoolValue("gr_x_fit_standard_deviation") try: xb = create_averager(x, nb, 0.100) diff --git a/script/local.py b/script/local.py index e18006c..cf238f1 100755 --- a/script/local.py +++ b/script/local.py @@ -183,15 +183,14 @@ add_device(Sinusoid("center_y"), True) center_x.setPolling(100) center_y.setPolling(100) - -""" -if not get_context().isLocalMode(): - try: - run("camtool") - add_device(CamTool("image_stats", prefix = "SINEG01-DSCR190:", latch = True, camera = "SINEG01-DSCR190", gauss = False), True) - except: - pass -""" +#Camtool "child" pseudo-devices +class CamtoolValue(Readable): + def __init__(self, channel): + self.channel=channel + + def read(self): + return camtool.getValue(self.channel) + #Convex hull plots def clear_convex_hull_plot(title):