- type: setup/action command.
- function: provide output of the orbit/trajectory correction matrix.
- sequence: must follow run_setup and definition of steering elements (if wanted, with steering_element).
- Command syntax, including use of equations and subcommands, is discussed in 7.2.

&correction_matrix_output

STRING response[4] = NULL, NULL;

STRING inverse[2] = NULL, NULL;

long KnL_units = 0;

long BnL_units = 0;

long output_at_each_step = 0;

long output_before_tune_correction = 0;

long fixed_length = 0;

long coupled = 0;

long use_response_from_computed_orbits = 0;

&end

STRING response[4] = NULL, NULL;

STRING inverse[2] = NULL, NULL;

long KnL_units = 0;

long BnL_units = 0;

long output_at_each_step = 0;

long output_before_tune_correction = 0;

long fixed_length = 0;

long coupled = 0;

long use_response_from_computed_orbits = 0;

&end

- response — Array of (incomplete) filenames for SDDS output of the x and y response matrices, plus the cross-plane response matrices. Recommended values, in order: “%s.hrm” (horizontal response to horizontal correctors), “%s.vrm” (vertical response to vertical correctors), “%s.vhrm” (vertical response to horizontal correctors), and “%s.hvrm” (horizontal response to vertical correctors).
- inverse — Array of (incomplete) filenames for SDDS output of the x and y inverse response matrices. Recommended values: “%s.hirm” and “%s.virm”.
- KnL_units — Flag that, if set, indicates use of “units” of m/K0L rather than m/rad. This results in a sign change for the horizontal data.
- BnL_units — Flag that, if set, indicates use of “units” of m/(T*m) rather than m/rad. This is useful for linac work in that the responses are automatically scaled with beam momentum.
- output_at_each_step — Flag that, if set, specifies output of the data at each simulation step. By default, the data is output immediately for the defined lattice.
- output_before_tune_correction — Flag that, if set, specifies that when output_at_each_step is set, that output shall occur prior to correcting the tunes.
- fixed_length — Flag that, if set, specifies output of the fixed-path-length matrix.
- coupled — If nonzero, the cross-plane response matrices are computed.
- use_response_from_computed_orbits — If nonzero, in-plane response matrices are computed using differences of closed orbits, which is slower but may be more accurate. For cross-plane matrices, this is always the case.

correct_tunes