moments_output

- type: action/setup command.
- function: compute periodic or non-periodic beam moments, optionally including radiation

&moments_output STRING filename = NULL; long output_at_each_step = 0; long output_before_tune_correction = 0; long final_values_only = 0; long verbosity = 0; long matched = 1; long equilibrium = 1; long radiation = 1; long n_slices = 10; double emit_x = 0; double beta_x = 0; double alpha_x = 0; double eta_x = 0; double etap_x = 0; double emit_y = 0; double beta_y = 0; double alpha_y = 0; double eta_y = 0; double etap_y = 0; double emit_z = 0; double beta_z = 0; double alpha_z = 0; &end

`filename`

-- The (incomplete) name of a file to which the moments results will be written. Recommended value: ``%s.mom''.`output_at_each_step`

-- A flag indicating, if set, that computations and/or output is desired at each step of the simulation. If you wish to compute Twiss parameters on a closed orbit or after other calculations, be sure to set this control to a nonzero value.`output_before_tune_correction`

-- A flag indicating, if set, that output is desired both before and after tune correction.`final_values_only`

-- A flag indicating, if set, that only the final values of the Twiss parameters should be output, and not the parameters as a function of s.`verbosity`

-- Larger numbers result in an increasing amount of informational output to the standard output stream.`matched`

-- A flag indicating, if set, that the periodic or matched moments should be found.`equilibrium`

-- A flag indicating, if set, that the equilibrium moments should be found. If`matched=1`

and`equilibrium=0`

, then the initial twiss parameters are computed from the periodic solution for the beamline.`radiation`

-- A flag indicating, if set, that synchrotron radiation effects should be included.`n_slices`

-- The number of slices into which to cut individual dipoles, quadrupoles, and sextuoples for computations. 10 has been found to work for all rings tested, but users are advised to ensure it is sufficient for their cases.`emit_x`

,`beta_x`

,`alpha_x`

,`eta_x`

,`etap_x`

, and related quantities for`y`

and`z`

-- If`matched=0`

, then these specify the starting beam ellipses in all three planes.

This command performs several functions. In the most basic form, it
propagates beam moments, i.e., the 6x6 sigma matrix, from the
beginning to the end of a transport line, including coupling from
rotated elements or offset sextupoles. This can be performed with or
without synchrotron radiation effects in dipoles, quadrupoles, and sextupoles.
(*NB: radiation effects are not yet included for wigglers!*) These computations
include the evolution of the trajectory due to errors and (if included)
synchrotron radiation.

If desired, the command will instead compute the periodic beam
moments. In this case, the user must include an appropriate rf cavity
in the lattice in order to get valid results. (By ``appropriate rf
cavity'' we mean that it must have the right voltage, frequency, and
phase to support stored beam.) It is also suggested that the user
compute the closed orbit using `closed_orbit`

so that the
computations are performed on the closed orbit.

The results of moments computation may be subjected to optimization
using values at marker elements. See the documentation for
`MARK`

for more details.