From 59218f3ccf071fc13a3c4c0f759cf3ef497a28ef Mon Sep 17 00:00:00 2001 From: sfop Date: Tue, 4 Jul 2017 12:10:13 +0200 Subject: [PATCH] Closedown --- plugins/SchottkyScan.java | 2 ++ script/RFscan/SchottkyScan.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/SchottkyScan.java b/plugins/SchottkyScan.java index de0bc39..9d8fb8e 100644 --- a/plugins/SchottkyScan.java +++ b/plugins/SchottkyScan.java @@ -32,6 +32,8 @@ public class SchottkyScan extends Panel { initComponents(); setPersistedComponents(SwingUtils.getComponentsByType(panelPars, JSpinner.class)); buttonSet.setEnabled(false); + plot.setStyle(LinePlotJFree.Style.ErrorY); + } //Overridable callbacks diff --git a/script/RFscan/SchottkyScan.py b/script/RFscan/SchottkyScan.py index 3dedcd8..04577d9 100644 --- a/script/RFscan/SchottkyScan.py +++ b/script/RFscan/SchottkyScan.py @@ -1,7 +1,7 @@ import ch.psi.pshell.epics.Positioner as Positioner import ch.psi.pshell.epics.ChannelDouble as ChannelDouble -dry_run = False +dry_run = True if get_exec_pars().source == CommandSource.ui: start = -30.0 @@ -19,10 +19,12 @@ else: plt = args[5] if plt is not None: - plt.setStyle(plt.Style.ErrorY) + plt.clear() + #plt.setStyle(plt.Style.ErrorY) #Must be set by Plugin otherwise first scan is not shown plt.addSeries(LinePlotErrorSeries("Values")) plt.getAxis(plt.AxisId.X).setLabel("Gun Beam Phase (deg)") - plt.getAxis(plt.AxisId.Y).setLabel("SINEG01-DICT215:B1_CHARGE") + plt.getAxis(plt.AxisId.Y).setLabel("SINEG01-DICT215:B1_CHARGE") + if dry_run: bph = Positioner("Beam phase", "SINEG01-RSYS:SET-BEAM-PHASE-SIM", "SINEG01-RSYS:SET-BEAM-PHASE-SIM") @@ -52,9 +54,9 @@ rph.monitored=True rph0 = rph.read() #Record callback: uptate of output plot -def after_sample(record, scan): - if plt is not None: - plt.getSeries(0).appendData(record.positions[0], record.values[1].mean, record.values[1].stdev) +def after_sample(record, scan): + if plt is not None: + plt.getSeries(0).appendData(record.positions[0], record.values[1].mean, record.values[1].stdev) try: rph_averager = create_averager(rph, nb, 0.1) # Set polling time to -1 for BS data to get all messages