Files
x11ma/script/test/test_autofocus.py
gac-x11ma 0f8956cafe
2025-09-03 16:52:53 +02:00

11 lines
325 B
Python

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)