element_creation#
Functions
Create an element applying an arbitrary 6x6 transfer matrix |
|
ATM66(FAMNAME,M66,Tijk,PASSMETHOD) |
|
atQuantDiff creates a quantum diffusion element. |
|
SimpleQuantDiff creates a simple quantum difusion element |
|
Creates a aperture element |
|
Create an AT element structure + various checks |
|
Creates a drift space element with class ‘Corrector’ |
|
Creates an crab cavity element with Class ‘CrabCavity’ |
|
atdampMatElem creates an element that applies the global damping matrix |
|
Creates a drift space element with Class ‘Drift’ |
|
atenergyloss creates an energy loss element |
|
Creates an ID element |
|
Creates a marker space element |
|
Creates a Beam Position Monitor element with Class ‘Monitor’ |
|
Creates a multipole element |
|
Creates a quadrupole element with Class ‘Quadrupole’ |
|
Creates a rectangular bending magnet element with class ‘Bend’ |
|
Set X0ref and RefDZ for rectangular bending magnets |
|
Creates an rfcavity element with Class ‘RFCavity’ |
|
Creates a RingParameter Element which should go at the beginning of the ring |
|
Creates a sector bending magnet element with class ‘Bend’ |
|
Creates a sextupole element with class ‘Sextupole’ |
|
Creates a skew quadrupole element with Class ‘Multipole’ |
|
Creates a new solenoid element with Class ‘Solenoid’ |
|
Creates a thin multipole element |
|
Creates a variable thin multipole element |
|
Creates a wiggler |
- atM66(famname, atstruct, passmethod)#
- Create an element applying an arbitrary 6x6 transfer matrixFAMNAME family nameM66 transfer matrix, defaults to Identity(6)]PASSMETHOD tracking function, defaults to ‘Matrix66Pass’atM66(famname,atstruct,passmethod)atM66 will generate the matrix by calling FINDM66(ATSTRUCT)ATSTRUCT AT structure
- atM66Tijk()#
- ATM66(FAMNAME,M66,Tijk,PASSMETHOD)atM66 creates an element that applies an arbitrary matrix m66FAMNAME family nameM66 transfer matrix, defaults to Identity(6)]Tijk 2nd order transfer matrix, defaults to zeros(6,6,6)]PASSMETHOD tracking function, defaults to ‘MatrixTijkPass’ATM66(FAMNAME,ATSTRUCT,PASSMETHOD)atM66 will generate the matrix by calling FINDM66(ATSTRUCT)ATSTRUCT AT structure
- atQuantDiff(famname, diffmat)#
- atQuantDiff creates a quantum diffusion element.elem=atQuantDiff(famname,diffmat) uses the given diffusion matrixFAMNAME: family nameDIFFMAT: Diffusion matrixelem=atQuantDiff(famnane,ring) computes the diffusion matrix of the ringFAMNAME: family nameRING: lattice with radiation onelem=atQuantDiff(famnane,ring,’orbit0’,orbit) computes the diffusionmatrix of the ring without computing the closed orbitORBIT: closed orbit at beginning of the ring(this option is useful for the islands)The default pass method is ‘QuantDiffPass’ which uses a globalpseudo-random pcg32 stream inplemented in C. More details at:See also
quantumDiff()
- atSimpleQuantDiff(famname, ...)#
- SimpleQuantDiff creates a simple quantum difusion elementelem=atSimpleQuantDiff(famname,…)FAMNAME: family nameelem=atSimpleQuantDiff(famname,…,’betax’,betax,…)BETAX: Horizontal beta function. Default: 1.0elem=atSimpleQuantDiff(famname,…,’betay’,betay,…)BETAY: Vertical beta function. Default: 1.0elem=atSimpleQuantDiff(famname,…,’emitx’,emitx,…)EMITX: Horizontal equilibrium emittance. Default: 0.0elem=atSimpleQuantDiff(famname,…,’emity’,emity,…)EMITY: Vertical equilibrium emittance. Default: 0.0elem=atSimpleQuantDiff(famname,…,’espread’,espread,…)ESPREAD: Equilibrium momentum spread. Default: 0.0elem=atSimpleQuantDiff(famname,…,’taux’,tau_x,…)TAU_X: Horizontal damping time. Default: 0.0elem=atSimpleQuantDiff(famname,…,’tauy’,tau_y,…)TAU_Y: Vertical damping time. Default: 0.0elem=atSimpleQuantDiff(famname,…,’tauz’,tau_z,…)TAU_Z: Longitudinal damping time. Default: 0.0
- ataperture()#
- Creates a aperture element**ataperture**(FAMNAME,LIMITS,PASSMETHODdefine physical aperture element (collimator)lim=[-x,+x,-y,+y];lim={[-x,+x,-y,+y],[-x,+x,-y,+y],[-x,+x,-y,+y],…};will generate various aperture elements (one for every set of errors)See also
SetPhysicalAperture()
- atbaselem(famname, method, 'fieldname1', value1, ...)#
- Create an AT element structure + various checkselem=atbaselem(famname,method,’fieldname1’,value1,…) create AT elementCreate an AT element structure and check the consistence ofPolynomA, PolynomB, MaxOrder and NumIntStepsNOTES1. length of PolynomA and PolynomB are equal (zero padding)2. MaxOrder is always lenght(PolynomA) - 1
- atcorrector(famname, length, kick, passmethod)#
- Creates a drift space element with class ‘Corrector’atcorrector(famname,length,kick,passmethod)INPUTS1. FAMNAME family name2. LENGTH length [m]3. KICK [hor. kick, vert. kick] [rad]4. PASSMETHOD tracking function, defaults to ‘CorrectorPass’OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. Each pair {‘FIELDNAME’,VALUE} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = CorrectorPasswhere req are mandatory field and opt are optional fieldsatmultipole, atthinmultipole, atmarker
- atcrabcavity(famname, length, voltages, frequency, harmonicnumber)#
- Creates an crab cavity element with Class ‘CrabCavity’atcrabcavity(famname,length,voltages,frequency,harmonicnumber)INPUTS1. FAMNAME Family name2. LENGTH Length [m]3. VOLTAGES Array [Horizontal, Vertical] Peak voltages [V]4. FREQUENCY RF frequency [Hz]5. HARMNUMBER Harmonic NumberOUTPUTS1. ELEM - Structure with the AT elementEXAMPLESatcrabcavity(famname,…,passmethod,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementatmultipole, atthinmultipole, atmarker, atcorrector
- atdampMatElem(famname, ring, cavipass, bendpass, quadpass)#
- atdampMatElem creates an element that applies the global damping matrixelem=atdampMatElem(famname,ring,cavipass,bendpass,quadpass)FAMNAME: family nameRING: initial AT structure, without radiation passmethodsCAVIPASS: pass method for cavities (default RFCavityPass)BENDPASS: pass method for bending magnets. Special values:‘’ makes no change,‘auto’ wille substitute ‘Pass’ with ‘RadPass’ in any method(default: ‘auto’)QUADPASS: pass method for quadrupoles‘’ makes no change,‘auto’ wille substitute ‘Pass’ with ‘RadPass’ in any method(default: ‘’)
- atdrift(famname, length, passmethod)#
- Creates a drift space element with Class ‘Drift’atdrift(famname,length,passmethod)INPUTS1. FAMNAME - Family name2. LENGTH - Length [m]3. PASSMETHOD - Tracking function, defaults to ‘DriftPass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. atdrift(famname,length,passmethod,’fieldname1’,value1,…)each pair {‘fieldname’,value} is added to the element
- atenergyloss(famname, eloss, passmethod)#
- atenergyloss creates an energy loss elementelem=atenergyloss(famname,eloss,passmethod)FAMNAME: family nameELOSS: Energy loss [eV]PASSMETHOD: Tracking methods, defaults to ‘IdentityPass’the “energy loss” element is taken into account in ATSUMMARY: it adds damping bycontributing to the I2 integral, thus reducing the equilibrium emittance.But it does not generate any diffusion. This makes sense only if the lossessummarised in the element occur in non-dispersive locations.
- atidtable()#
- Creates an ID elementFamName family nameNslice number of slices (1 means the wiggler is represented by asingle kick in the center of the device).filename name of file with wiggler tracking tables.Energy Energy of the machine, needed for scalingmethod tracking function. Defaults to ‘IdTablePass’The tracking table is described inP. Elleaume, “A new approach to the electron beam dynamics in undulatorsand wigglers”, EPAC92.returns assigned structure with class ‘KickMap’
- atinsertiondevicekickmap()#
- atmarker(famname, passmethod)#
- Creates a marker space elementatmarker(famname,passmethod)INPUTS1. FAMNAME - Family name2. PASSMETHOD - Tracking function, defaults to ‘IdentityPass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. atmarker(famname,passmethod,’fieldname1’,value1,…)each pair {‘fieldname’,value} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = IdentityPasswhere req are mandatory field and opt are optional fieldsatthinmultipole, atcorrector
- atmonitor(famname, 'fieldname1', value1, ...)#
- Creates a Beam Position Monitor element with Class ‘Monitor’INPUTS1. fname - Family nameatmonitor(famname,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementatmultipole, atthinmultipole, atmarker, atcorrector
- atmultipole(famname, length, polynoma, polynomb, passmethod)#
- Creates a multipole elementatmultipole(famname,length,polynoma,polynomb,passmethod)INPUTS1. FNAME - Family name2. LENGTH - Length[m]3. POLYNOMA - Skew [dipole quad sext oct];4. POLYNOMB - Normal [dipole quad sext oct];5. PASSMETHOD - Tracking function. Defaults to ‘StrMPoleSymplectic4Pass’OPTIONS (order does not matter)R1 - 6 x 6 rotation matrix at the entranceR2 - 6 x 6 rotation matrix at the entranceT1 - 6 x 1 translation at entranceT2 - 6 x 1 translation at exitNumIntSteps - Number of integration stepsMaxOrder - Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. atmultipole(famname,length,polynoma,polynomb,passmethod,’fieldname1’,value1,…)each pair {‘fieldname’,value} is added to the elementatthinmultipole, atmarker, atcorrector
- atquadrupole(famname, length, k, passmethod)#
- Creates a quadrupole element with Class ‘Quadrupole’atquadrupole(famname,length,k,passmethod)INPUTS1. FAMNAME - Family name2. LENGTH - Length [m]3. K - Strength [m-2]4. PASSMETHOD - Tracking function, defaults to ‘StrMPoleSymplectic4Pass’OPTIONS (order does not matter)R1 - 6 x 6 rotation matrix at the entranceR2 - 6 x 6 rotation matrix at the entranceT1 - 6 x 1 translation at entranceT2 - 6 x 1 translation at exitNumIntSteps - Number of integration stepsMaxOrder - Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. Fieldname can be called by calling the passmethod[req opt] = StrMPoleSymplectic4Passwhere req are mandatory field and opt are optional fields2. atquadrupole(famname,length,k,passmethod,’fieldname1’,value1,…)each pair {‘fieldname’,value} is added to the element3. Quadrupole fringe field can be activated at element entrance or exitwith option FringeQuadEntrance/FringeQuadExit=0,1,2Version 0: no fringe fieldVersion 1: Lee-Whiting formulaVersion 2: Lee-Whiting Elegant-like formula where 5 integral need tobe providedatmultipole, atthinmultipole, atmarker, atcorrector, atringparam
- atrbend(famname, length, bendingangle, k, passmethod)#
- Creates a rectangular bending magnet element with class ‘Bend’Two calling methods (that can be combined)atrbend(famname,length,bendingangle,k,passmethod)INPUTS1. FNAME - Family name2. LENGTH - Length of the arc for an on-energy particle[m], default to 03. BENDINGANGLE - Total bending angle [rad], defaults to 04. K - Focusing strength, defaults to 05. PASSMETHOD -Tracking function, defaults to ‘BndMPoleSymplectic4Pass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. atrbend(famname,length,bendingangle,k,passmethod,’fieldname1’,value1,…)each pair {‘fieldname’,value} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = BndMPoleSymplectic4Passwhere req are mandatory field and opt are optional fields2. Model for BndMPoleSymplectic4Pass (Rad) can be selected with extrafieldsFringeBendEntrance/FringeBendExit = 0,1,2,3Version 0 no dipole fringe fieldsVersion 1 legacy version Brown First Order (K. Brown. A First and Second OrderMatrix Theory for the Design of Beam Transport Systems and ChargedParticle Spectrometers. Internal report, SLAC-75, 1982)Version 2 SOLEIL close to second order of Brown (J. Bengtsson and M. Meddahi.Modeling of Beam Dynamics and Comparison with Measurements forthe Advanced Light Source. London, UK, 1994.)Version 3 THOMX (Dipole Fringe Field Effects in the ThomX Ring, J. Zhang andA. Loulergue, Proceedings of IPAC2013, Shanghai, China)FringeQuadEntrance/FringeQuadExit = 0,1,2Version 0 no quadrupole fringe fieldsVersion 1 Lee-Whiting FormulaVersion 2 Linear quadrupole fringe field using the 5 integrant a laElegantatmultipole, atthinmultipole, atmarker, atcorrector
- atrbendtune(elem)#
- Set X0ref and RefDZ for rectangular bending magnetsnewelem=atrbendtune(elem)Set the X0ref and RefDZ attributes for rectangular bending magnetsThis function must be called after creating a rectangular bending magnetor after setting its polynomA/B attributes. It will set the correct X0refand RefDZ attributes to get a zero closed orbit for the reference particle.Example:>> % Identify the rectangular bends>> rbends=atgetcells(ring,…);>> % Set their correct attributes>> ring(rbends)=cellfun(@**atrbendtune**,ring(rbends),’UniformOutput’,false);Does nothing if the passmethod is not a rectangular bend passmethod
- atrfcavity(famname, length, voltage, frequency, harmonicnumber, energy, passmethod)#
- Creates an rfcavity element with Class ‘RFCavity’atrfcavity(famname,length,voltage,frequency,harmonicnumber,energy,passmethod)INPUTS1. FAMNAME Family name2. LENGTH Length [m]3. VOLTAGE Peak voltage [V]4. FREQUENCY RF frequency [Hz]5. HARMNUMBER Harmonic Number6. ENERGY Energy [eV]7. PASSMETHOD Tracking function, defaults to ‘RFCavityPass’OUTPUTS1. ELEM - Structure with the AT elementEXAMPLESatrfcavity(famname,…,passmethod,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = atrfcavitywhere req are mandatory field and opt are optionalfieldsatmultipole, atthinmultipole, atmarker, atcorrector
- atringparam(famname, e0, nbperiods)#
- Creates a RingParameter Element which should go at the beginning of the ringatringparam(famname,e0,nbperiods)INPUTS1. FAMNAME - Family name which may be used as name of Ring2. E0 - Energy of electrons3. NBPERIODS - Periodicity of the ring (1 if ring is already expanded)OUTPUTS1. elem - RingParam class elematmultipole, atthinmultipole
- atsbend(famname, length, bendingangle, k, passmethod)#
- Creates a sector bending magnet element with class ‘Bend’Two calling methods (that can be combined)atsbend(famname,length,bendingangle,k,passmethod)INPUTS1. FNAME Family name2. LENGTH Length of the arc for an on-energy particle[m], default to 03. BENDINGANGLE Total bending angle [rad], defaults to 04. K Focusing strength, defaults to 05. PASSMETHOD Tracking function, defaults to ‘BndMPoleSymplectic4Pass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementatsbend(famname,length,bendingangle,k,passmethod,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = BndMPoleSymplectic4Passwhere req are mandatory field and opt are optionalfields2. Model for BndMPoleSymplectic4Pass (Rad) can be selected with extrafieldsFringeBendEntrance/FringeBendExit = 0,1,2,3Version 0 no dipole fringe fieldsVersion 1 legacy version Brown First Order (K. Brown. A First and Second OrderMatrix Theory for the Design of Beam Transport Systems and ChargedParticle Spectrometers. Internal report, SLAC-75, 1982)Version 2 SOLEIL close to second order of Brown (J. Bengtsson and M. Meddahi.Modeling of Beam Dynamics and Comparison with Measurements forthe Advanced Light Source. London, UK, 1994.)Version 3 THOMX (Dipole Fringe Field Effects in the ThomX Ring, J. Zhang andA. Loulergue, Proceedings of IPAC2013, Shanghai, China)FringeQuadEntrance/FringeQuadExit = 0,1,2Version 0 no quadrupole fringe fieldsVersion 1 Lee-Whiting FormulaVersion 2 Linear quadrupole fringe field using the 5 integrant a laElegantatmultipole, atthinmultipole, atmarker, atcorrector
- atsextupole(famname, length, s, passmethod)#
- Creates a sextupole element with class ‘Sextupole’atsextupole(famname,length,s,passmethod)INPUTS1. FNAME family name2. LENGTH length [m]3. S strength [m-2]4. PASSMETHOD tracking function, defaults to ‘StrMPoleSymplectic4Pass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLESatsextupole(famname,length,s,passmethod,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementatrbend,atskewquad, atmultipole, atthinmultipole, atmarker,atcorrector
- atskewquad(famname, length, qs, passmethod)#
- Creates a skew quadrupole element with Class ‘Multipole’atskewquad(famname,length,qs,passmethod)INPUTS1. FAMNAME - Family name2. LENGTH - Length [m]3. Qs - Skew quad strength [m-2]OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLES1. atskewquad(fname, l, qs, method)atmultipole, atthinmultipole, atmarker, atcorrector
- atsolenoid()#
- Creates a new solenoid element with Class ‘Solenoid’Elem =solenoid(‘FAMILYNAME’,Length [m],KS,’METHOD’)INPUTS1. FamName family name2. Length length[m]3. KS solenoid strength KS [rad/m]4. PassMethod name of the function to use for trackingOPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = BndMPoleSymplectic4Passwhere req are mandatory field and opt are optionalfieldsatthinmultipole, atmarker, atcorrector
- atthinmultipole(famname, polynoma, polynomb, passmethod)#
- Creates a thin multipole elementatthinmultipole(famname,polynoma,polynomb,passmethod)INPUTS1. FNAME family name2. POLYNOMA skew [dipole quad sext oct];3. POLYNOMB normal [dipole quad sext oct];4. PASSMETHOD tracking function. Defaults to ‘ThinMPolePass’OPTIONS (order does not matter)R1 6 x 6 rotation matrix at the entranceR2 6 x 6 rotation matrix at the entranceT1 6 x 1 translation at entranceT2 6 x 1 translation at exitNumIntSteps Number of integration stepsMaxOrder Max Order for multipole (1 up to quadrupole)OUTPUTS1. ELEM - Structure with the AT elementEXAMPLESatthinmultipole(famname,polynoma,polynomb,passmethod,’fieldname1’,value1,…)Each pair {‘FIELDNAME’,VALUE} is added to the elementNOTES1. Fieldname can be called by calling the passmethod[req opt] = BndMPoleSymplectic4Passwhere req are mandatory field and opt are optionalfieldsATMULTIPOLE, ATMARKER, ATCORRECTOR
- atvariablemultipole(famname,mode,passmethod,[key,value]...)#
- Creates a variable thin multipole elementatvariablemultipole(famname,mode,passmethod,[key,value]…)INPUTSFNAME Family nameMODE Excitation mode: ‘SINE’, ‘WHITENOISE’ or ‘ARBITRARY’.Default: ‘SINE’PASSMETHOD Tracking function. Default: ‘VariableThinMPolePass’OPTIONS (order does not matter)AMPLITUDEA Vector or scalar to define the excitation amplitude forPolynomAAMPLITUDEB Vector or scalar to define the excitation amplitude forPolynomAFREQUENCYA Frequency of SINE excitation for PolynomAFREQUENCYB Frequency of SINE excitation for PolynomBPHASEA Phase of SINE excitation for PolynomAPHASEB Phase of SINE excitation for PolynomBMAXORDER Order of the multipole for a scalar amplitudeSEED Input seed for the random number generatorFUNCA ARBITRARY excitation turn-by-turn kick list for PolynomAFUNCB ARBITRARY excitation turn-by-turn kick list for PolynomBPERIODIC If true (default) the user input kick list is repeatedRAMPS Vector (t0, t1, t2, t3) in turn number to define the ramping of the excitation* t<t0: excitation amlpitude is zero* t0<t<t1: exciation amplitude is linearly ramped up* t1<t<t2: exciation amplitude is constant* t2<t<t3: exciation amplitude is linearly ramped down* t3<t: exciation amplitude is zeroOUTPUTS1. ELEM - Structure with the AT elementNOTES1. For all excitation modes at least one amplitude (A or B) isrequired. The default excitation is SINE2. For SINE excitation modes the FREQUENCY corresponding to the inputAMPLITUDE is required3. For ARBITRARY excitation modes the FUNC corresponding to the inputAMPLITUDE is requiredEXAMPLES% Create a sinusoidal dipole with amplitude 0.1 mrad and frequency 1 kHz>> atvariablemultipole(‘acm’,’sine’,’amplitudeb’,1.e-4,’frequencyb’,1.e3);% Create a white noise dipole excitation of amplitude 0.1 mrad>> atvariablemultipole(‘acm’,’whitenoise’,’amplitudeb’,1.e-4);
- atwiggler(famname, length, lw, bmax, energy, passmethod)#
- Creates a wigglerelem=atwiggler(famname, length, lw, bmax, energy, passmethod)FAMNAME family nameLENGTH total lengthLW Period lengthBMAX Peak magnetic field [T]ENERGY Beam energy [eV]PASSMETHOD Tracking function. Default ‘GWigSymplecticPass’elem=atwiggler(…,’keyword’,value…)Keywords:Nstep number of integration steps per period (default 5)Nmeth symplectic integration method, 2nd or 4th order: 2 or 4 (default 4)By harmonics of the horizontal wiggler. Default [1;1;0;1;1;0]6xNH matrix, with NH number of harmonicsBx harmonics of the vertical wigglers. Default []6xNV matrix, with NV number of harmonicssee also: GWigSymplecticPass