February 20, 2020

Note: another source of help for elegant is the on-line forum. Users are encouraged to join and participate. At minimum, users should subscribe to the “Bugs” topic, since this is where bug notifications are posted.

A set of examples and scripts is available from the software download page that demonstrates many features of elegant. A brief overview of elegant is also available, which introduces the capabilities at a high level.

1 Highlights of What’s New in Version 2020.1.0

1.1 Bug Fixes for Elements

1.2 Bug Fixes for Commands

1.3 New and Modified Elements

1.4 New and Modified Commands

1.5 Changes Specific to the MPI Parallel Version

1.6 Changes Specific to the GPU Version

1.7 Changes to Related Programs and Files

1.8 Known Bugs, Problems, and Limitations

2 Credits

3 Introduction

3.1 Program Philosophy

3.2 Capabilities of elegant

4 Digression on the Longitudinal Coordinate Definition

5 Fiducialization in elegant

6 Preparing beams for bunch-mode simulations

7 Namelist Command Dictionary

7.1 Commandline Syntax

7.2 General Command Syntax

7.3 Setup and Action Commands

7.4 Table of elegant commands and their functions

7.5 alter_elements

7.6 amplification_factors

7.7 analyze_map

7.8 aperture_data

7.9 bunched_beam

7.10 change_particle

7.11 chaos_map

7.12 chromaticity

7.13 closed_orbit

7.14 correct

7.15 correction_matrix_output

7.16 correct_tunes

7.17 coupled_twiss_output

7.18 divide_elements

7.19 elastic_scattering

7.20 error_element

7.21 error_control

7.22 find_aperture

7.23 floor_coordinates

7.24 frequency_map

7.25 global_settings

7.26 ignore_elements

7.27 inelastic_scattering

7.28 insert_elements

7.29 insert_sceffects

7.30 ion_effects

7.31 linear_chromatic_tracking_setup

7.32 link_control

7.33 link_elements

7.34 load_parameters

7.35 matrix_output

7.36 modulate_elements

7.37 moments_output

7.38 momentum_aperture

7.39 optimize

7.40 optimization_constraint

7.41 optimization_covariable

7.42 optimization_setup

7.43 parallel_optimization_setup

7.44 optimization_term

7.45 optimization_variable

7.46 print_dictionary

7.47 ramp_elements

7.48 rf_setup

7.49 replace_elements

7.50 rpn_expression

7.51 rpn_load

7.52 run_control

7.53 run_setup

7.54 sasefel

7.55 save_lattice

7.56 sdds_beam

7.57 semaphores

7.58 set_reference_particle_output

7.59 slice_analysis

7.60 subprocess

7.61 steering_element

7.62 touschek_scatter

7.63 transmute_elements

7.64 tune_footprint

7.65 twiss_analysis

7.66 twiss_output

7.67 track

7.68 tune_shift_with_amplitude

7.69 vary_element

8 Specialized Tools for Use with elegant

8.1 abrat

8.2 astra2elegant

8.3 computeGeneralizedGradients

8.4 coreEmittance

8.5 csrImpedance

8.6 doubleDist6

8.7 haissinski

8.8 ibsEmittance

8.9 ionTrapping

8.10 elegantto

8.11 sddsanalyzebeam

8.12 sddsbrightness

8.13 sddsbunchingfactor

8.14 sddsemitproc

8.15 sddsfindresonances

8.16 sddsfluxcurve

8.17 sddsmatchtwiss

8.18 sddsrandmult

8.19 sddsurgent

8.20 smoothDist6

8.21 TFBFirSetup

8.22 touschekLifetime

8.23 view3dGeometry

9 Accelerator and Element Description

9.1 Magnet Strength

10 Element Dictionary

10.1 ALPH—An alpha magnet implemented as a matrix, up to 3rd order.

10.2 APCONTOUR—An aperture (or its inverse) defined by (x, y) points in an SDDS file.

10.3 BGGEXP—A magnetic field element using generalized gradient expansion.

10.4 BMAPXY—A map of Bx and By vs x and y.

10.5 BMXYZ—A map of (Bx, By, Bz) vs (x, y, z), for straight elements only

10.6 BOFFAXE—A straight magnetic field element using off-axis expansion from an on-axis derivative.

