Script execution

This commit is contained in:
kalt_r
2016-06-30 17:18:12 +02:00
parent 6f01b2b4ff
commit 22a4d66f0b

View File

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