This commit is contained in:
sfop
2016-12-09 11:48:09 +01:00
parent dee1df0de5
commit 118255e5b3
8 changed files with 80 additions and 24 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

12
script/example1_dv.py Normal file
View File

@@ -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))

11
script/example2_dv.py Normal file
View File

@@ -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)

4
script/example3_dv.py Normal file
View File

@@ -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)

View File

@@ -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))

14
script/test/bs2.py Normal file
View File

@@ -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()