at.collective.beam_loading#
Functions
|
Function to add beam loading to a cavity element, the cavity element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator |
|
Function to remove beam loading from a cavity element, the beam loading element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator |
Classes
|
An enumeration. |
|
Class to generate a beamloading element, inherits from Element additional argument are ring, cavity, qfactor, rshunt |
- class BeamLoadingElement(family_name, length, voltage, frequency, ring, qfactor, rshunt, mode=BLMode.PHASOR, **kwargs)[source]#
Bases:
RFCavity,CollectiveClass to generate a beamloading element, inherits from Element additional argument are ring, cavity, qfactor, rshunt
- Parameters:
- Keyword Arguments:
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
mode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
- Returns:
bl_elem (Element) – beam loading element
- static build_from_cav(cav, ring, qfactor, rshunt, mode=BLMode.PHASOR, **kwargs)[source]#
Function to build the BeamLoadingElement from a cavity the FamName, Length, Voltage, Frequency and HarmNumber are taken from the cavity element
- Parameters:
- Keyword Arguments:
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
mode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
- Returns:
bl_elem (Element) – beam loading element
- property ResFrequency#
Resonator frequency
- property Vbeam#
Beam phasor (amplitude, phase)
- property Vbunch#
Bunch phasor (amplitude, phase)
- property Vcav#
Cavity phasor (amplitude, phase)
- property Vgen#
Generator phasor (amplitude, phase)
- default_pass = {False: 'DriftPass', True: 'BeamLoadingCavityPass'}#
- add_beamloading(ring, qfactor, rshunt, cavpts=None, copy=False, **kwargs)[source]#
Function to add beam loading to a cavity element, the cavity element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator
- Parameters:
- Keyword Arguments:
cavpts (Refpts) – refpts of the cavity. If None (default) apply to all cavity in the ring
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
mode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
copy – If True, returns a shallow copy of ring with new beam loading elements. Otherwise, modify ring in-place
- remove_beamloading(ring, cavpts=None, copy=False)[source]#
Function to remove beam loading from a cavity element, the beam loading element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator
- Parameters:
ring – Lattice object
- Keyword Arguments:
cavpts (Refpts) – refpts of the beam loading Elements. If None (default) apply to all elements
copy – If True, returns a shallow copy of ring with new cavity elements. Otherwise, modify ring in-place