Conversation
There was a problem hiding this comment.
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
update actions/upload-artifact version v2 to v4
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.