diff --git a/orbcorrsnippet.py b/orbcorrsnippet.py new file mode 100644 index 0000000000000000000000000000000000000000..ceb25a918ffc47bd8bbbe2cb7de9f0271d4d9303 --- /dev/null +++ b/orbcorrsnippet.py @@ -0,0 +1,11 @@ +quads = ring0.get_refpts(at.Quadrupole]) +bpms = ring0.get_refpts(at.Monitor) + +rm = LinoptResponseMatrix(ring0, bpms, quads, ['beta', 'mu', 'dispersion'], [[0, 1], [0, 1], 0], fit_tune=True, obsw=[1.0, 1.0, 1000.0]) +rm.compute_fullrm(ring0, use_mp=True) +target, _ = rm.get_vals(ring0) +dk, exp = rm.correct(ring_err, target, apply_correction=True) + +#Warning!!! for this to work ring and ring_err MUST have the same element sequence because variables and observables are based on their refpts + +