From 438e77478b40412795eca17c0dfd5b0ab61b3b36 Mon Sep 17 00:00:00 2001 From: Gamelin Alexis <gamelin@synchrotron-soleil.fr> Date: Tue, 22 Dec 2020 19:00:42 +0100 Subject: [PATCH] Bugfix : WakePotential Remove part which was causing "damping". We have to re-process the wake function at each track call and not to reuse the previously processed wake function --- tracking/wakepotential.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tracking/wakepotential.py b/tracking/wakepotential.py index 444309b..06bf737 100644 --- a/tracking/wakepotential.py +++ b/tracking/wakepotential.py @@ -196,15 +196,10 @@ class WakePotential(Element): Wake function array in [V/C] or [V/C/m]. """ - - try: - tau0 = getattr(self, "tau0_" + wake_type) - dtau0 = getattr(self, "dtau0_" + wake_type) - W0 = getattr(self, "W0_" + wake_type) - except AttributeError: - tau0 = np.array(getattr(self.wakefield, wake_type).data.index) - dtau0 = tau0[1] - tau0[0] - W0 = np.array(getattr(self.wakefield, wake_type).data["real"]) + + tau0 = np.array(getattr(self.wakefield, wake_type).data.index) + dtau0 = tau0[1] - tau0[0] + W0 = np.array(getattr(self.wakefield, wake_type).data["real"]) # Keep only the wake function on the rho window ind = np.all([min(tau[0], 0) < tau0, max(tau[-1], 0) > tau0], -- GitLab