10.7 BRANCH—Conditional branch instruction to jump to another part of the beamline

10.8 BRAT—Bending magnet RAy Tracing using (Bx, By, Bz) vs (x, y, z).

10.9 BUMPER—A time-dependent kicker magnet with optional spatial dependence of the kick and no fringe effects. The waveform is in SDDS format, with time in seconds and amplitude normalized to 1. The optional spatial dependence is also specified as an SDDS file.

10.10 CCBEND—A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.

10.11 CENTER—An element that centers the beam transversely on the ideal trajectory.

10.12 CEPL—A numerically-integrated linearly-ramped electric field deflector.

10.13 CHARGE—An element to establish the total charge of a beam. Active on first pass only. If given, overrides all charge specifications on other elements.

10.14 CLEAN—Cleans the beam by removing outlier particles.

10.15 CORGPIPE—A corrugated round pipe, commonly used as a dechirper in linacs.

10.16 CSBEND—A canonical kick sector dipole magnet.

10.17 CSRCSBEND—Like CSBEND, but incorporates a simulation of Coherent Synchrotron radiation.

10.18 CSRDRIFT—A follow-on element for CSRCSBEND that applies the CSR wake over a drift.

10.19 CWIGGLER—Tracks through a wiggler using canonical integration routines of Y. Wu (Duke University).

10.20 DRIF—A drift space implemented as a matrix, up to 2nd order. Use EDRIFT for symplectic tracking.

10.21 DSCATTER—A scattering element to add random changes to particle coordinates according to a user-supplied distribution function

10.22 ECOL—An elliptical collimator.

10.23 EDRIFT—Tracks through a drift with no approximations (Exact DRIFT).

10.24 EHKICK—A horizontal steering dipole implemented using an exact hard-edge model

10.25 EKICKER—A combined horizontal/vertical steering dipole implemented using an exact hard-edge model

10.26 EMATRIX—Explicit matrix input with data in the element definition, rather than in a file.

10.27 EMITTANCE—Applies a linear transformation to the beam to force the emittance to given values.

10.28 ENERGY—An element that matches the central momentum to the beam momentum, or changes the central momentum or energy to a specified value.

10.29 EVKICK—A vertical steering dipole implemented using an exact hard-edge model

10.30 FLOOR—Sets floor coordinates

10.31 FMULT—Multipole kick element with coefficient input from an SDDS file.

10.32 FRFMODE—One or more beam-driven TM monopole modes of an RF cavity, with data from a file.

10.33 FTABLE—Tracks through a magnetic field which is expressed by a SDDS table.

10.34 FTRFMODE—One or more beam-driven TM dipole modes of an RF cavity, with data from a file.

10.35 GFWIGGLER—Tracks through a wiggler using generate function method of J. Bahrdt and G. Wuestefeld (BESSY, Berlin, Germany).

10.36 HISTOGRAM—Request for histograms of particle coordinates to be output to SDDS file.

10.37 HKICK—A horizontal steering dipole implemented as a matrix, up to 2nd order. Use EHKICK for symplectic tracking.

10.38 HKPOLY—Applies kick according to a Hamiltonian that’s a polynomial function of x and y together with a generalized drift also given as a polynomial of qx and qy

10.39 HMON—A horizontal position monitor, accepting a rpn equation for the readout as a function of the actual position (x).

10.40 IBSCATTER—A simulation of intra-beam scattering.

10.41 ILMATRIX—An Individualized Linear Matrix for each particle for fast symplectic tracking with chromatic and amplitude-dependent effects

10.42 IONEFFECTS—Simulates ionization of residual gas and interaction with the beam.

10.43 KICKER—A combined horizontal-vertical steering magnet implemented as a matrix, up to 2nd order. For time-dependent kickers, see BUMPER.

10.44 KOCT—A canonical kick octupole.

10.45 KPOLY—A thin kick element with polynomial dependence on the coordinates in one plane.

10.46 KQUAD—A canonical kick quadrupole.

10.47 KQUSE—A canonical kick element combining quadrupole and sextupole fields.

10.48 KSEXT—A canonical kick sextupole, which differs from the MULT element with ORDER=2 in that it can be used for chromaticity correction.

10.49 LMIRROR—A mirror for light optics

10.50 LRWAKE—Long-range (inter-bunch and inter-turn) longitudinal and transverse wake

