Skip to content
Snippets Groups Projects
Commit f240073a authored by Gamelin Alexis's avatar Gamelin Alexis
Browse files

Fix WakePotential

Remove mean of tau array during wake function interpolation to avoid wrong interpolation if tau is not centered on zero
parent 60325b95
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ class WakePotential(Element):
W0 = getattr(self.wakefield, wake_type).data["real"]
interp_func_W0 = interp1d(tau0, W0, fill_value=0,
bounds_error=False)
W = interp_func_W0(self.tau)
W = interp_func_W0(self.tau - np.mean(self.tau))
if wake_type == "Wlong" or wake_type == "Wxquad" or wake_type == "Wyquad":
Wp = signal.convolve(self.rho, W*-1, mode='same')*self.dtau
elif wake_type == "Wxdip":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment