ParameterSummaryFunctions#
Functions
calcuate the contribution to the radiation integrals of a Wiggler. |
|
Print out various parameters of the current AT lattice |
|
Computes and displays global information |
|
Print out various parameters of the current AT lattice |
|
calculates linear optics functions for an UNCOUPLED transport line |
|
calculates linear optics functions for an UNCOUPLED ring |
- RadIntegrals()#
- calcuate the contribution to the radiation integrals of a Wiggler.Wigidx is index of insertion devicesA.Mash’al, Iranian Light Source Facility, 2018-07-30
- atsummary()#
- Print out various parameters of the current AT latticeatsummary() Print parameters of the global variable THERINGatsummary(ring) Print parameters of RING. RING may be 4D or 6Datsummary(…,’dp’,dp) Specify off-momentum. For off-momentum lattices,the equilibrium emittance and energy spread will not be computedbecause the quadrupole contribution is missing.atsummary(…,’dct’,dct) Specify the path lengtheningatsummary(…,’df’,df) Specify the RF frequency deviationringparams=atsummary(…) Return the results in a structure instead ofprinting themringparams=atsummary(…,’display’) Restore the printout of parametersThe parameters that come after the Synchrotron Integrals areparameters that depend on the Integrals themselves. The equations tocalculate them were taken from [1].[1] Alexander Wu Chao and Maury Tigner, Handbook of Accelerator Physicsand Engineering (World Scientific, Singapore, 1998), pp. 183-187. (or187-190 in ed. 2)See also
atx()
,ringpara()
- atx(ring)#
- Computes and displays global informationbeamdata=atx(ring) Computes linear optics, equilibrium emittances and damping timesRING: Ring description. If RING is 6D, it is used in OHMIENVELOPE anda 4D copy may be used for linear optics computation.If RING is 4D, a 6D copy with default options is used forOHMIENVELOPEbeamdata=atx(ring,dp,refpts)beamdata=atx(ring,refpts)Specify the points of interest (Default: 1:length(RING)+1)beamdata=atx(ring,dp,…)beamdata=atx(ring,…,’dp’,dpp)Specify the momentum deviation (Default: 0)beamdata=atx(ring,…,’dct’,dct)Specify the path lengtheningbeamdata=atx(ring,…,’df’,df)Specify the RF frequency deviation from nominalbeamdata=atx(ring,…,’method’,opticsfun)Specify the method for linear optics. Default: @atlinopt6Allowed values are @atlinopt2, @atlinopt4, @atlinopt6beamdata=atx(ring,…,’6d’)By default, linear optics is computed with the 4d version of the lattice.If method is @atlinopt6 (the default), when specifying ‘6d’ the opticsis computed from the 6d version of the lattice.ELEMDATA is a MATLAB structure array as long as the numver of refpointswith fields:From atlinopt:ElemIndex - ordinal position in the RINGSPos - longitudinal position [m]ClosedOrbit - closed orbit column vector withcomponents x, px, y, py (momentums, NOT angles)Dispersion - dispersion orbit position vector withcomponents eta_x, eta_prime_x, eta_y, eta_prime_ycalculated with respect to the closed orbit withmomentum deviation DPM - 4x4 transfer matrix M from the beginning of RINGto the entrance of the element for specified DP [2]mu - [ mux, muy] horizontal and vertical betatron phasebeta - [betax, betay] vectoralpha - [alphax, alphay] vectorOther fields depend on the selected optics method, @atlinopt4 or@atlinopt6From ohmienvelope:beam66 - 6x6 equilibrium beam matrixemit66 - 6x6 emittance projections on x-x’, y-y’ and energy spreadbeam44 - intersection of beam66 with dpp=0 (monochromatic beam)emit44 - emittances of the projections of beam44 on x and ymodemit - emittance of the 3 eigenmodes[elemdata,ringdata]=atx(…) Returns also a structure RINGDATAwith fields:ll - Circumferencealpha - momentum compaction factorfractunesfulltunesnuh - Tunesnuvchromaticitydampingtimeespread - Energy spreadblength - Bunch lengthenergyfs - synchrotron frequencyeloss - energy loss/turnsynchrophase- synchronous phasemodemittance- Eigen emittancesmomcompact - momentum compaction factorThe following options are kept for backwards compatibility but aredeprecated:beamdata=atx(ring,dpp,refpts,radring,radindex,cavindex)Radiation must be turned on for emittance computation. This is done bydefault using the ATRADON function with default arguments. If this is notdesired, this syntax allows to explicitly enter the radiative latticebeamdata=atx(ring,dpp,refpts,radfunction)RADFUNCTION is substituted to ATRADON to provide the radiative latticeand indices, in the form:[RADRING,RADINDEX,CAVINDEX]=RADFUNCTION(RING)
- ringpara()#
- Print out various parameters of the current AT latticeringpara() Print parameters of the global variable THERINGringpara(ring) Print parameters of RING. RING may be 4D or 6Dringpara(ring,u0,…) Supply the total radiation loss in MeVringpara(…,’dp’,dp) Specify off-momentum For off-momentum lattices,the equilibrium emittance and energy spread will not be computedbecause the quadrupole contribution is missing.ringpara(…,’dct’,dct) Specify the path lengtheningringpara(…,’df’,df) Specify the RF frequency deviationringparams=ringpara(…) Return the results in a structure instead ofprinting themSee also
atx()
,atsummary()
- twissline(lattice, dp, twissdatain)#
- calculates linear optics functions for an UNCOUPLED transport linetwissdata = twissline(lattice,dp,twissdatain) propagates twissparameters and closed orbit coordinates from the LINE entrancegiven by TWISSDATAIN assuming constant energy deviation DP.TWISSDATAIN is a 1-by-1 structure with the same field namesas the return argument. (See below)!!! IMPORTANT: Since twissline does not search for closed orbitits value at the entrance must be supplied in theClosedOrbit field of TWISSDATAIN structure.twissdata = twissline(lattice,dp,twissdatain,refpts) calculates Twiss parametersand closed orbit coordinates at specified reference points REFPTSNote: REFPTS is an array of increasing indexes thatselect elements from range 1 to length(LATTICE)+1.See further explanation of REFPTS in the ‘help’ for FINDSPOStwissdata = twissline(…,’chrom’, ddp) also calculateslinear dispersion. Dispersion is returned as oneof the fields in TwissData.!!! Last argument DDP is a momentum deviation on topof DP (the second argument) used to calculate and normalizedispersion. If not suppliedthe default value of 1e-8 is used.TwisData is a 1-by-REFPTS (1-by-1 if no REFPTS specified) structure array with fields:ElemIndex - integer (element number) in the LINESPos - longitudinal position [m]ClosedOrbit - closed orbit column vector withcomponents x, px, y, py (momentums, NOT angles)Dispersion - dispersion orbit position 4-by-1 vector withcomponents [eta_x, eta_prime_x, eta_y, eta_prime_y]’calculated with respect to the closed orbit withmomentum deviation DPM44 - 4x4 transfer matrix M from the beginning of LINEto the entrance of the element for specified DP [2]beta - [betax, betay] horizontal and vertical Twiss parameter betaalpha - [alphax, alphay] horizontal and vertical Twiss parameter alphamu - [mux, muy] horizontal and vertical betatron phase!!! NOT 2*PI normalizedUse CAT to get the data from fields of TwissData into MATLAB arrays.Example:>> TD = twissring(THERING,0,1:length(THERING));>> BETA = cat(1,TD.beta);>> S = cat(1,TD.SPos);>> plot(S,BETA(:,1))
- twissring(lattice, dp)#
- calculates linear optics functions for an UNCOUPLED ring[twissdata, tune] = twissring(lattice,dp) calculates twiss parametersand closed orbit coordinates at the RING entrance assumingconstant energy deviation DP.[twissdata, tune] = twissring(lattice,dp,refpts) calculates Twiss parametersand closed orbit coordinates at specified reference points REFPTS.Note: REFPTS is an array of increasing indexes thatselect elements from range 1 to length(LATTICE)+1.See further explanation of REFPTS in the ‘help’ for FINDSPOS[twissdata, tune, chrom] = twissring(…,’chrom’, ddp) also calculateslinear dispersion and chromaticity. Dispersion is returned as oneof the fields in TwissData.!!! Last argument DDP is a momentum deviation on topof DP (the second argument) used to calculate and normalizedispersion and chromaticity. If not suppliedthe default value of 1e-8 is used.Note: To resolve the integer part of the tuneand the uncertainty of acos(trace(M)/2) it is necessary tosupply sufficient number of REFPTS properly spaced in betatron phase.TwisData is a 1-by-REFPTS (1-by-1) structure array with fields(Some are the same as in the output of LINOPT)ElemIndex - integer (element number) in the RINGSPos - longitudinal position [m]ClosedOrbit - closed orbit column vector withcomponents x, px, y, py (momentums, NOT angles)Dispersion - dispersion orbit position 4-by-1 vector withcomponents [eta_x, eta_prime_x, eta_y, eta_prime_y]’calculated with respect to the closed orbit withmomentum deviation DPM44 - 4x4 transfer matrix M from the beginning of RINGto the entrance of the element for specified DP [2]beta - [betax, betay] horizontal and vertical Twiss parameter betaalpha - [alphax, alphay] horizontal and vertical Twiss parameter alphamu - [mux, muy] horizontal and vertical betatron phase!!! NOT 2*PI normalizedUse MATLAB function CAT to get the data from fields of TwissData into MATLAB arrays.Example:>> td = twissring(thering,0,1:length(thering));>> BETA = cat(1,TD.beta);>> S = cat(1,TD.SPos);>> plot(S,BETA(:,1))