1313def attach_clean_buckets (rf_parameter_changing_method , rfsystems_instance ):
1414 '''Wrap an rf_parameter_changing_method (that changes relevant RF
1515 parameters, i.e. Kick attributes). Needs to be an instance method,
16- presumably an RFSystems instance.
16+ presumably an RFSystems instance (hence the self argument in
17+ cleaned_rf_parameter_changing_method).
1718 In detail, attaches a call to the rfsystems_instance.clean_buckets
1819 method after calling the wrapped function.
1920 '''
@@ -83,6 +84,7 @@ def p0_reference(self, value):
8384 def R (self ):
8485 return self .circumference / (2 * np .pi )
8586
87+ # should make use of eta functionality of LongitudinalMap at some point
8688 @property
8789 def eta0 (self ):
8890 return self .alpha0 - self .gamma_reference ** - 2
@@ -93,6 +95,9 @@ def beta_z(self):
9395
9496 @property
9597 def Qs (self ):
98+ """Neglects all other harmonics besides the maximum
99+ voltage one.
100+ """
96101 ix = np .argmax (self .V )
97102 V = self .V [ix ]
98103 h = self .h [ix ]
@@ -211,9 +216,17 @@ def hamiltonian(self, z, dp):
211216 + self .V_acc (z )) / self .p0_reference )
212217
213218 def H0_from_sigma (self , z0 ):
219+ """Pure estimate value of H_0 starting from a bi-Gaussian bunch
220+ in a linear "RF bucket". Intended for use by iterative matching
221+ algorithms in the generators module.
222+ """
214223 return np .abs (self .eta0 )* self .beta_reference * c * (z0 / self .beta_z )** 2
215224
216225 def H0_from_epsn (self , epsn ):
226+ """Pure estimate value of H_0 starting from a bi-Gaussian bunch
227+ in a linear "RF bucket". Intended for use by iterative matching
228+ algorithms in the generators module.
229+ """
217230 z0 = np .sqrt (epsn / (4. * np .pi ) * self .beta_z * e / self .p0_reference )
218231 return np .abs (self .eta0 )* self .beta_reference * c * (z0 / self .beta_z )** 2
219232
@@ -248,7 +261,6 @@ def make_is_accepted(self, margin):
248261 the returned is_accepted(z, dp) function is equivalent to
249262 self.is_in_separatrix(z, dp).
250263 """
251-
252264 def is_accepted (z , dp ):
253265 """ Returns boolean whether the coordinate (z, dp) is
254266 located inside the equihamiltonian defined by
0 commit comments