From 9650e214f55a5a174a61e07fe29e769fb5a5c6ff Mon Sep 17 00:00:00 2001 From: kalt_r Date: Thu, 30 Jun 2016 16:49:00 +0200 Subject: [PATCH] Script execution --- script/jitter_scan.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/script/jitter_scan.py b/script/jitter_scan.py index f001d6b..1a4c276 100644 --- a/script/jitter_scan.py +++ b/script/jitter_scan.py @@ -4,7 +4,12 @@ Author: KR84 Copyright PSI LLRF, 2016 Purpose Record RF system jitters and store / archive data -Preconditions RF station is running +Preconditions - RF station is running + - AVG gates are set-up for correct length for particular station, P2P count is set to 100 for all channels + vsum + - AMPLT-REFERENCE is set to the klystron saturation point + - feedbacks are in closed loop (both) + - you know the settling time of the feedback + 100 P2P-count + 100 Hz, if required, change it below + - """ @@ -36,9 +41,12 @@ 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("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 + "-RLLE-DSP:PHASE-REFERENCE", SECTION + "-RSYS:GET-PHASE-REACHED") +cv_rf_amplt = PV_cv("amplt_ref", SECTION + "-RLLE-DSP:AMPLT-REFERENCE", SECTION + "-RSYS:GET-AMPLT-REACHED") # measured variables mv_ref_jit_amplt = PV("REF_amplt_jit" ,SECTION + "-RLLE-REF10:SIG-AMPLT-JIT-P2P-REL") @@ -116,7 +124,8 @@ set_attribute(path, "kly_jit_phase_mean", kly_jit_phase_mean) # ELOG -msg = scan_result.print("\t") +#msg = scan_result.print("\t") +msg = "" msg = msg + "\nMean:\nREF amplt\t" + str(ref_jit_amplt_mean)[:5] + "\nREF phase\t" + str(ref_jit_phase_mean)[:5] + "\n\nIQM amplt\t" + str(iqm_jit_amplt_mean)[:5] + "\nIQM phase\t" + str(iqm_jit_phase_mean)[:5] + "\n\nPRE amplt\t" + str(pre_jit_amplt_mean)[:5] + "\npre phase\t" + str(pre_jit_phase_mean)[:5] + "\n\nKLY amplt\t" + str(kly_jit_amplt_mean)[:5] + "\nkly phase\t" + str(kly_jit_phase_mean)[:5] msg = msg + "\n\nFile: " + get_context().path