Bayesian approach for linear optics correction

With a Bayesian approach, the linear optics correction algorithm for storage rings is revisited. Starting from the Bayes' theorem, a complete linear optics model is simplified as "likelihood functions" and "prior probability distributions". Under some assumptions, the least square algorithm and then the Jacobian matrix approach can be re-derived. The coherence of the correction algorithm is ensured through specifying a self-consistent regularization coefficient to prevent overfitting. Optimal weights for different correction objectives are obtained based on their measurement noise level. A new technique has been developed to resolve degenerated quadrupole errors when observed at a few select BPMs. A necessary condition of being distinguishable is that their optics response vectors seen at these specific BPMs should be near-orthogonal.