Script execution

This commit is contained in:
gobbo_a
2017-06-13 14:57:48 +02:00
parent 6456dbb6f9
commit beba69a7ab
+9 -4
View File
@@ -1,4 +1,5 @@
import ch.psi.pshell.epics.Positioner as Positioner
import ch.psi.pshell.epics.ChannelDouble as ChannelDouble
dry_run = True
do_elog = False
@@ -19,7 +20,9 @@ else:
if dry_run:
bph = Positioner("Beam phase", "SINEG01-RSYS:SET-BEAM-PHASE-SIM", "SINEG01-RSYS:SET-BEAM-PHASE-SIM")
q = Channel("SINEG01-DICT215:B1_CHARGE-SIM", type = 'd', alias = 'ICT-Q')
q = ChannelDouble('ICT-Q', "SINEG01-DICT215:B1_CHARGE-SIM")
q.initialize()
q.monitored=True
else:
bph = Positioner("Beam phase", "SINEG01-RSYS:SET-BEAM-PHASE", "SINEG01-RSYS:SET-BEAM-PHASE")
st = Stream("ICTstream", dispatcher)
@@ -35,13 +38,15 @@ bph.config.rotation = True
bph.config.resolution = 1.0
bph.config.save()
bph.initialize()
rph = Channel("SINEG01-RSYS:SET-VSUM-PHASE-SIM", type = 'd', alias = 'RF phase')
rph = ChannelDouble('RF phase', "SINEG01-RSYS:SET-VSUM-PHASE-SIM")
rph.initialize()
rph.monitored=True
rph0 = rph.read()
try:
rph_averager = create_averager(rph, nb, -1)
q_averager = create_averager(q, nb, -1)
rph_averager = create_averager(rph, nb, 0.1) # Set polling time to -1 for BS data to get all messages
q_averager = create_averager(q, nb, 0.1)
q_averager.monitored=True
r = lscan(bph, (rph_averager, q_averager), start, stop, step, latency=lat)
beamphase = r.getPositions(0)