at.acceptance.touschek#
Module to compute the touschek lifetime of the ring
Functions
|
Haissinski equation solver |
|
Touschek lifetime calculation |
- get_bunch_length_espread(ring, zn=None, bunch_curr=None, espread=None)[source]#
Haissinski equation solver
Solves the Haissinski formula and returns the bunch length and energy spread for given bunch current and \(Z/n\). If both
znandbunch_currareNone, zero current case, otherwise both are needed for the calculation- Parameters:
ring – ring use for tracking
- Keyword Arguments:
zn=None – \(Z/n\) for the full ring
bunch_curr=None – Bunch current
espread=None – Energy spread, if
Noneuse lattice parameter
- Returns:
Bunch length, energy spread
- get_lifetime(ring, emity, bunch_curr, emitx=None, sigs=None, sigp=None, zn=None, momap=None, refpts=None, **kwargs)[source]#
Touschek lifetime calculation
Computes the touschek lifetime using the Piwinski formula
- Parameters:
ring – ring use for tracking
emity – verticla emittance
bunch_curr – bunch current
- Keyword Arguments:
emitx=None – horizontal emittance
sigs=None – rms bunch length
sigp=None – energy spread
zn=None – full ring \(Z/n\)
momap=None – momentum aperture, has to be consistent with
refptsif provided the momentum aperture is not calculatedrefpts=None –
refptswhere the momentum aperture is calculated, the default is to compute it for all elements in the ring,len(refpts)>2is requiredresolution – minimum distance between 2 grid points, default=1.0e-3
amplitude – max. amplitude for
RADIALandCARTESIANor initial step inRECURSIVEdefault = 0.1nturns=1024 – Number of turns for the tracking
dp=None – static momentum offset
grid_mode –
at.GridMode.CARTESIAN/RADIALtrack full vector (default).at.GridMode.RECURSIVE: recursive searchuse_mp=False – Use python multiprocessing (
patpass, default uselattice_pass). In case multi-processing is not enabledGridModeis forced toRECURSIVE(most efficient in single core)verbose=False – Print out some inform
epsrel (epsabs,) – integral absolute and relative tolerances
- Returns:
tl – touschek lifetime, double expressed in seconds
ma – momentum aperture (len(refpts), 2) array
refpts – refpts used for ma calcualtion (len(refpts), ) array