From 28d68c9e3a6479ea2a830cdef9119b1d624c6f6b Mon Sep 17 00:00:00 2001 From: sfop Date: Fri, 2 Jun 2017 11:04:51 +0200 Subject: [PATCH] Startup --- devices/CurrentCamera.properties | 6 +++--- devices/WireScanner motor.properties | 6 +++--- script/RFscan/test.py | 31 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 script/RFscan/test.py diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 5729868..1b2e190 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,7 +1,7 @@ -#Fri Jun 02 09:27:53 CEST 2017 +#Fri Jun 02 10:37:36 CEST 2017 colormap=Flame -colormapAutomatic=false -colormapMax=400.0 +colormapAutomatic=true +colormapMax=0.0 colormapMin=0.0 flipHorizontally=false flipVertically=false diff --git a/devices/WireScanner motor.properties b/devices/WireScanner motor.properties index e803434..b34e7f9 100644 --- a/devices/WireScanner motor.properties +++ b/devices/WireScanner motor.properties @@ -1,12 +1,12 @@ -#Thu May 11 08:37:16 CEST 2017 +#Fri Jun 02 10:56:08 CEST 2017 defaultSpeed=6000.0 estbilizationDelay=0 hasEnable=false homingType=None maxSpeed=8000.0 -maxValue=51500.0 +maxValue=200000.0 minSpeed=50.0 -minValue=-56789.2 +minValue=-200000.0 offset=0.0 precision=1 resolution=0.1 diff --git a/script/RFscan/test.py b/script/RFscan/test.py new file mode 100644 index 0000000..2abba66 --- /dev/null +++ b/script/RFscan/test.py @@ -0,0 +1,31 @@ +import ch.psi.pshell.epics.ControlledVariable as ControlledVariable +import ch.psi.pshell.epics.Camtool as Camtool + +phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-BEAM-PHASE", "SINEG01-RSYS:GET-BEAM-PHASE") +phase.config.minValue =-180.0 +phase.config.maxValue = 360.0 +phase.config.precision = 3 +phase.config.resolution = 1.0 +phase.config.save() +phase.initialize() + +kill_camtool() +check_camtool() +camtool.start("SINBD01-DSCR010") +wait_camtool_message() + +x = camtool.stream.getChild("gr_x_fit_mean") +dx = camtool.stream.getChild("gr_x_fit_standard_deviation") + +try: + xb = create_averager(x, nb, -1) # -1 event based, waits for the next value + dxb = create_averager(dx, nb, -1) + dxb.monitored=True # not blocking, will return last nb values + r = lscan(phase, [xb, dxb], start, stop, step , latency=lat) + rf_phase = r.getPositions(0) + E = [energy0 * (1 + val.mean / 1e6 / disp) for val in r.getReadable(0)] + dE = [energy0 * ( val.mean / 1e6 / disp) for val in r.getReadable(1)] +finally: + phase.write(phase0) + phase.close() + camtool.stop() # stops camtool but does not close it camtool is a global object