Skip to content

Make autofocus robust to changing optimal IL1 / ILS settings #224

@kferjaoui

Description

@kferjaoui

The autofocus currently initializes from fixed reference lens values (IL1, ILS) and searches within a narrow interval around them. If the true optimal focus has drifted, the routine can converge to a defocused solution.

Based on recent testing, it is reasonable to assume that the user brings the beam close to focus before triggering autofocus. As suggested by Tim, a first improvement is to initialize the autofocus from the current IL1 / ILS values read from the instrument, rather than from hard-coded defaults.

This should significantly improve robustness, while keeping the existing local search strategy unchanged. Further refinements (adaptive search ranges, fallback strategies) can be considered later if needed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions