diff --git a/mbtrack2/tracking/particles.py b/mbtrack2/tracking/particles.py index 5b973d14ecb43a02663fde0238d9da86c68d2cd6..395de32462c2d3a0692a8ec2ff88ab9ede3eac81 100644 --- a/mbtrack2/tracking/particles.py +++ b/mbtrack2/tracking/particles.py @@ -299,6 +299,9 @@ class Bunch: """ Return the average Courant-Snyder invariant of each plane. + To get non-zero longitudinal Courant-Snyder invariant, the longitudinal + Twiss parameters need to be computed using the ring.get_longitudinal_twiss + method. """ Jx = ((self.ring.optics.local_gamma[0] * self["x"]**2) + (2 * self.ring.optics.local_alpha[0] * self["x"]) * self["xp"] + diff --git a/mbtrack2/tracking/synchrotron.py b/mbtrack2/tracking/synchrotron.py index c357198ac9043086bab53c92ec19d329fe606ee5..e9df8ffe23882de2af3d7631588201c77f9b70bc 100644 --- a/mbtrack2/tracking/synchrotron.py +++ b/mbtrack2/tracking/synchrotron.py @@ -459,17 +459,18 @@ class Synchrotron: Harmonics of the cavities to consider. Default is None. add : bool, optional - If True, - + If True, add the computed longitudinal Twiss parameters as class + arguements. + Usage ----- - - If a single voltage value is given, assume a single RF system set at + - If a single voltage value is given, assume a single RF system set at the synchronous phase. - - If a single pair of voltage/phase value is given, assume a single RF + - If a single pair of voltage/phase value is given, assume a single RF system at this setting. - - Otherwise, compute the synchrotron tune for a multi-harmonic RF + - Otherwise, compute the synchrotron tune for a multi-harmonic RF system. - + Returns ------- tuneS : float