Script execution
This commit is contained in:
+1
-1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user