From 5ed537ebc796ecd820e888f1649c21495cfec76f Mon Sep 17 00:00:00 2001 From: Claudio Scafuri <claudio.scafuri@elettra.eu> Date: Tue, 3 Jan 2023 10:15:07 +0100 Subject: [PATCH] some ideas stolen from the cloud --- orbcorrsnippet.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 orbcorrsnippet.py diff --git a/orbcorrsnippet.py b/orbcorrsnippet.py new file mode 100644 index 0000000..ceb25a9 --- /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 + + -- GitLab