- type: setup command.
- function: set up for chromaticity correction.
- sequence: should follow twiss_output.
- Command syntax, including use of equations and subcommands, is discussed in 7.2.

&chromaticity

STRING sextupoles = NULL;

STRING exclude = NULL;

double dnux_dp = 0;

double dnuy_dp = 0;

double sextupole_tweek = 1e-3;

double correction_fraction = 0.9;

long n_iterations = 5;

double tolerance = 0;

STRING strength_log = NULL;

long change_defined_values = 0;

double strength_limit = 0;

long use_perturbed_matrix = 0;

long exit_on_failure = 0;

long update_orbit = 0;

long verbosity = 1;

double dK2_weight = 1;

&end

STRING sextupoles = NULL;

STRING exclude = NULL;

double dnux_dp = 0;

double dnuy_dp = 0;

double sextupole_tweek = 1e-3;

double correction_fraction = 0.9;

long n_iterations = 5;

double tolerance = 0;

STRING strength_log = NULL;

long change_defined_values = 0;

double strength_limit = 0;

long use_perturbed_matrix = 0;

long exit_on_failure = 0;

long update_orbit = 0;

long verbosity = 1;

double dK2_weight = 1;

&end

- sextupoles — List of names of elements to use to correct the chromaticities. Several names may be given and names may include wildcards. If so, then sextupoles in each group are changed by the same amount for each iteration. This would typically be used when the sextupoles are nominally identical (though perhaps differing in strength because of introduced errors). If that’s not the case, the iteration may fail to converge.
- exclude — List of names of elements to exclude. This may be used to exclude some sextupoles that are matched by wildcards in the sextupole list.
- dK2_weight — Weighting factor that is used to minimize the mean-square changes in K
_{2}values in the event that there are more than two families. - dnux_dp, dnuy_dp — Desired chromaticity values.
- sextupole_tweek — Amount by which to tweak the sextupoles to compute derivatives of chromaticities with respect to sextupole strength. [The word “tweak” is misspelled “tweek” in the code.]
- correction_fraction — Fraction of the correction to apply at each iteration. In some cases, correction is unstable at this number should be reduced.
- n_iterations — Number of iterations of the correction to perform.
- tolerance — Stop iterating when chromaticities are within this value of the desired values.
- strength_log — The (incomplete) name of an SDDS file to which the sextupole strengths will be written. Recommended value: “%s.ssl”.
- change_defined_values — Changes the defined values of the sextupole strengths. This means that when the lattice is saved (using save_lattice), the sextupoles will have the corrected values. This would be used for correcting the chromaticity of a design lattice, for example, but not for correcting chromaticity of a perturbed lattice.
- strength_limit — Limit on the absolute value of sextupole strength (K
_{2}). - use_perturbed_matrix — If nonzero, requests use of the perturbed correction matrix in performing correction. For difficult lattices with large errors, this may be necessary to obtain correction. In general, it is not necessary and only slows the simulation.
- exit_on_failure — If nonzero, then failure to reach the desired chromaticities within the tolerance results in the program exiting.
- update_orbit — If non-zero, the orbit calculation is updated after each n
^{th}adjustment of the sextupoles. - verbosity — Increasing positive values result in increasing amounts of information printed during execution.

closed_orbit