7.23 correct_lattice
- type: setup command. Execution is deferred to the simulation steps loop (like chromaticity
and correct_tunes), where the correction is performed once per simulation step between
coupling correction and tune correction.
- function: drive the linear lattice functions βx, βy, and ηx at the measurement locations
toward design values loaded from a user-supplied reference twiss file by adjusting selected
normal-quadrupole knobs. This emulates the LOCO-style [15] β-beat and dispersion channels
of real-machine optics correction, except that the LOCO lattice measurement is not simulated.
Instead, we assume that measurements can be performed, with optional user-defined errors.
- sequence: must follow run_setup and twiss_output. A track command (or another action
command that triggers the steps loop) must follow in order for the correction to actually run.
- N.B.: can use parallel resources (Pelegant) for response matrix computation. However,
the recommended sequence is to compute the response matrix using parallel resources
with compute_lattice_response_matrix, then use load_lattice_response_matrix when
performing the correction, particularly when post-correction simulation does not require
parallel resources. Correction itself does not benefit from parallel resources since it is based
on direct lattice function calculations, not simulated LOCO [15].
- Command syntax, including use of equations and subcommands, is discussed in 7.2.
&correct_lattice
STRING correction_elements = NULL;
STRING items = NULL;
STRING lower_limits = NULL;
STRING upper_limits = NULL;
STRING exclude = NULL;
STRING bind_name_pattern = NULL;
STRING measurement_elements = "*";
STRING measurement_types = "MONI";
long n_iterations = 3;
double convergence = 1e-9;
double change_tolerance = 0.1;
double correction_fraction = 0.5;
long use_perturbed_matrix = 0;
long adaptive_step = 0;
double response_perturbation = 1e-6;
double svd_threshold = 1e-6;
long n_singular_values = 0;
long auto_sv_threshold = 1;
double auto_sv_threshold_factor = 3.0;
double beta_measurement_noise = 0.0;
double eta_measurement_noise = 0.0;
double measurement_noise_cutoff = 3.0;
STRING reference_file = NULL;
double betax_weight = 1.0;
double betay_weight = 1.0;
double etax_weight = 1.0;
STRING strength_log = NULL;
STRING response_file = NULL;
STRING rms_log = NULL;
long reset_correctors_each_step = 1;
long verbosity = 0;
&end