Script execution

This commit is contained in:
2015-12-18 10:14:20 +01:00
parent 30adbe9381
commit b16311ebed
+1 -1
View File
@@ -31,7 +31,7 @@ axis_pos = axis.read()
result = lscan(axis, mono_beam, -dx, dx, 20, latency = 0.3, relative = True, context = None, before_read = None, after_read = None)
(ydata, xdata) = (result.getReadable(0), result.getPositions(0))
(norm, mean, sigma) = fit(ydata, xdata)
if (mean is not None) and (mean <= (axis_po + dx)) and (mean >= (axis_po - dx)):
if (mean is not None) and (mean <= (axis_pos + dx)) and (mean >= (axis_pos - dx)):
axis.move(mean)
else:
print 'fit failed - centering on maximum'