Radiation#
Functions
Compute the radiation integrals in dipoles |
|
|
|
Compute the radiation integrals in EnergyLoss elements |
|
calculate radiation diffusion matrix of a wiggler element. |
|
Compute the radiation integrals in wigglers |
|
quantumDiff Compute the radiation-diffusion matrix |
|
switches radiation and cavity off |
|
switches RF and radiation on |
|
Gets the lattice energy |
|
Computes Energy loss per turn in eV . |
|
Obsolete: switches RF and radiation off |
|
Obsolete: switches RF and radiation on |
|
sets the Energy field in all elements. |
|
Scale magnet strengths |
|
Checks the presence of longitudinal motion in a lattice. |
|
Obsolete: check the radiation state of a ring |
|
calculate radiation diffusion matrix of a multipole element |
|
calculates equilibrium beam envelope in a |
|
Compute the radiation-diffusion matrix |
|
FIND |
|
FIND |
- DipoleRadiation()#
- Compute the radiation integrals in dipoles
- ElementRadiation()#
- - Compute the radiation integrals in dipolesand quadrupoles
- ElossRadiation(ring, lindata)#
- Compute the radiation integrals in EnergyLoss elements[i1,i2,i3,i4,i5] = ElossRadiation(ring,lindata)RING Lattice structureLINDATA Output of atlinopt for all lattice elements (not used)
- FDW(elem, orbit_in, energy)#
- calculate radiation diffusion matrix of a wiggler element.diff=FDW(elem,orbit_in,energy)ELEM: AT wiggler elementORBIT_IN: input closed orbitENERGY: ring energy [GeV]diff=FDW(elem,orbit_in)takes energy from the ‘Energy’ field of the elementfor use in Ohmi’s beam envelope formalism [1][1] K.Ohmi et al. Phys.Rev.E. Vol.49. (1994)See also
ohmienvelope()
- WigglerRadiation(ring, lindata)#
- Compute the radiation integrals in wigglers[i1,i2,i3,i4,i5] = WigglerRadiation(ring,lindata)RING Lattice structureLINDATA Output of atlinopt for all lattice elementsWigglerRadiation computes the radiation integrals for all wigglers withthe following approximations:- The self-induced dispersion is neglected in I4 and I5, but is is used asa lower limit for the I5 contributionI1, I2 are integrated analyticallyI3 is integrated analytically for a single harmonic, numerically otherwise
- atdiffmat(ring)#
- quantumDiff Compute the radiation-diffusion matrix[bcum,bs]=atdiffmat(ring)RING: Closed ring AT structure, containing radiative elements andRF cavity. Radiative elements are identified by aPassMethod ending with ‘RadPass’.BCUM: Cumulated diffusion matrixBS: Cumulative diffusion matrix at the beginning of each element[bcum,bs]=atdiffmat(ring,’orbit’,orbitin)ORBITIN: Initial 6-D closed orbit.In this mode, RING may be a section of a ring.
- atdisable_6d(ring, cavipass, bendpass, quadpass)#
- switches radiation and cavity off[newring,radindex,cavindex] = atdisable_6d(ring,cavipass,bendpass,quadpass)Changes passmethods to turn off cavities, radiation damping and allelements acting on the particle momentum.The default is to turn everything OFF.,INPUTS:1. RING initial AT structure2. CAVIPASS pass method for cavities‘’ makes no change,‘auto’ sets’IdentityPass’ or ‘DriftPass’ depending of cavity length)anything else is used as the new PassMethod.3. BENDPASS pass method for bending magnets‘’ makes no change,‘auto’ substitutes ‘RadPass’ with ‘Pass’ in any methodanything else is used as the new PassMethod.4. QUADPASS pass method for quadrupoles‘’ makes no change,‘auto’ substitutes ‘RadPass’ with ‘Pass’ in any methodanything else is used as the new PassMethod.[…] = atdisable_6d(…[,keyword,value]…)The following keywords trigger the processing of the following elements:‘allpass’ Defines the default pass method for all elements notexplicitly specified. Replaces the following defaultvalues.‘cavipass’ pass method for RF cavities. Default ‘auto’‘bendpass’ pass method for bending magnets. Default ‘auto’‘quadpass’ pass method for quadrupoles. Default ‘auto’‘sextupass’ pass method for sextupoles. Default ‘auto’‘octupass’ pass method for bending magnets. Default ‘auto’‘multipolepass’ pass method for multipole magnets. Default ‘auto’‘wigglerpass’ pass method for wigglers. Default ‘auto’‘quantdiffpass’ pass method for quantum diffusion. Default ‘auto’‘energylosspass’ pass method for atenergyloss element. Default ‘auto’‘simplequantdiffpass’ pass method for SimpleQuantDiff element. Default ‘auto’‘simpleradiationpass’ pass method for SimpleRadiation element. Default ‘auto’OUPUTS:1. NEWRING Output ring2. RADINDEX Indices of elements with radiation3. CAVINDEX Indices of active cavitiesEXAMPLES:>> ringrad=atdisable_6d(ring);Turns off all elements acting on momentum.>> ringrad=atdisable_6d(ring,’auto’,’allpass’,’’);Turns cavities off and leaves everything else unchanged.>> ringrad=atdisable_6d(ring,’allpass’,’auto’,’cavipass’,’’);Turns off everything except RF cavities.
- atenable_6d(ring, cavipass, bendpass, quadpass)#
- switches RF and radiation on[newring,radindex,cavindex] = atenable_6d(ring,cavipass,bendpass,quadpass)Changes passmethods to get RF cavity acceleration and radiationdamping.The default is to turn cavities ON and set radiation in dipoles,quadrupoles and wigglers.INPUTS:1. RING initial AT structure2. CAVIPASS pass method for cavities‘’ makes no change,‘auto’ set ‘RFCavityPass’,anything else is used as the new PassMethod.3. BENDPASS pass method for bending magnets‘’ makes no change,‘auto’ substitutes ‘Pass’ with ‘RadPass’ in any method,anything else is used as the new PassMethod.4. QUADPASS pass method for quadrupoles‘’ makes no change,‘auto’ substitutes ‘Pass’ with ‘RadPass’ in any method,anything else is used as the new PassMethod.[…] = atenable_6d(…,keyword,value)The following keywords trigger the processing of the following elements:‘allpass’ Defines the default pass method for all elements notexplicitly specified. Replaces the following defaultvalues.‘cavipass’ pass method for RF cavities. Default ‘auto’‘bendpass’ pass method for bending magnets. Default ‘auto’‘quadpass’ pass method for quadrupoles. Default ‘auto’‘sextupass’ pass method for sextupoles. Default ‘’‘octupass’ pass method for octupoles. Default ‘’‘multipolepass’ pass method for multipole magnets. Default ‘’‘wigglerpass’ pass method for wigglers. Default ‘auto’‘quantdiffpass’ pass method for quantum radiation. default ‘auto’‘energylosspass’ pass method for energyloss element. default ‘auto’‘simplequantdiffpass’ pass method for SimpleQuantDiff element. Default ‘auto’‘simpleradiationpass’ pass method for SimpleRadiation element. Default ‘auto’OUPUTS:1. NEWRING Output ring2. RADINDEX Indices of elements with radiation3. CAVINDEX Indices of active cavitiesEXAMPLES:>> ringrad=atenable_6d(ring);Turns cavities on and sets radiation in bending magnets, quadrupoles, energyloss elements, and wigglers (default)>> ringrad=atenable_6d(ring,’auto’,’allpass’,’’);Turns cavities on and leaves everything else unchanged>> ringrad=atenable_6d(ring,’allpass’,’’,’bendpass’,’auto’);Turns on radiation in bending magnets and leaves everything else unchanged
- atenergy(ring)#
- Gets the lattice energyenergy=atenergy(ring)[energy,periods]=atenergy(ring)[energy,periods,voltage,harmnumber]=atenergy(ring)[energy,periods,voltage,harmnumber,u0]=atenergy(ring)Warning: To get ENERGY, PERIODS and HARMNUMBER, use atGetRingPropertiesTo get U0, use atgetU0RING Ring structureENERGY Ring energyatenergy looks for the machine energy in:1) the 1st ‘RingParam’ element2) the ‘RFCavity’ with the lowest frequency3) the field “E0” of the global variable “GLOBVAL”4) The field “Energy” in any elementPERIODS Number of periodsVOLTAGE Total RF voltage for the main cavities. The main cavitiesare the ones with the lowest frequencyHARMNUMBER Harmonic number. Computed from the frequency of the main cavitiesU0 Total energy loss per turn
- atgetU0(ring)#
- Computes Energy loss per turn in eV .u0=atgetU0(ring) Return the energy loss/turn in eV for the full ring.RING: Ring structureU0: Energy loss per turn in eVu0=atgetU0(…,’periods’,periods) Select the number of periodsPERIODS if the number of periods to take into account (Default: full ring)u0=atgetU0(…,’method’,method) Choose the methodMETHOD: ‘integral’: (default) The losses are obtained fromLosses = Cgamma / 2pi * EGeV^4 * I2Takes into account bending magnets and wigglers.‘tracking’: The losses are obtained by tracking without cavities.Needs radiation ON, takes into account all radiating elements.
- atradoff()#
- Obsolete: switches RF and radiation offKept for compatibility. The function name is misleading, because thefunction acts not only on synchrotron radiation, but more generally onall elements modifying the longitudinal momentum.<a href=”matlab:help atdisable_6d”>atdisable_6d</a> is an exact copy of this function and should preferably beused.
- atradon()#
- Obsolete: switches RF and radiation onKept for compatibility. The function name is misleading, because thefunction acts not only on synchrotron radiation, but more generally onall elements modifying the longitudinal momentum.<a href=”matlab:help atenable_6d”>atenable_6d</a> is an exact copy of this function and should preferably beused.
- atsetenergy(ring, energy)#
- sets the Energy field in all elements.If no such field exists, it creates it.newring = atsetenergy(ring,energy)ring: an AT ring.Energy: Value to set the Energy field. Units: eVnewring: new AT ring with Energy field set.Example:Set the energy of the elements in RING to 3 GeV.newring = atsetenergy(ring,3e9)See also
atenergy()
- attapering(ring)#
- Scale magnet strengthsnewring=attapering(ring) Scales dipole strengths with local energy tocancel the closed orbit due to synchrotron radiation.newring=attapering(ring,’multipoles’, true) Scales also themultipoles to cancel optics errors. The default is truenewring=attapering(ring,’niter’,niter) Performs niter iterations (usefulwhen multipoles are scaled). Default 1
- check_6d(ring) returns the radiation state of ring (true/false)#
- Checks the presence of longitudinal motion in a lattice.is_6d = check_6d(ring) returns the radiation state of ring (true/false).Equivalent to IS_6D=<a href=”matlab:help atGetRingProperties”>atGetRingProperties</a>(RING,’is_6d’)is_6d = check_6d(ring, enable)Generates an error if IS_6D is different of ENABLE[is_6d, newring] = check_6d(ring,enable,’force’)The keyword ‘force’ overrides any error check, and convertsthe RING according to the value of ENABLE.IS_6D contains the status of the RING before conversion.[is_6d, newring] = check_6d(ring,enable,’strict’,strict)Default, STRICT=true.If STRICT is true, a difference btw IS_6D and ENABLE produces an error.If STRICT is false, a difference btw IS_6D and ENABLE produces a warning,and the RING is converted according to the value of ENABLE.IS_6D contains the status of the RING before conversion.
- check_radiation()#
- Obsolete: check the radiation state of a ringKept for compatibility> The function name is misleading, because thefunction checks not only the presence of synchrotron radiation, but moregenerally of all elements modifying the longitudinal momentum.<a href=”matlab:help check_6d”>check_6d</a> is an exact copy of this function and should preferably beused.
- findelemraddiffm()#
- findmpoleraddiffmatrix(elem, orbit_in, energy)#
- calculate radiation diffusion matrix of a multipole elementdiff=findmpoleraddiffmatrix(elem,orbit_in,energy)ELEM: AT multipole elementORBIT_IN: input closed orbitENERGY: ring energy [eV]diff=findmpoleraddiffmatrix(elem,orbit_in)takes energy from the ‘Energy’ field of the elementfor use in Ohmi’s beam envelope formalism [1][1] K.Ohmi et al. Phys.Rev.E. Vol.49. (1994)See also
ohmienvelope()
- findthickmpoleraddiffm()#
- findthinmpoleraddiffm()#
- ohmienvelope(ring, radelemindex)#
- calculates equilibrium beam envelope in acircular accelerator using Ohmi’s beam envelope formalism [1].[1] K.Ohmi et al. Phys.Rev.E. Vol.49. (1994)[envelope, rmsdp, rmsbl] = ohmienvelope(ring,radelemindex)[envelope, rmsdp, rmsbl] = ohmienvelope(ring,radelemindex,refpts)RING - an AT ring.RADELEMINDEX - ignored, kept for compatibilityREFPTS - reference points along the ring. Default: 1ENVELOPE is a structure with fieldsSigma - [SIGMA(1); SIGMA(2)] - RMS size [m] alongthe principal axis of a tilted ellipsAssuming normal distribution exp(-(Z^2)/(2*SIGMA))Tilt - Tilt angle of the XY ellipse [rad]Positive Tilt corresponds to Corkscrew (right)rotatiom of XY plane around s-axisR - 6-by-6 equilibrium envelope matrix RRMSDP - RMS momentum spreadRMSBL - RMS bunch length[m][envelope, rmsdp, rmsbl, m66, t, orbit] = ohmienvelope(…)Returns in addition the 6x6 transfer matrices and the closed orbitfrom FINDM66See also
atenable_6d()
,findm66()
- quantumDiff(ring)#
- Compute the radiation-diffusion matrixdiffmat=quantumDiff(ring)RING: Closed ring AT structure, containing radiative elements andRF cavity. Radiative elements are identified by aPassMethod ending with ‘RadPass’.diffmat=quantumDiff(line,radindex,orbitin) (deprecated syntax)diffmat=quantumDiff(…,’orbit’,orbitin)RADINDEX: IgnoredORBITIN: Initial 6-D closed orbit.In this mode, LINE may be a section of a ring.
- thickmpoleraddiffm()#
- FIND
- thinmpoleraddiffm()#
- FIND