Script execution

This commit is contained in:
sfop
2017-02-14 15:14:22 +01:00
parent 0a0a14aa94
commit b237ba6a09

View File

@@ -24,12 +24,12 @@ phase.config.resolution = 0.5
phase.initialize()
#camtool = Camtool("sflca:10000")
#camtool.startPipeline("simulated")
#camtool.startReceiver()
#x = camtool.getValue("x_com")
#dx = camtool.getValue("x_rms")
x = Channel("SINEG01-DSCR190:X-SIM", type = 'd', alias='SCR-X')
dx = Channel("SINEG01-DSCR190:DX-SIM", type = 'd', alias='SCR-DX')
camtool.start("simulated")
x = camtool.getValue("gr_x_fit_mean")
dx = camtool.getValue("gr_x_fit_standard_deviation")
#x = Channel("SINEG01-DSCR190:X-SIM", type = 'd', alias='SCR-X')
#dx = Channel("SINEG01-DSCR190:DX-SIM", type = 'd', alias='SCR-DX')
try:
@@ -43,12 +43,11 @@ finally:
phase.close()
# camtool.close()
print rf_phase
xx = [0.0, 30.0, 60.0, 90.0, 120.0, 150.0, 180.0]
print xx
p = plot(None,name="Phase scan")[0]
p.addSeries(LinePlotSeries("data"))
p.getSeries(0).setData(xx, E)
p.getSeries(1).setData(rf_phase, dE)
p = plot(None)[0]
p.clear()
p.addSeries(LinePlotSeries("Energy"))
p.addSeries(LinePlotSeries("Energy spread"))
p.getSeries(0).setData(to_array(rf_phase, 'd'), E)
p.getSeries(1).setData(to_array(rf_phase, 'd'), dE)
p.setLegendVisible(True)
#plot((E, dE), xdata = rf_phase, title="Phase scan")