Converters#

Modules

AT2Elegant

AT2ELEGANT

AT2MAD8

AT2MAD8

AT2MADX

AT2MADX

AT2OPA

AT2OPA

ELEGANT2AT

ELEGANT2AT

MAD82MADX

MAD82MADX

MADX2AT

MADX2AT

Functions

readmad()

reads the file output of MAD commands

readmad(filename)#
reads the file output of MAD commands
TWISS, STRUCTURE, SURVEY.
atlattice = readmad(filename)
readmad reads the MAD file header to determine the number of elements
in the lattice, symmetry flag, the number of supperperiods etc.
Then it interprets the entry for each element in the MAD output file.
The topology of the lattice is completely determined by
Length, Bending Angle, and Ttilt Angle in each element
readmad uses MAD TYPES and the values of to determine
which pass-method function in AT to use.
MAD TYPE | AT PassMethod
———————————-
DRIFT | DriftPass
SBEND | BendLinearPass, BndMPoleSymplectic4Pass
QUADRUPOLE | QualdLinearPass
SEXTUPOLE | StrMPoleSymplectic4Pass
OCTUPOLE | StrMPoleSymplectic4Pass
MULTIPOLE | !!! Not implemented, in future - ThinMPolePass
RFCAVITY | RFCavityPass
KICKER | CorrectorPass
HKICKER | CorrectorPass
VKICKER | CorrectorPass
MONITOR | IdentityPass
HMONITOR | IdentityPass
VMONITOR | IdentityPass
MARKER | IdentityPass
———————————–
all others | Length=0 -> IdentityPass, Length~=0 -> DriftPass