From 118255e5b3fa7c4ef5b87f294f231999801cc8ad Mon Sep 17 00:00:00 2001 From: sfop Date: Fri, 9 Dec 2016 11:48:09 +0100 Subject: [PATCH] Startup --- config/devices.properties | 11 +++++++---- devices/CurrentCamera.properties | 16 ++++++++-------- devices/fampltms.properties | 24 ++++++++++++++++++++++++ script/example1_dv.py | 12 ++++++++++++ script/example2_dv.py | 11 +++++++++++ script/example3_dv.py | 4 ++++ script/scan_dv.py | 12 ------------ script/test/bs2.py | 14 ++++++++++++++ 8 files changed, 80 insertions(+), 24 deletions(-) create mode 100644 devices/fampltms.properties create mode 100644 script/example1_dv.py create mode 100644 script/example2_dv.py create mode 100644 script/example3_dv.py delete mode 100644 script/scan_dv.py create mode 100644 script/test/bs2.py diff --git a/config/devices.properties b/config/devices.properties index c88105b..5b8849d 100755 --- a/config/devices.properties +++ b/config/devices.properties @@ -4,7 +4,7 @@ gun_solenoid=ch.psi.pshell.epics.Positioner|SINEG01-MSOL130:I-SET SINEG01-MSOL13 gun_phase=ch.psi.pshell.epics.Positioner|SINEG01-RSYS:SET-BEAM-PHASE SINEG01-RSYS:GET-BEAM-PHASE|||true #SINSB01_phase=ch.psi.pshell.epics.Positioner|VA-SINSB01-RSYS100:SET-BEAM-PHASE VA-SINSB01-RSYS100:GET-BEAM-PHASE|||true dispatcher=ch.psi.pshell.bs.Dispatcher|http://dispatcher-api.psi.ch/sf||| -stream=ch.psi.pshell.bs.Stream|dispatcher||| +stream=ch.psi.pshell.bs.Stream|dispatcher|||true #ref10=ch.psi.pshell.bs.Scalar|stream SINEG01-RLLE-REF10:SIG-PHASE-AVG 10||| #ref20=ch.psi.pshell.bs.Scalar|stream SINEG01-RLLE-REF20:SIG-PHASE-AVG 10||| #pup10=ch.psi.pshell.bs.Scalar|stream SINEG01-RGUN-PUP10:SIG-AMPLT-AVG 10||| @@ -14,9 +14,12 @@ stream=ch.psi.pshell.bs.Stream|dispatcher||| #ref_phase=ch.psi.pshell.bs.Scalar|stream SINDI01-RKLY-DCP10:REF-PHASE 10||| #sp=ch.psi.pshell.bs.Scalar|stream SINXB01-RWVG100-DCP10:FOR-PHASE 10||| #sa=ch.psi.pshell.bs.Scalar|stream SINXB01-RWVG100-DCP10:FOR-AMPLT 10||| -cpu_timer=ch.psi.pshell.bs.Scalar|stream SINDI01-RLLE-STA:SLAVE1-CPUTIMER 10 4||| -#dl_timer=ch.psi.pshell.bs.Scalar|stream SINDI01-RLLE-STA:SLAVE1-DLTIMER 10||| -amp=ch.psi.pshell.bs.Waveform|stream SINDI01-RCIR-PUP10:SIG-AMPLT 10 4||| +mcput=ch.psi.pshell.bs.Scalar|stream SINDI01-RLLE-STA:MASTER-CPUTIMER 10 0||| +scput=ch.psi.pshell.bs.Scalar|stream SINDI01-RLLE-STA:SLAVE1-CPUTIMER 10||| +fphase=ch.psi.pshell.bs.Waveform|stream SINXB01-RWVG100-DCP10:FOR-PHASE 10 0 2048||| +#famplt=ch.psi.pshell.bs.Waveform|stream SINXB01-RWVG100-DCP10:FOR-AMPLT 10 0 2048||| +fampltm=ch.psi.pshell.bs.Matrix|stream SINXB01-RWVG100-DCP10:FOR-AMPLT 10 0 64 32||| +fampltms=ch.psi.pshell.imaging.RegisterMatrixSource|fampltm||-100| #BC1_energy=ch.psi.pshell.epics.ChannelDouble|VA-SINBC02-DBPM140:ENERGY|Read||true #SARUN02_MCRX080=ch.psi.pshell.epics.Positioner|VA-SARUN02-MCRX080:I-SET VA-SARUN02-MCRX080:I-READ|||true #SARUN02_MCRY080=ch.psi.pshell.epics.Positioner|VA-SARUN02-MCRY080:I-SET VA-SARUN02-MCRY080:I-READ|||true diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index f2105d3..e095627 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,13 +1,13 @@ -#Thu Dec 01 14:38:26 CET 2016 +#Tue Dec 06 18:03:37 CET 2016 colormap=Temperature colormapAutomatic=true colormapMax=0.0 colormapMin=0.0 -flipHorizontally=false +flipHorizontally=true flipVertically=true grayscale=false -imageHeight=1200 -imageWidth=1246 +imageHeight=2148 +imageWidth=2272 invert=false rescaleFactor=1.0 rescaleOffset=0.0 @@ -18,9 +18,9 @@ roiY=0 rotation=0.0 rotationCrop=false scale=1.0 -spatialCalOffsetX=-630.0 -spatialCalOffsetY=-612.0 -spatialCalScaleX=-26.761819803746654 -spatialCalScaleY=-26.595744680851062 +spatialCalOffsetX=-1093.0 +spatialCalOffsetY=-1098.0 +spatialCalScaleX=-7.6923076923076925 +spatialCalScaleY=-7.774538386783285 spatialCalUnits=mm transpose=false diff --git a/devices/fampltms.properties b/devices/fampltms.properties new file mode 100644 index 0000000..383651d --- /dev/null +++ b/devices/fampltms.properties @@ -0,0 +1,24 @@ +#Wed Dec 07 15:12:51 CET 2016 +colormap=Grayscale +colormapAutomatic=false +colormapMax=NaN +colormapMin=NaN +flipHorizontally=false +flipVertically=false +grayscale=false +invert=false +rescaleFactor=1.0 +rescaleOffset=0.0 +roiHeight=-1 +roiWidth=-1 +roiX=0 +roiY=0 +rotation=0.0 +rotationCrop=false +scale=1.0 +spatialCalOffsetX=NaN +spatialCalOffsetY=NaN +spatialCalScaleX=NaN +spatialCalScaleY=NaN +spatialCalUnits=mm +transpose=false diff --git a/script/example1_dv.py b/script/example1_dv.py new file mode 100644 index 0000000..67ca2b9 --- /dev/null +++ b/script/example1_dv.py @@ -0,0 +1,12 @@ +knob = Channel("SARUN20-MCRX080:I-SET") +sensor1 = Channel("SINEG01-DICT215:B1_CHARGE") +sensor2 = Channel("S10DI01-DICT025:B1_CHARGE") + +start = -1.0 +stop = 1.0 +nstep = 10 +lat = 0.5 + +r = lscan(knob, (sensor1, sensor2), start, stop, nstep, lat) + +plot(r.getReadable(0), name = 'plotname', xdata = r.getReadable(1)) diff --git a/script/example2_dv.py b/script/example2_dv.py new file mode 100644 index 0000000..e112c32 --- /dev/null +++ b/script/example2_dv.py @@ -0,0 +1,11 @@ +knob = Channel("SARUN20-MCRX080:I-SET") +sensor1 = Channel("SINEG01-DICT215:B1_CHARGE") +sensor2 = Channel("S10DI01-DICT025:B1_CHARGE") + +start = -0.5 +stop = 0.5 +nstep = 10 +lat = 0.5 + +av = create_averager(sensor1, 10, 0.1) +lscan(knob, (av, sensor2), start, stop, nstep, lat) diff --git a/script/example3_dv.py b/script/example3_dv.py new file mode 100644 index 0000000..8af7c80 --- /dev/null +++ b/script/example3_dv.py @@ -0,0 +1,4 @@ +data = tscan(Channel('SINEG01-DICT215:B1_CHARGE'), 100, 0.1) +samples = data.getReadable(0) +print "mean=", mean(samples) +print "stdev=", stdev (samples) \ No newline at end of file diff --git a/script/scan_dv.py b/script/scan_dv.py deleted file mode 100644 index 27e637e..0000000 --- a/script/scan_dv.py +++ /dev/null @@ -1,12 +0,0 @@ -knob = Channel("SARUN20-MCRX080:I-SET") -sensor1 = Channel("SINEG01-DICT210:B1_CHARGE") -sensor2 = Channel("SINEG01-DICT215:B1_CHARGE") - -start = -0.6 -stop = -0.4 -nstep = 10 -lat = 0.5 - -r = lscan(knob, (sensor1, sensor2), start, stop, nstep, lat) - -#plot(r.getReadable(0), r.getReadable(1), xdata = r.getPositions(0)) diff --git a/script/test/bs2.py b/script/test/bs2.py new file mode 100644 index 0000000..a22d4f0 --- /dev/null +++ b/script/test/bs2.py @@ -0,0 +1,14 @@ +st1 = Stream("st1", dispatcher) +add_device(st1, force = True) +st1.addScalar("mcpu", "SINDI01-RLLE-STA:MASTER-CPUTIMER", 10, 0) +st1.addScalar("scpu", "SINDI01-RLLE-STA:SLAVE1-CPUTIMER", 10, 0) +#st1.addWaveform("phase", "SINXB01-RWVG100-DCP10:FOR-PHASE", 10, 0, 2048) +#st1.addWaveform("amplt", "SINXB01-RWVG100-DCP10:FOR-AMPLT", 10, 0, 2048) +st1.initialize() +st1.start() +try: + #bscan (st1, 10, title="bscan") + tscan (st1.getReadables(), 10, 1, title="tscan") + x = st1.take() +finally: + st1.close()