From beba69a7ab8b24433c2e92418678fba1b5d29c14 Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Tue, 13 Jun 2017 14:57:48 +0200 Subject: [PATCH] Script execution --- script/RFscan/SchottkyScan.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/script/RFscan/SchottkyScan.py b/script/RFscan/SchottkyScan.py index cffef60..8fca9d3 100644 --- a/script/RFscan/SchottkyScan.py +++ b/script/RFscan/SchottkyScan.py @@ -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)