import ch.psi.pshell.epics.ProcessVariable as PV latency = 0.3 SECTION = "SINSB02" start = -170.0 stop = 180.0 step = 10.0 print "SECTION = ", SECTION print "Start = ", start print "Stop = ", stop print "Step = ", step set_context(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") # define all PVs # controlled variabales cv_rf_phase = PV("phase_ref", SECTION + "-RLLE-DSP:PHASE-REFERENCE") cv_rf_amplt = PV("amplt_ref", SECTION + "-RLLE-DSP:AMPLT-REFERENCE") # measured variables mv_ref_jit_amplt = PV("REF_amplt_jit" ,SECTION + "-RLLE-REF10:SIG-AMPLT-JIT-P2P-REL") mv_ref_jit_phase = PV("REF_phase_jit" ,SECTION + "-RLLE-REF10:SIG-PHASE-JIT-P2P") mv_iqm_jit_amplt = PV("IQM_amplt_jit" ,SECTION + "-RIQM-DCP10:FOR-AMPLT-JIT-P2P-REL") mv_iqm_jit_phase = PV("IQM_phase_jit" ,SECTION + "-RIQM-DCP10:FOR-PHASE-JIT-P2P") mv_pre_jit_amplt = PV("PRE_amplt_jit" ,SECTION + "-RPRE-DCP10:FOR-AMPLT-JIT-P2P-REL") mv_pre_jit_phase = PV("PRE_phase_jit" ,SECTION + "-RPRE-DCP10:FOR-PHASE-JIT-P2P") mv_kly_jit_amplt = PV("KLY_amplt_jit" ,SECTION + "-RKLY-DCP10:FOR-AMPLT-JIT-P2P-REL") mv_kly_jit_phase = PV("KLY_phase_jit" ,SECTION + "-RKLY-DCP10:FOR-PHASE-JIT-P2P") # initialize all PVs cv_rf_phase.initialize() cv_rf_amplt.initialize() mv_ref_jit_amplt.initialize() mv_ref_jit_phase.initialize() mv_iqm_jit_amplt.initialize() mv_iqm_jit_phase.initialize() mv_pre_jit_amplt.initialize() mv_pre_jit_phase.initialize() mv_kly_jit_amplt.initialize() mv_kly_jit_phase.initialize() 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") # close all PVs cv_rf_phase.close() cv_rf_amplt.close() mv_ref_jit_amplt.close() mv_ref_jit_phase.close() mv_iqm_jit_amplt.close() mv_iqm_jit_phase.close() mv_pre_jit_amplt.close() mv_pre_jit_phase.close() mv_kly_jit_amplt.close() mv_kly_jit_phase.close() # ELOG msg = scan_result.print("\t") msg = msg + "\n\nFile: " + get_context().path elogllrf("Jitter Scan", msg,"Measurement", "RF Stability", SECTION, get_plot_snapshots()) # save the entry in the logbook