next up previous
Next: Element Dictionary Up: User's Manual for elegant Previous: sddsurgent

Accelerator and Element Description

As mentioned in the introduction, elegant uses a variant of the MAD input format for describing accelerators. With some exceptions, the accelerator description for one program can be read by the other with no modification. Among the differences:

elegant's lattice parser translates all input into upper case, except where the input is protected by double quotes. However, various commands (such as vary_element or link_elements) that accept element names as input do not perform any translation. Hence, when referring to element names in commands, the user must enter the names in upper case unless they are protected by double quotes in the lattice file.

elegant's print_dictionary command allows the user to obtain a list of names and short descriptions of all accelerator elements recognized by the program, along with the names, units, types, and default values of all parameters of each element. The present output of this command is listed in the next section. The reader is referred to the MAD manual[2] for details on sign conventions for angles, focusing strength, and so forth.

Comments may be embedded in the lattice file by starting a line with an exclamation point (``!''). Rpn expressions may be embedded separately from an element definition by starting a line with a percent sign (``For example

! Define pi
% 1 atan 4 * sto Pi
% Pi 40 / sto myAngle
! Define a rectangular bend for a ring with 80 equal bends
B1: SBEN,L=1.0,ANGLE=''myAngle'',E1=''myAngle 2 /'',E2=''myAngle 2 /''
(Note that pi is already defined in the standard defns.rpn file.)


next up previous
Next: Element Dictionary Up: User's Manual for elegant Previous: sddsurgent
Robert Soliday 2007-04-02