10.51 LSCDRIFT—Longitudinal space charge impedance

10.52 LSRMDLTR—A non-symplectic numerically integrated planar undulator including optional co-propagating laser beam for laser modulation of the electron beam.

10.53 LTHINLENS—A thin lens for light optics

10.54 MAGNIFY—An element that allows multiplication of phase-space coordinates of all particles by constants.

10.55 MALIGN—A misalignment of the beam, implemented as a zero-order matrix.

10.56 MAPSOLENOID—A numerically-integrated solenoid specified as a map of (Bz, Br) vs (z, r).

10.57 MARK—A marker, equivalent to a zero-length drift space.

10.58 MATR—Explicit matrix input from a text file, in the format written by the print_matrix command.

10.59 MATTER—A Coulomb-scattering and energy-absorbing element simulating material in the beam path.

10.60 MAXAMP—A collimating element that sets the maximum transmitted particle amplitudes for all following elements, until the next MAXAMP.

10.61 MBUMPER—A time-dependent multipole kicker magnet. The waveform is in SDDS format, with time in seconds and amplitude normalized to 1.

10.62 MHISTOGRAM—Request for multiple dimensions (1, 2, 4 or 6) histogram output of particle coordinates.

10.63 MODRF—A first-order matrix RF cavity with exact phase dependence, plus optional amplitude and phase modulation.

10.64 MONI—A two-plane position monitor, accepting two rpn equations for the readouts as a function of the actual positions (x and y).

10.65 MRFDF—Zero-length Multipole RF DeFlector from dipole to decapole

10.66 MULT—A canonical kick multipole.

10.67 NIBEND—A numerically-integrated dipole magnet with various extended-fringe-field models.

10.68 NISEPT—A numerically-integrated dipole magnet with a Cartesian gradient.

10.69 OCTU—An octupole implemented as a third-order matrix. Use KOCT for symplectic tracking.

10.70 PEPPOT—A pepper-pot plate.

10.71 PFILTER—An element for energy and momentum filtration.

10.72 QUAD—A quadrupole implemented as a matrix, up to 3rd order. Use KQUAD for symplectic tracking.

10.73 QUFRINGE—An element consisting of a linearly increasing or decreasing quadrupole field.

10.74 RAMPP—A momentum-ramping element that changes the central momentum according to an SDDS-format file of the momentum factor vs time in seconds.

10.75 RAMPRF—A voltage-, phase-, and/or frequency-ramped RF cavity, implemented like RFCA.

10.76 RBEN—A rectangular dipole, implemented as a SBEND with edge angles, up to 2nd order. Use CSBEND for symplectic tracking.

10.77 RCOL—A rectangular collimator.

10.78 RECIRC—An element that defines the point to which particles recirculate in multi-pass tracking

10.79 REFLECT—Reflects the beam back on itself, which is useful for multiple beamline matching.

10.80 REMCOR—An element to remove correlations from the tracked beam to simulate certain types of correction.

10.81 RFCA—A first-order matrix RF cavity with exact phase dependence.

10.82 RFCW—A combination of RFCA, WAKE, TRWAKE, and LSCDRIFT.

10.83 RFDF—A simple traveling or standing wave deflecting RF cavity.

10.84 RFMODE—A simulation of a beam-driven TM monopole mode of an RF cavity.

10.85 RFTM110—Tracks through a TM110-mode (deflecting) rf cavity with all magnetic and electric field components. NOT RECOMMENDED—See below.

10.86 RFTMEZ0—A TM-mode RF cavity specified by the on-axis Ez field.

10.87 RIMULT—Multiplies radiation integrals by a given factor. Use to compute emittance for collection of various types of cells.

10.88 RMDF—A linearly-ramped electric field deflector, using an approximate analytical solution FOR LOW ENERGY PARTICLES.

10.89 ROTATE—An element that rotates the beam about the longitudinal axis.

10.90 SAMPLE—An element that reduces the number of particles in the beam by interval-based or random sampling.

10.91 SBEN—A sector dipole implemented as a matrix, up to 2nd order. Use CSBEND for symplectic tracking.

10.92 SCATTER—A scattering element to add gaussian random numbers to particle coordinates.

10.93 SCMULT—Tracks through a zero length multipole to simulate space charge effects

10.94 SCRAPER—A collimating element that sticks into the beam from one side only. The directions 0, 1, 2, and 3 are from +x, +y, -x, and -y, respectively.

10.95 SCRIPT—An element that allows transforming the beam using an external script.

10.96 SEXT—A sextupole implemented as a matrix, up to 3rd order. Use KSEXT for symplectic tracking.

10.97 SHRFDF—Simulation through space harmonics of zero length deflecting cavity.

10.98 SLICE—Performs slice-by-slice analysis of the beam for output to a file.

10.99 SOLE—A solenoid implemented as a matrix, up to 2nd order.

10.100 SPEEDBUMP—Simulates a semi-circular protuberance from one or both walls of the chamber.

10.101 SREFFECTS—Lumped simulation of synchrotron radiation effects (damping and quantum excitation) for rings.

10.102 STRAY—A stray field element with local and global components. Global components are defined relative to the initial beamline direction.

10.103 TAPERAPC—A tapered aperture that is a section of a circular cylinder.

10.104 TAPERAPE—A tapered elliptical aperture.

10.105 TAPERAPR—A tapered rectangular aperture.

10.106 TFBDRIVER—Driver for a turn-by-turn feedback loop

10.107 TFBPICKUP—Pickup for a turn-by-turn feedback loop

10.108 TMCF—A numerically-integrated accelerating TM RF cavity with spatially-constant fields.

10.109 TRCOUNT—An element that defines the point from which transmission calculations are made.

10.110 TRFMODE—A simulation of a beam-driven TM dipole mode of an RF cavity.

10.111 TRWAKE—Transverse wake specified as a function of time lag behind the particle.

10.112 TSCATTER—An element to simulate Touschek scattering.

10.113 TUBEND—A special rectangular bend element for top-up backtracking.

10.114 TWISS—Sets Twiss parameter values.

10.115 TWLA—A numerically-integrated first-space-harmonic traveling-wave linear accelerator.

10.116 TWMTA—A numerically-integrated traveling-wave muffin-tin accelerator.

10.117 TWPL—A numerically-integrated traveling-wave stripline deflector.

10.118 UKICKMAP—An undulator kick map (e.g., using data from RADIA).

10.119 VKICK—A vertical steering dipole implemented as a matrix, up to 2nd order. Use EVKICK for symplectic tracking.

10.120 VMON—A vertical position monitor, accepting a rpn equation for the readout as a function of the actual position (y).

10.121 WAKE—Longitudinal wake specified as a function of time lag behind the particle.

10.122 WATCH—A beam property/motion monitor–allowed modes are centroid, parameter, coordinate, and fft.

10.123 WIGGLER—A wiggler or undulator for damping or excitation of the beam.

10.124 ZLONGIT—A simulation of a single-pass broad-band or functionally specified longitudinal impedance.

10.125 ZTRANSVERSE—A simulation of a single-pass broad-band or functionally-specified transverse impedance.

11 Examples

12 The rpn Calculator

13 Change Log

13.1 Highlights of What’s New in Version 2019.4.0

13.2 Highlights of What’s New in Version 2019.3.0

13.3 Highlights of What’s New in Version 2019.2.1

13.4 Highlights of What’s New in Version 2019.1.1

13.5 Highlights of What’s New in Version 35.1.0

13.6 Highlights of What’s New in Version 35.0.1

13.7 Highlights of What’s New in Version 34.4.0

13.8 Highlights of What’s New in Version 34.3.0, June 14, 2018

13.9 Highlights of What’s New in Version 34.2.0, March 22, 2018

13.10 Highlights of What’s New in Version 34.1.0, 27 February 2018

13.11 Highlights of What’s New in Version 34.0, 31 October 2017

13.12 Highlights of What’s New in Version 33.1.1, 25 July 2017

13.13 Highlights of What’s New in Version 33.0, March 3, 2017

13.14 Highlights of What’s New in Version 32.0, 5 Jan. 2017

13.15 Highlights of What’s New in Version 31.0, 1 Oct. 2016

13.16 Highlights of What’s New in Version 30.1, 3 Aug. 2016

13.17 Highlights of What’s New in Version 30.0, 5 July 2016

13.18 Highlights of What’s New in Version 29.1, 3 March 2016

13.19 Highlights of What’s New in Version 29.0, 15 Jan. 2016

13.20 Highlights of What’s New in Version 28.1.0, 23 July 2015

13.21 Highlights of What’s New in Version 28.0.0, 18 June 2015

References

1.1 Bug Fixes for Elements

1.2 Bug Fixes for Commands

1.3 New and Modified Elements

1.4 New and Modified Commands

1.5 Changes Specific to the MPI Parallel Version

1.6 Changes Specific to the GPU Version

1.7 Changes to Related Programs and Files

1.8 Known Bugs, Problems, and Limitations

2 Credits

3 Introduction

3.1 Program Philosophy

3.2 Capabilities of elegant

4 Digression on the Longitudinal Coordinate Definition

5 Fiducialization in elegant

6 Preparing beams for bunch-mode simulations

7 Namelist Command Dictionary

7.1 Commandline Syntax

7.2 General Command Syntax

7.3 Setup and Action Commands

7.4 Table of elegant commands and their functions

7.5 alter_elements

7.6 amplification_factors

7.7 analyze_map

7.8 aperture_data

7.9 bunched_beam

7.10 change_particle

7.11 chaos_map

7.12 chromaticity

7.13 closed_orbit

7.14 correct

7.15 correction_matrix_output

7.16 correct_tunes

7.17 coupled_twiss_output

7.18 divide_elements

7.19 elastic_scattering

7.20 error_element

7.21 error_control

7.22 find_aperture

7.23 floor_coordinates

7.24 frequency_map

7.25 global_settings

7.26 ignore_elements

7.27 inelastic_scattering

7.28 insert_elements

7.29 insert_sceffects

7.30 ion_effects

7.31 linear_chromatic_tracking_setup

7.32 link_control

7.33 link_elements

7.34 load_parameters

7.35 matrix_output

7.36 modulate_elements

7.37 moments_output

7.38 momentum_aperture

7.39 optimize

7.40 optimization_constraint

7.41 optimization_covariable

7.42 optimization_setup

7.43 parallel_optimization_setup

7.44 optimization_term

7.45 optimization_variable

7.46 print_dictionary

7.47 ramp_elements

7.48 rf_setup

7.49 replace_elements

7.50 rpn_expression

7.51 rpn_load

7.52 run_control

7.53 run_setup

7.54 sasefel

7.55 save_lattice

7.56 sdds_beam

7.57 semaphores

7.58 set_reference_particle_output

7.59 slice_analysis

7.60 subprocess

7.61 steering_element

7.62 touschek_scatter

7.63 transmute_elements

7.64 tune_footprint

7.65 twiss_analysis

7.66 twiss_output

7.67 track

7.68 tune_shift_with_amplitude

7.69 vary_element

8 Specialized Tools for Use with elegant

8.1 abrat

8.2 astra2elegant

8.3 computeGeneralizedGradients

8.4 coreEmittance

8.5 csrImpedance

8.6 doubleDist6

8.7 haissinski

8.8 ibsEmittance

8.9 ionTrapping

8.10 elegantto

8.11 sddsanalyzebeam

8.12 sddsbrightness

8.13 sddsbunchingfactor

8.14 sddsemitproc

8.15 sddsfindresonances

8.16 sddsfluxcurve

8.17 sddsmatchtwiss

8.18 sddsrandmult

8.19 sddsurgent

8.20 smoothDist6

8.21 TFBFirSetup

8.22 touschekLifetime

8.23 view3dGeometry

9 Accelerator and Element Description

9.1 Magnet Strength

10 Element Dictionary

10.1 ALPH—An alpha magnet implemented as a matrix, up to 3rd order.

10.2 APCONTOUR—An aperture (or its inverse) defined by (x, y) points in an SDDS file.

10.3 BGGEXP—A magnetic field element using generalized gradient expansion.

10.4 BMAPXY—A map of Bx and By vs x and y.

10.5 BMXYZ—A map of (Bx, By, Bz) vs (x, y, z), for straight elements only

10.6 BOFFAXE—A straight magnetic field element using off-axis expansion from an on-axis derivative.

10.7 BRANCH—Conditional branch instruction to jump to another part of the beamline

10.8 BRAT—Bending magnet RAy Tracing using (Bx, By, Bz) vs (x, y, z).

