From 22a4d66f0b030d3cccb040bbe7849555c4446ea1 Mon Sep 17 00:00:00 2001 From: kalt_r Date: Thu, 30 Jun 2016 17:18:12 +0200 Subject: [PATCH] Script execution --- script/jitter_scan.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/script/jitter_scan.py b/script/jitter_scan.py index 1da33fd..a08763e 100644 --- a/script/jitter_scan.py +++ b/script/jitter_scan.py @@ -41,12 +41,10 @@ set_context(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) # define all PVs import ch.psi.pshell.epics.ProcessVariable as PV -import ch.psi.pshell.epics.ControlledVariable as PV_cv + # controlled variabales -#cv_rf_phase = PV("phase_ref", SECTION + "-RLLE-DSP:PHASE-REFERENCE") -#cv_rf_amplt = PV("amplt_ref", SECTION + "-RLLE-DSP:AMPLT-REFERENCE") -cv_rf_phase = PV_cv("phase_ref", SECTION + "-RSYS:SET-VSUM-PHASE", SECTION + "-RLLE-DSP:FB-PHASE-M") -cv_rf_amplt = PV_cv("amplt_ref", SECTION + "-RSYS:SET-ACC-VOLT" , SECTION + "-RSYS:GET-AMPLT-REACHED") +cv_rf_phase = PV("phase_ref", SECTION + "-RSYS:SET-VSUM-PHASE") +cv_rf_amplt = PV("amplt_ref", SECTION + "-RSYS:SET-ACC-VOLT") # measured variables mv_ref_jit_amplt = PV("REF_amplt_jit" ,SECTION + "-RLLE-REF10:SIG-AMPLT-JIT-P2P-REL") @@ -74,8 +72,14 @@ mv_pre_jit_phase.initialize() mv_kly_jit_amplt.initialize() mv_kly_jit_phase.initialize() +# define current amplitude as saturation amplitude, then define three scans +amplt_sat = cv_rf_amplt.read() +amplt_stop = amplt_sat +amplt_start = 0.9 * amplt_stop +amplt_step = (amplt_stop - amplt_start) / 2 -scan_result = lscan(cv_rf_phase, (mv_ref_jit_amplt,mv_ref_jit_phase,mv_iqm_jit_amplt,mv_iqm_jit_phase,mv_pre_jit_amplt,mv_pre_jit_phase,mv_kly_jit_amplt,mv_kly_jit_phase), start, stop, step , latency=latency, title="Jitter Scan") + +scan_result = lscan((cv_rf_amplt, cv_rf_phase), (mv_ref_jit_amplt,mv_ref_jit_phase,mv_iqm_jit_amplt,mv_iqm_jit_phase,mv_pre_jit_amplt,mv_pre_jit_phase,mv_kly_jit_amplt,mv_kly_jit_phase), (-170 amplt_start), (180,amplt_stop), (10, amplt_step) , latency=latency, title="Jitter Scan", zigzag=True) # close all PVs cv_rf_phase.close()