** Next:** coupled_twiss_output
** Up:** Namelist Command Dictionary
** Previous:** correction_matrix_output

##

correct_tunes

- type: setup command.
- function: set up for correction of the tunes.

&correct_tunes
STRING quadrupoles = NULL;
double tune_x = 0;
double tune_y = 0;
long n_iterations = 5;
double correction_fraction = 0.9;
double tolerance = 0;
long step_up_interval = 0;
double max_correction_fraction = 0.9;
double delta_correction_fraction = 0.1;
STRING strength_log = NULL;
long change_defined_values = 0;
long use_perturbed_matrix = 0;
&end

`quadrupoles`

-- List of names of quadrupoles to be used. Only two may be given.
`tune_x`

, `tune_y`

-- Desired x and y tune values. If not given, the desired values are
assumed to be the unperturbed tunes.
`n_iterations`

-- The number of iterations of the correction to perform.
`correction_fraction`

-- The fraction of the correction to apply at each iteration.
`tolerance`

-- When both tunes are within this value of the desired tunes, the
iteration is stopped.
`step_up_interval`

-- Interval between increases in the correction fraction.
`max_correction_fraction`

-- Maximum correction fraction to allow.
`delta_correction_fraction`

-- Change in correction fraction after
each `step_up_interval`

steps.
`strength_log`

-- The (incomplete) name of a SDDS file to which the quadrupole
strengths will be written as correction proceeds. Recommended value: ``%s.qst''.
`change_defined_values`

-- Changes the defined values of the quadrupole strengths.
This means that when the lattice is saved (using `save_lattice`

), the quadrupoles will
have the corrected values. This would be used for correcting the tunes of a design
lattice, for example, but not for correcting tunes of a perturbed lattice.
`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.

** Next:** coupled_twiss_output
** Up:** Namelist Command Dictionary
** Previous:** correction_matrix_output
Robert Soliday
2014-03-21