10.9 BUMPER—A time-dependent kicker magnet with optional spatial dependence of the kick and no fringe effects. The waveform is in SDDS format, with time in seconds and amplitude normalized to 1. The optional spatial dependence is also specified as an SDDS file.

10.10 CCBEND—A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.

10.11 CENTER—An element that centers the beam transversely on the ideal trajectory.

10.12 CEPL—A numerically-integrated linearly-ramped electric field deflector.

10.13 CHARGE—An element to establish the total charge of a beam. Active on first pass only. If given, overrides all charge specifications on other elements.

10.14 CLEAN—Cleans the beam by removing outlier particles.

10.15 CORGPIPE—A corrugated round pipe, commonly used as a dechirper in linacs.

10.16 CSBEND—A canonical kick sector dipole magnet.

10.17 CSRCSBEND—Like CSBEND, but incorporates a simulation of Coherent Synchrotron radiation.

10.18 CSRDRIFT—A follow-on element for CSRCSBEND that applies the CSR wake over a drift.

10.19 CWIGGLER—Tracks through a wiggler using canonical integration routines of Y. Wu (Duke University).

10.20 DRIF—A drift space implemented as a matrix, up to 2nd order. Use EDRIFT for symplectic tracking.

10.21 DSCATTER—A scattering element to add random changes to particle coordinates according to a user-supplied distribution function

10.22 ECOL—An elliptical collimator.

10.23 EDRIFT—Tracks through a drift with no approximations (Exact DRIFT).

10.24 EHKICK—A horizontal steering dipole implemented using an exact hard-edge model

10.25 EKICKER—A combined horizontal/vertical steering dipole implemented using an exact hard-edge model

10.26 EMATRIX—Explicit matrix input with data in the element definition, rather than in a file.

10.27 EMITTANCE—Applies a linear transformation to the beam to force the emittance to given values.

10.28 ENERGY—An element that matches the central momentum to the beam momentum, or changes the central momentum or energy to a specified value.

10.29 EVKICK—A vertical steering dipole implemented using an exact hard-edge model

10.30 FLOOR—Sets floor coordinates

10.31 FMULT—Multipole kick element with coefficient input from an SDDS file.

10.32 FRFMODE—One or more beam-driven TM monopole modes of an RF cavity, with data from a file.

10.33 FTABLE—Tracks through a magnetic field which is expressed by a SDDS table.

10.34 FTRFMODE—One or more beam-driven TM dipole modes of an RF cavity, with data from a file.

10.35 GFWIGGLER—Tracks through a wiggler using generate function method of J. Bahrdt and G. Wuestefeld (BESSY, Berlin, Germany).

10.36 HISTOGRAM—Request for histograms of particle coordinates to be output to SDDS file.

10.37 HKICK—A horizontal steering dipole implemented as a matrix, up to 2nd order. Use EHKICK for symplectic tracking.

10.38 HKPOLY—Applies kick according to a Hamiltonian that’s a polynomial function of x and y together with a generalized drift also given as a polynomial of qx and qy

10.39 HMON—A horizontal position monitor, accepting a rpn equation for the readout as a function of the actual position (x).

10.40 IBSCATTER—A simulation of intra-beam scattering.

10.41 ILMATRIX—An Individualized Linear Matrix for each particle for fast symplectic tracking with chromatic and amplitude-dependent effects

10.42 IONEFFECTS—Simulates ionization of residual gas and interaction with the beam.

10.43 KICKER—A combined horizontal-vertical steering magnet implemented as a matrix, up to 2nd order. For time-dependent kickers, see BUMPER.

10.44 KOCT—A canonical kick octupole.

10.45 KPOLY—A thin kick element with polynomial dependence on the coordinates in one plane.

10.46 KQUAD—A canonical kick quadrupole.

10.47 KQUSE—A canonical kick element combining quadrupole and sextupole fields.

10.48 KSEXT—A canonical kick sextupole, which differs from the MULT element with ORDER=2 in that it can be used for chromaticity correction.

10.49 LMIRROR—A mirror for light optics

10.50 LRWAKE—Long-range (inter-bunch and inter-turn) longitudinal and transverse wake

10.51 LSCDRIFT—Longitudinal space charge impedance

10.52 LSRMDLTR—A non-symplectic numerically integrated planar undulator including optional co-propagating laser beam for laser modulation of the electron beam.

