This commit is contained in:
voulot_d
2017-08-15 15:11:45 +02:00
parent ef416da30d
commit 77efdf64fe
4 changed files with 48 additions and 33 deletions
+11 -10
View File
@@ -2,7 +2,7 @@ import ch.psi.pshell.epics.Positioner as Positioner
import ch.psi.pshell.epics.ChannelDouble as ChannelDouble
dry_run = True
do_elog = FalseTrue
do_elog = True
if get_exec_pars().source == CommandSource.ui:
station = "STEST01"
@@ -71,15 +71,16 @@ try:
(fit_amplitude, fit_phase_deg, fit_offset, ph_crest, fit_x, fit_y) = hfitoff(energy , rf_phase)
except:
raise Exception("Fit failure")
plt = plot([energy, fit_y], ["data", "fit"], [rf_phase, fit_x])
#plt = plot(None,name="data")[0]
#plt.getSeries(0).setData(to_array(rf_phase,'d'), to_array(energy,'d'))
#plt.getSeries(0).setPointSize(8)
#plt.getSeries(0).setLinesVisible(False)
#plt.addSeries(LinePlotSeries("fit"))
#plt.getSeries(1).setData(fit_x, fit_y)
#plt.getSeries(1).setPointsVisible(False)
#plt.setLegendVisible(True)
#plt = plot([energy, fit_y], ["data", "fit"], [rf_phase, fit_x])[0]
plt = plot(None,name="data")[0]
plt.getSeries(0).setData(to_array(rf_phase,'d'), to_array(energy,'d'))
plt.getSeries(0).setPointSize(8)
plt.getSeries(0).setLinesVisible(False)
plt.addSeries(LinePlotSeries("fit"))
plt.getSeries(1).setData(fit_x, fit_y)
plt.getSeries(1).setPointsVisible(False)
plt.setLegendVisible(True)
caput(station + "-RSYS:GET-ONCREST-VSUM-PHASE", ph_crest)
caput(station + "-RSYS:GET-ONCREST-E-GAIN", fit_amplitude)
caput(station + "-RSYS:GET-FIT-PHASE-ARRAY", fit_x)