Skip to content

Updated BBA2 algo - #346

Open
JeanLucPons wants to merge 4 commits into
mainfrom
update-bba2-algo
Open

Updated BBA2 algo#346
JeanLucPons wants to merge 4 commits into
mainfrom
update-bba2-algo

Conversation

@JeanLucPons

@JeanLucPons JeanLucPons commented Aug 12, 2026

Copy link
Copy Markdown
Member

This PR switches to a more standard BBA algorithm (still model dependent).
With optional optimum checking.

Below a part of the review done by Claude AI. This was discussed with @swhite2401 and this is the behavior we want.
The idea is to let more flexibility to the user to redo a scan after eventually applying offset and correcting the orbit in order to reduce systematic error. It is easy to the user to check if the optimum steerer value is inside or outside [-dk0h, dk0h].

Design tradeoff, not a bug: the new fixed sweep assumes the true offset lies within the configured [-dk0h, dk0h] range, whereas the old adaptive algorithm could walk outward if the initial guess was off. That's a reasonable simplification for a "more standard" algorithm, but it does put more weight on hcorr_delta/vcorr_delta being well-chosen — might be worth a docstring note or a sanity check/warning if the fit result falls outside the measured step range (the old code had a don't rely on extrapolation comment/check that doesn't appear to have an equivalent here anymore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant