Skip to content

Conversation

@SebastienJoly
Copy link
Collaborator

Implementation of a modified Levenberg Marquardt method with the LOCO correction based on the SVD approach. Setting the LM_lambda argument to zero allows to retrieve the previous Gauss Newton implementation.
In addition, some minor name changes for clarity and some docstring.

elafmusa
elafmusa previously approved these changes Feb 26, 2025
Copy link
Collaborator

@elafmusa elafmusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested the modified LM method in LOCO to correct beta beating caused by strength errors of 1e-3 in all normal quadrupoles of the PETRA IV lattice. The function successfully returns fitting parameters that minimize the horizontal and vertical percentage RMS beta beating.

I have a few minor suggestions:

  • Renaming loco_correction_ng to loco_correction, or a similar name, since it now merges both NG and LM minimization methods.

  • Adding documentation on choosing the lambda parameter. For example, in the reference by X. Huang, a starting value of 0.001 is recommended and has been tested.

  • Adding a test to demonstrate the LM algorithm's application. After one iteration, the ORM is measured, and the chi-square between the model and measured ORM should be checked. Based on this, the lambda parameter should be adjusted, either increased (×10, as in X. Huang's reference) or decreased.

Best Regards
Elaf

@elafmusa elafmusa merged commit b3cf360 into master Feb 26, 2025
18 checks passed
@elafmusa elafmusa deleted the Levenberg-Marquardt_LOCO branch February 26, 2025 15:42
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.

3 participants