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

Add synchrotron_tune method to Synchrotron class

parent 9ca25437
Branches
Tags
No related merge requests found
......@@ -69,6 +69,11 @@ class Synchrotron:
Momentum compaction.
sigma : array of shape (4,)
RMS beam size at equilibrium in [m].
Methods
-------
synchrotron_tune(Vrf)
Compute synchrotron tune from RF voltage.
"""
def __init__(self, h, optics, particle, **kwargs):
self._h = h
......@@ -230,4 +235,23 @@ class Synchrotron:
self.optics.local_dispersion[2]**2*self.sigma_delta)**0.5
sigma[3] = (self.emit[1]*self.optics.local_alpha[1] +
self.optics.local_dispersion[3]**2*self.sigma_delta)**0.5
return sigma
\ No newline at end of file
return sigma
def synchrotron_tune(Vrf):
"""
Compute synchrotron tune from RF voltage
Parameters
----------
Vrf : float
Main RF voltage in [V].
Returns
-------
tuneS : float
Synchrotron tune.
"""
phase = np.pi - np.arcsin(ring.U0 / Vrf)
tuneS = np.sqrt( - (Vrf / ring.E0) * (ring.h * ring.ac) / (2*np.pi)
* np.cos(phase) )
return tuneS
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment