diff --git a/script/RFscan/GunScan.py b/script/RFscan/GunScan.py index c76d059..49f19f7 100644 --- a/script/RFscan/GunScan.py +++ b/script/RFscan/GunScan.py @@ -34,8 +34,8 @@ check_camtool() camtool.start("SINBD01-DSCR010") wait_camtool_message() -x = camtool.stream.getChild("gr_x_fit_mean") -dx = camtool.stream.getChild("gr_x_fit_standard_deviation") +x = camtool.stream.getChild("x_fit_mean") +dx = camtool.stream.getChild("x_fit_standard_deviation") try: xb = create_averager(x, nb, -1) # -1 event based, waits for the next value @@ -44,7 +44,7 @@ try: r = lscan(phase, [xb, dxb], start, stop, step , latency=lat) rf_phase = r.getPositions(0) E = [energy0 * (1 + val.mean / 1e6 / disp) for val in r.getReadable(0)] - dE = [energy0 * ( val.mean / 1e6 / disp) for val in r.getReadable(1)] + dE = [energy0 * ( val.mean / 1e6 / abs(disp)) for val in r.getReadable(1)] finally: phase.write(phase0) phase.close()