TuneAndChromaticity#
Functions
get the tune value from turn by turn positions |
|
fits chromaticity of THERING using 2 sextupole families |
|
fits linear tunes of THERING using 2 quadrupole families |
|
Calculates the tune from interpolated FFT of the trajectory. |
|
computes linear tunes and chromaticities |
- findtune(pos, method)#
- get the tune value from turn by turn positionstune=findtune(pos,method)POS: Tune-by-turn particle positionMETHOD: Method for tune determination:1: Highest peak in fft2: Interpolation on fft results3: Windowing + interpolation[tune,spectrum]=findtune(…) Also returns the fft
- fitchrom2(newchrom, sextupolefamily1, sextupolefamily2)#
- fits chromaticity of THERING using 2 sextupole familiesfitchrom2(newchrom,sextupolefamily1,sextupolefamily2)
- fittune2(newtunes, quadfamily1, quadfamily2)#
- fits linear tunes of THERING using 2 quadrupole familiesfittune2(newtunes,quadfamily1,quadfamily2)[dk, jinv] = fittune2(newtunes,quadfamily1,quadfamily2)
- intfft(x)#
- Calculates the tune from interpolated FFT of the trajectory.intfft(x) X must be a column vector.If X is a matrix - each column is treated asa separate trajectoryintfft(x,guess,delta) searches for peaks in the FFT spectrumonly within the range (X-DELTA … X+DELTA)The same values of GUESS and DELTA are used for all columns of X
- tunechrom(ring)#
- computes linear tunes and chromaticitiestune=tunechrom(ring) Quick calculation of the fractional part of the tunefrom numerically computed transfer matrix.[tune, chrom] = tunechrom(ringd,dp,’get_chrom’) - optionally computes thechromaticities by numerical differentiation from the difference betweentune values at momentums DP+0.5*DPStep and DP-0.5*DPStep**[…]=tunechrom**(…,’orbit’,ORBITIN Do not search for closed orbit.Instead ORBITIN,a 6x1 vector of initial conditions is used:This syntax is useful to avoid recomputing the closed orbit if isalready known;[…]=tunechrom(ring,dp) (obsolete)[…]=tunechrom(ring,…,’dp’,dp) Specify the momentum deviation whenradiation is OFF (default: 0)[…]=tunechrom(ring,…,’dct’,dct) Specify the path lengthening whenradiation is OFF (default: 0)[…]=tunechrom(ring,…,’df’,df) Specify the RF frequency deviation whenradiation is OFF (default: 0)Note: tunechrom computes tunes and chromaticities from the one-turntransfer matrix. The transfer matrix is computed from tracking usingnumerical differentiation. The error of numerical differentiationis sensitive to the step size. (Reference: Numerical Recipes)The calculation of tunes involves one numerical differentiation.The calculation of chromaticity involves TWO!!! numerical differentiations.The error in calculated chromaticity from may be substantial (~ 1e-5).Use the XYStep and DPStep keyword arguments to control the step sizein chromaticity calculationsSee also
atlinopt6()