10.53 LTHINLENS—A thin lens for light optics

10.54 MAGNIFY—An element that allows multiplication of phase-space coordinates of all particles by constants.

10.55 MALIGN—A misalignment of the beam, implemented as a zero-order matrix.

10.56 MAPSOLENOID—A numerically-integrated solenoid specified as a map of (Bz, Br) vs (z, r).

10.57 MARK—A marker, equivalent to a zero-length drift space.

10.58 MATR—Explicit matrix input from a text file, in the format written by the print_matrix command.

10.59 MATTER—A Coulomb-scattering and energy-absorbing element simulating material in the beam path.

10.60 MAXAMP—A collimating element that sets the maximum transmitted particle amplitudes for all following elements, until the next MAXAMP.

10.61 MBUMPER—A time-dependent multipole kicker magnet. The waveform is in SDDS format, with time in seconds and amplitude normalized to 1.

10.62 MHISTOGRAM—Request for multiple dimensions (1, 2, 4 or 6) histogram output of particle coordinates.

10.63 MODRF—A first-order matrix RF cavity with exact phase dependence, plus optional amplitude and phase modulation.

10.64 MONI—A two-plane position monitor, accepting two rpn equations for the readouts as a function of the actual positions (x and y).

10.65 MRFDF—Zero-length Multipole RF DeFlector from dipole to decapole

10.66 MULT—A canonical kick multipole.

10.67 NIBEND—A numerically-integrated dipole magnet with various extended-fringe-field models.

10.68 NISEPT—A numerically-integrated dipole magnet with a Cartesian gradient.

10.69 OCTU—An octupole implemented as a third-order matrix. Use KOCT for symplectic tracking.

10.70 PEPPOT—A pepper-pot plate.

10.71 PFILTER—An element for energy and momentum filtration.

10.72 QUAD—A quadrupole implemented as a matrix, up to 3rd order. Use KQUAD for symplectic tracking.

10.73 QUFRINGE—An element consisting of a linearly increasing or decreasing quadrupole field.

10.74 RAMPP—A momentum-ramping element that changes the central momentum according to an SDDS-format file of the momentum factor vs time in seconds.

10.75 RAMPRF—A voltage-, phase-, and/or frequency-ramped RF cavity, implemented like RFCA.

10.76 RBEN—A rectangular dipole, implemented as a SBEND with edge angles, up to 2nd order. Use CSBEND for symplectic tracking.

10.77 RCOL—A rectangular collimator.

10.78 RECIRC—An element that defines the point to which particles recirculate in multi-pass tracking

10.79 REFLECT—Reflects the beam back on itself, which is useful for multiple beamline matching.

10.80 REMCOR—An element to remove correlations from the tracked beam to simulate certain types of correction.

10.81 RFCA—A first-order matrix RF cavity with exact phase dependence.

10.82 RFCW—A combination of RFCA, WAKE, TRWAKE, and LSCDRIFT.

10.83 RFDF—A simple traveling or standing wave deflecting RF cavity.

10.84 RFMODE—A simulation of a beam-driven TM monopole mode of an RF cavity.

10.85 RFTM110—Tracks through a TM110-mode (deflecting) rf cavity with all magnetic and electric field components. NOT RECOMMENDED—See below.

10.86 RFTMEZ0—A TM-mode RF cavity specified by the on-axis Ez field.

10.87 RIMULT—Multiplies radiation integrals by a given factor. Use to compute emittance for collection of various types of cells.

10.88 RMDF—A linearly-ramped electric field deflector, using an approximate analytical solution FOR LOW ENERGY PARTICLES.

10.89 ROTATE—An element that rotates the beam about the longitudinal axis.

10.90 SAMPLE—An element that reduces the number of particles in the beam by interval-based or random sampling.

10.91 SBEN—A sector dipole implemented as a matrix, up to 2nd order. Use CSBEND for symplectic tracking.

10.92 SCATTER—A scattering element to add gaussian random numbers to particle coordinates.

10.93 SCMULT—Tracks through a zero length multipole to simulate space charge effects

10.94 SCRAPER—A collimating element that sticks into the beam from one side only. The directions 0, 1, 2, and 3 are from +x, +y, -x, and -y, respectively.

10.95 SCRIPT—An element that allows transforming the beam using an external script.

