From b6b712a9747f9017ac5fb47162a3eb793aa4b1fe Mon Sep 17 00:00:00 2001 From: elafmusa <86475221+elafmusa@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:38:06 +0100 Subject: [PATCH] Update loco.py --- pySC/correction/loco.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pySC/correction/loco.py b/pySC/correction/loco.py index adc5fb0..8ce94be 100644 --- a/pySC/correction/loco.py +++ b/pySC/correction/loco.py @@ -66,8 +66,9 @@ def generating_quads_response_matrices(args): dx = twiss.dispersion[:, 0] dy = twiss.dispersion[:, 2] dispersion_meas = np.column_stack((dx, dy)) + C_measured = np.hstack((C_measured, ((dispersion_meas - dispersion_model) / correctors_kick).reshape(-1, 1))) SC.set_magnet_setpoints(quad_index, -dk, skewness, order, method) - return np.hstack((C_measured - C_model, ((dispersion_meas - dispersion_model) / correctors_kick).reshape(-1, 1))) + return C_measured - C_model def measure_closed_orbit_response_matrix(SC, bpm_ords, cm_ords, dkick=1e-5, includeDispersion=False): @@ -307,4 +308,4 @@ def plot_dispersion_err(ring, twiss, elements_indexes): dy = twiss_error.dispersion[:, 2] - twiss.dispersion[:, 2] plot_data(twiss_error.s_pos, dx, "s_pos [m]", r'$\Delta \eta_x$ [m]', "Horizontal dispersion error") - plot_data(twiss_error.s_pos, dy, "s_pos [m]", r'$\Delta \eta_y$ [m]', "Vertical dispersion error") \ No newline at end of file + plot_data(twiss_error.s_pos, dy, "s_pos [m]", r'$\Delta \eta_y$ [m]', "Vertical dispersion error")