- description: Computes ion trapping conditions using elegant twiss parameter output as input.
- synopsis:
ionTrapping -twiss filename -superPeriods number -kappa ratio -output filename -current mA -bunches number

- switches:
- twiss — Give the name of a Twiss output file from elegant. It is advisable to subdivide the elements finely enough to get smooth representations of the lattice functions. The file should be computed the radiation integrals turned on, since the natural emittance and energy spread are needed.
- superPeriods — Give the number of superperiods of the basic cell described by the Twiss output file.
- kappa — Give the ratio ϵ
_{y}∕ϵ_{x}. The emittances are computed from ϵ_{0}using ϵ_{x}= and ϵ_{y}= κϵ_{x}. - output — Give the name of the output file. The file contains the information in the input file,
with the following added elements, among others:
- Column Acrit — A
_{crit}(s) is defined as[49](14) where N

_{e}number of electrons per bunch, r_{p}is the classical proton radius, S_{b}is the bunch separation in meters, σ_{x}(s) is the local horizontal rms beam size, and σ_{y}(s) is the local vertical rms beam size. Any singly-ionized species with atomic mass greater than A_{crit}will be trapped. - Parameters ex, ey — The horizontal and vertical emittances.
- Parameter AcritMin — Minimum value of A
_{crit}(s). - Parameters speciesTrappedFraction, where species is H2, H2O, CH4, CO, and CO2. These
give the fraction of the circumference over which H
_{2}, H_{2}O, CH_{4}, CO, and CO_{2}, respectively, are trapped.

- Column Acrit — A
- current — Give the total beam current milliAmps.
- bunches — Give the number of bunches.

- authors: M. Borland (ANL/APS).

elegantto