Closedown

This commit is contained in:
sfop
2016-10-19 11:42:06 +02:00
parent df27107df7
commit 6f589e0638

View File

@@ -27,6 +27,20 @@ latency = 10
# some other parameters
# define plot range limits dependant on the staation type
if SECTION[1] == 'I':
if SECTION[3] == 'S':
# S-band
a_lim = 1.8e-4
p_lim = 0.018
else:
# X-Band
a_lim = 1.8e-4
p_lim = 0.072
else:
# C-band
a_lim = 1.8e-4
p_lim = 0.036
@@ -102,6 +116,16 @@ amplt_step = 0.049999 * amplt_sat
scan_result = ascan((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,mv_vsum_jit_amplt,mv_vsum_jit_phase), ( amplt_m10, -170.0), (amplt_sat, 180.0), (amplt_step, 10.0) , latency=latency, title="Jitter Scan", zigzag=False)
# adjust plot ranges for the color bar to be always the same
i=0
for p in get_plots("Jitter Scan"):
if i % 2 == 0:
p.setScale(0.0, a_lim)
else :
p.setScale(0.0, p_lim)
i += 1
time.sleep(1.0)
#################################################################################
# close all PVs
@@ -209,33 +233,7 @@ kly_jit_phase = all_statistics_calc(scan_result.getReadable(7))
vsum_jit_amplt = all_statistics_calc(scan_result.getReadable(8))
vsum_jit_phase = all_statistics_calc(scan_result.getReadable(9))
# define plot range limits dependant on the staation type
if SECTION[1] == 'I':
if SECTION[3] == 'S':
# S-band
a_lim = 1.8e-4
p_lim = 0.018
else:
# X-Band
a_lim = 1.8e-4
p_lim = 0.072
else:
# C-band
a_lim = 1.8e-4
p_lim = 0.036
#a_lim = 5.0e-4
#p_lim = 0.04
# adjust plot ranges for the color bar to be always the same
i=0
for p in get_plots("Jitter Scan"):
if i % 2 == 0:
p.setScale(0.0, a_lim)
else :
p.setScale(0.0, p_lim)
i += 1
#Setting attributes to the scan group
path = get_context().group
@@ -255,6 +253,68 @@ set_attribute(path, "kly_jit_phase", kly_jit_phase)
"""
set_attribute(path, "HVPS", hvps)
set_attribute(path, "RF Rate", rfrate)
set_attribute(path, "Saturation Power", satpower)
#################################################################################
# New overview plot of the results
[pya]=plot([None,],["summary_amplt_jit"], title="Results Overview AMPLITUDE jitter")
#Y error plot
pya.setStyle(py.Style.ErrorY)
pya.setLegendVisible(True)
sy1 = LinePlotErrorSeries("F1")
pya.addSeries(sy1)
sy1.setLinesVisible(False)
sy1.appendData(1.0, ref_jit_amplt.mean, ref_jit_amplt.min, ref_jit_amplt.max)
sy1.appendData(2.0, iqm_jit_amplt.mean, iqm_jit_amplt.min, iqm_jit_amplt.max)
sy1.appendData(3.0, pre_jit_amplt.mean, pre_jit_amplt.min, pre_jit_amplt.max)
sy1.appendData(4.0, kly_jit_amplt.mean, kly_jit_amplt.min, kly_jit_amplt.max)
sy1.appendData(5.0, vsum_jit_amplt.mean, vsum_jit_amplt.min, vsum_jit_amplt.max)
m=pya.addMarker(1.0, pya.AxisId.X, "REF",pya.background)
m.setLabelPaint(Color.BLACK)
m=pya.addMarker(2.0, pya.AxisId.X, "IQM",pya.background)
m.setLabelPaint(Color.BLACK)
m=pya.addMarker(3.0, pya.AxisId.X, "PRE",pya.background)
m.setLabelPaint(Color.BLACK)
m=pya.addMarker(4.0, pya.AxisId.X, "KLY",pya.background)
m.setLabelPaint(Color.BLACK)
m=pya.addMarker(5.0, pya.AxisId.X, "VSUM",pya.background)
m.setLabelPaint(Color.BLACK)
[pyp]=plot([None,],["summary_phase_jit"], title="Results Overview PHASE jitter")
#Y error plot
pyp.setStyle(py.Style.ErrorY)
pyp.setLegendVisible(True)
sy1 = LinePlotErrorSeries("F1")
pyp.addSeries(sy1)
sy1.setLinesVisible(False)
sy1.appendData(1.0, ref_jit_phase.mean, ref_jit_phase.min, ref_jit_phase.max)
sy1.appendData(2.0, iqm_jit_phase.mean, iqm_jit_phase.min, iqm_jit_phase.max)
sy1.appendData(3.0, pre_jit_phase.mean, pre_jit_phase.min, pre_jit_phase.max)
sy1.appendData(4.0, kly_jit_phase.mean, kly_jit_phase.min, kly_jit_phase.max)
sy1.appendData(5.0, vsum_jit_phase.mean, vsum_jit_phase.min, vsum_jit_phase.max)
m=pyp.addMarker(1.0, pyp.AxisId.X, "REF",pyp.background)
m.setLabelPaint(Color.BLACK)
m=pyp.addMarker(2.0, pyp.AxisId.X, "IQM",pyp.background)
m.setLabelPaint(Color.BLACK)
m=pyp.addMarker(3.0, pyp.AxisId.X, "PRE",pyp.background)
m.setLabelPaint(Color.BLACK)
m=pyp.addMarker(4.0, pyp.AxisId.X, "KLY",pyp.background)
m.setLabelPaint(Color.BLACK)
m=pyp.addMarker(5.0, pyp.AxisId.X, "VSUM",pyp.background)
m.setLabelPaint(Color.BLACK)