Skip to content
Snippets Groups Projects
Commit 5cc38f55 authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

[Fix] WakePotential.reference_loss sign for dipolar wake

Fix TD calculation for transverse dipolar wakes due to sign change in the 31/08/2021 commit.
parent 5e588ea9
No related branches found
No related tags found
No related merge requests found
......@@ -507,12 +507,14 @@ class WakePotential(Element):
for wake_type in self.types:
tau0, Wp = self.get_wakepotential(bunch, wake_type)
profile0 = getattr(self, "profile0_" + wake_type)
factorTD = -1*np.trapz(Wp*profile0, tau0)
factorTD = np.trapz(Wp*profile0, tau0)
if wake_type == "Wlong":
factorTD *= -1
if wake_type == "Wxdip":
factorTD = factorTD / bunch["x"].mean()
factorTD /= bunch["x"].mean()
if wake_type == "Wydip":
factorTD = factorTD / bunch["y"].mean()
factorTD /= bunch["y"].mean()
Z = getattr(self.wakefield, "Z" + wake_type[1:])
sigma = bunch['tau'].std()
......
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