Script execution

This commit is contained in:
kalt_r
2016-06-30 16:49:00 +02:00
parent 6573a2469e
commit 9650e214f5
+13 -4
View File
@@ -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