Files
x11ma/script/test/test_autofocus.py
gac-x11ma 5225f36124 Tilt scan
2021-04-27 10:47:50 +02:00

11 lines
325 B
Python
Executable File

RANGE = [1477.0, 1481.0]
STEP_SIZE = 0.1
SETTLING_TIME = 0.5
r=lscan (objective, image.contrast, RANGE[0], RANGE[1], STEP_SIZE, latency=(SETTLING_TIME + eiger.getExposure()))
(norm, mn, std )= fit (r["image_contrast"], r["objective"])
if (mn<RANGE[0] or mn>RANGE[1]):
raise Exception("Invalid fit")
objective.write(mn)