10.96 SEXT—A sextupole implemented as a matrix, up to 3rd order. Use KSEXT for symplectic tracking.

10.97 SHRFDF—Simulation through space harmonics of zero length deflecting cavity.

10.98 SLICE—Performs slice-by-slice analysis of the beam for output to a file.

10.99 SOLE—A solenoid implemented as a matrix, up to 2nd order.

10.100 SPEEDBUMP—Simulates a semi-circular protuberance from one or both walls of the chamber.

10.101 SREFFECTS—Lumped simulation of synchrotron radiation effects (damping and quantum excitation) for rings.

10.102 STRAY—A stray field element with local and global components. Global components are defined relative to the initial beamline direction.

10.103 TAPERAPC—A tapered aperture that is a section of a circular cylinder.

10.104 TAPERAPE—A tapered elliptical aperture.

10.105 TAPERAPR—A tapered rectangular aperture.

10.106 TFBDRIVER—Driver for a turn-by-turn feedback loop

10.107 TFBPICKUP—Pickup for a turn-by-turn feedback loop

10.108 TMCF—A numerically-integrated accelerating TM RF cavity with spatially-constant fields.

10.109 TRCOUNT—An element that defines the point from which transmission calculations are made.

10.110 TRFMODE—A simulation of a beam-driven TM dipole mode of an RF cavity.

10.111 TRWAKE—Transverse wake specified as a function of time lag behind the particle.

10.112 TSCATTER—An element to simulate Touschek scattering.

10.113 TUBEND—A special rectangular bend element for top-up backtracking.

10.114 TWISS—Sets Twiss parameter values.

10.115 TWLA—A numerically-integrated first-space-harmonic traveling-wave linear accelerator.

10.116 TWMTA—A numerically-integrated traveling-wave muffin-tin accelerator.

10.117 TWPL—A numerically-integrated traveling-wave stripline deflector.

10.118 UKICKMAP—An undulator kick map (e.g., using data from RADIA).

10.119 VKICK—A vertical steering dipole implemented as a matrix, up to 2nd order. Use EVKICK for symplectic tracking.

10.120 VMON—A vertical position monitor, accepting a rpn equation for the readout as a function of the actual position (y).

10.121 WAKE—Longitudinal wake specified as a function of time lag behind the particle.

10.122 WATCH—A beam property/motion monitor–allowed modes are centroid, parameter, coordinate, and fft.

10.123 WIGGLER—A wiggler or undulator for damping or excitation of the beam.

10.124 ZLONGIT—A simulation of a single-pass broad-band or functionally specified longitudinal impedance.

10.125 ZTRANSVERSE—A simulation of a single-pass broad-band or functionally-specified transverse impedance.

11 Examples

12 The rpn Calculator

13 Change Log

13.1 Highlights of What’s New in Version 2019.4.0

13.2 Highlights of What’s New in Version 2019.3.0

13.3 Highlights of What’s New in Version 2019.2.1

13.4 Highlights of What’s New in Version 2019.1.1

13.5 Highlights of What’s New in Version 35.1.0

13.6 Highlights of What’s New in Version 35.0.1

13.7 Highlights of What’s New in Version 34.4.0

13.8 Highlights of What’s New in Version 34.3.0, June 14, 2018

13.9 Highlights of What’s New in Version 34.2.0, March 22, 2018

13.10 Highlights of What’s New in Version 34.1.0, 27 February 2018

13.11 Highlights of What’s New in Version 34.0, 31 October 2017

13.12 Highlights of What’s New in Version 33.1.1, 25 July 2017

13.13 Highlights of What’s New in Version 33.0, March 3, 2017

13.14 Highlights of What’s New in Version 32.0, 5 Jan. 2017

13.15 Highlights of What’s New in Version 31.0, 1 Oct. 2016

13.16 Highlights of What’s New in Version 30.1, 3 Aug. 2016

13.17 Highlights of What’s New in Version 30.0, 5 July 2016

13.18 Highlights of What’s New in Version 29.1, 3 March 2016

13.19 Highlights of What’s New in Version 29.0, 15 Jan. 2016

13.20 Highlights of What’s New in Version 28.1.0, 23 July 2015

13.21 Highlights of What’s New in Version 28.0.0, 18 June 2015

References