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

Add R_factor calculation to BeamLoadingEquilibrium

parent 484a22ad
No related branches found
No related tags found
1 merge request!13v0.7.0
...@@ -69,7 +69,7 @@ class BeamLoadingEquilibrium(): ...@@ -69,7 +69,7 @@ class BeamLoadingEquilibrium():
self.N = N self.N = N
self.z0 = np.linspace(self.B1, self.B2, self.N) self.z0 = np.linspace(self.B1, self.B2, self.N)
self.tau0 = self.z0/c self.tau0 = self.z0/c
self.rho0 = gaussian_bunch(self.tau0, self.ring.sigma_0) self.rho0 = gaussian_bunch(self.tau0, self.ring.sigma_0)/c
# Define constants for scaled potential u(z) # Define constants for scaled potential u(z)
self.u0 = self.ring.U0 / (self.ring.ac * self.ring.sigma_delta**2 * self.u0 = self.ring.U0 / (self.ring.ac * self.ring.sigma_delta**2 *
...@@ -394,3 +394,9 @@ class BeamLoadingEquilibrium(): ...@@ -394,3 +394,9 @@ class BeamLoadingEquilibrium():
(2 * np.pi * HC.m**2 * self.F[1] * self.ring.h * I0 * f)) (2 * np.pi * HC.m**2 * self.F[1] * self.ring.h * I0 * f))
return (eta, RQth, f) return (eta, RQth, f)
@property
def R_factor(self):
rho0 = gaussian_bunch(self.tau0, self.ring.sigma_0)/c
R = trapz(rho0**2, self.tau0)/trapz(self.rho0**2, self.tau0)
return R
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