MADX2AT#
Functions
determines atribute and sets field in sxs{i} structure AT |
|
function atfrommadx(seqfilemadX,E0,outfilename) |
|
given a list (cell array) of elements with specified field Spos (center of element (madx default)) in a |
|
if CEL_CEL is a cell array of structures and cell arrays it converts it a |
- ParseAtributesMADX_2_AT()#
- determines atribute and sets field in sxs{i} structure ATcreated 6-sept-2012
- atfrommadx()#
- function atfrommadx(seqfilemadX,E0,outfilename)tansform madX sequence file (savesequence) file into AT lattice structure.This procedure reads a saved lattice (sequence in madx) in madXand converts it to an AT lattice(madx comands to save the sequences :_______ MADX code _________use,period=sequencename1;use,period=sequencename2;use,period=sequencename2;SAVE,FILE=’seqfilemadX.seq’;___________________________seqfilemadX.seq will contain sequencename1 sequencename2 sequencename3in the correct format in a single file)The routine outputs a Matlab macro with all the AT defitions and variables asin the madX fileThe order of the declarations is the same in the two files.declarations that contain other variables are moved to the end. (this may not be enough)Works also with single madX files not containing comands, onlydefinitions.parameters:- seqfilemadX=name of the mad8 lattice file- E0 = design energy- outfilename (default: seqfilemadX_AT_LATTICE.mat)default pass methods:quadrupoles : StrMPoleSymplectic4Passdipole : BndMPoleSymplectic4Passmultipole : StrMPoleSymplectic4Passsextupole : StrMPoleSymplectic4Passthinmultipole : ThinMPolePasscorrectors : ThinMPolePasscavity : DriftPass
- buildATLattice()#
- given a list (cell array) of elements with specified field Spos (center of element (madx default)) in avector returns a cell array with elements without Spos field andappropriate Drifts spaces between. Drifts of the same length have the same name.
- reshapeToCellArray()#
- if CEL_CEL is a cell array of structures and cell arrays it converts it acell array of structures.