run_setup. In action mode, must follow action-mode instance of
&rf_setup STRING filename = NULL; STRING name = NULL; long start_occurence = -1; long end_occurence = -1; double s_start = -1; double s_end = -1; long set_for_each_step = 0; double near_frequency = 0; long harmonic = -1; double bucket_half_height = 0; double over_voltage = 0; double total_voltage = 0; &end
This command must follow a
twiss_output command that includes radiation integral computation, since the
energy loss per turn is needed to set up the rf cavities.
Note that the command includes features to allow selecting a subset of the RFCA elements in the beamline.
The selected subset is assumed to include all of the cavities that will impart net energy to the beam.
This command stores values for bunch length in symbols
St0, and also stores the fractional
energy spread in
Sdelta0, where they can be used in rpn expressions in subsequent commands, e.g.,
&bunched_beam sigma_dp = "(Sdelta0)", sigma_s = "(Sz0)", ... &end
filename-- Name of a file to which data related to the rf settings will be written.
name-- A possibly-wildcard-containing string giving the names of the elements to set. If not given, all RFCA elements are selected.
end_occurence-- If nonzero, these give the starting and ending occurrence numbers of elements that will be set.
s_end-- If non-negative, these give the gaving and ending position limits for the end-of-element locations of elements to be set.
set_for_each_step-- If nonzero, then the setup is repeated at each simulation step. In this case, one must also give
near_frequency- If nonzero, then the rf frequency is chosen to be the closest harmonic to the given frequency.
harmonic-- If nonzero, then the rf frequency is set to the given harmonic of the revolution frequency.
bucket_half_height-- If nonzero, the voltage is computed so as to give the specified bucket half height.
over_voltage-- If nonzero, the voltage is set to the given factor relative to the energy loss per turn.
total_voltage-- If nonzero, the total rf voltage is set to the given value. The frequency and phase are computed for this voltage.