&modulate_elements STRING name = NULL; STRING item = NULL; STRING type = NULL; STRING expression = NULL; STRING filename = NULL; STRING time_column = NULL; STRING amplitude_column = NULL; long refresh_matrix = 0; long differential = 1; long multiplicative = 0; long start_occurence = 0; long end_occurence = 0; double s_start = -1; double s_end = -1; STRING before = NULL; STRING after = NULL; long verbose = 0; &end
N.B.: This command will produce unpredictable results when used with
load_parameters (except when
It should work properly with
link_elements in turn-by-turn mode
when the source element is modulated, but not when the target element
name-- A possibly-wildcard-containing string giving the names of the elements to modulate. If not specified, then one must specify
item-- The name of the parameter to modulate.
type-- A possibly-wildcard-containing string giving the names of element types to modulate. May be specified with
nameor by itself.
expression-- RPN expression for the modulation amplitude . The value of the time is on top of the stack.
filename-- Name of SDDS file from which to read modulation data, if
expressionis not used.
time_column-- Name of column in
filenamegiving time data for the modulation table.
amplitude_column-- Name of column in
filenamegiving amplitude data for the modulation. Together,
amplitude_columndefine a function .
refresh_matrix-- Frequently there is a matrix associated with an element even if tracking through the element does not use the matrix. In this case, elegant doesn't normally update the matrix for the element as it modulates the element, since that may involve a significant time penalty. If this parameter is set to a non-zero value, the matrix will be updated. For elements that use a matrix for tracking, the matrix is always updated.
multiplicative-- Determine how the amplitude function is used to obtain the new value of the parameter. There are four cases
end_occurence-- If nonzero, these give the starting and ending occurrence numbers of elements that will be modulated. N.B.: if wildcards are used, occurrence number counting is for each set of identically-named elements separately, rather than for the sequence of matched elements.
s_end-- If non-negative, these give the gaving and ending position limits for the end-of-element locations of elements to be modulated.
after-- The name of an element. If given, the modulation is applied only to elements that follow the named element in the beamline.
before-- The name of an element. If given, the modulation is applied only to elements that precede the named element in the beamline.
verbose-- If nonzero, information is printed to the standard output as changes are made. Use for debugging only, since otherwise it may slow the simulation.