ATSEXTUPOLE(FAMNAME,LENGTH,S,PASSMETHOD) creates a sextupole element with class 'Sextupole' FAMNAME family name LENGTH length [m] S strength [m-2] PASSMETHOD tracking function, defaults to 'StrMPoleSymplectic4Pass' ATSEXTUPOLE(FAMNAME,LENGTH,S,PASSMETHOD,'FIELDNAME1',VALUE1,...) Each pair {'FIELDNAME',VALUE} is added to the element See also: ATDRIFT, ATQUADRUPOLE, ATMULTIPOLE, ATSBEND, ATRBEND ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR
0001 function elem=atsextupole(fname,varargin) 0002 %ATSEXTUPOLE(FAMNAME,LENGTH,S,PASSMETHOD) 0003 % creates a sextupole element with class 'Sextupole' 0004 % 0005 %FAMNAME family name 0006 %LENGTH length [m] 0007 %S strength [m-2] 0008 %PASSMETHOD tracking function, defaults to 'StrMPoleSymplectic4Pass' 0009 % 0010 %ATSEXTUPOLE(FAMNAME,LENGTH,S,PASSMETHOD,'FIELDNAME1',VALUE1,...) 0011 % Each pair {'FIELDNAME',VALUE} is added to the element 0012 % 0013 %See also: ATDRIFT, ATQUADRUPOLE, ATMULTIPOLE, ATSBEND, ATRBEND 0014 % ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR 0015 0016 [rsrc,L,S,method]=decodeatargs({0,[],'StrMPoleSymplectic4Pass'},varargin); 0017 [L,rsrc]=getoption(rsrc,'Length',L); 0018 [method,rsrc]=getoption(rsrc,'PassMethod',method); 0019 [PolynomB,rsrc]=getoption(rsrc,'PolynomB',[0 0 0]); 0020 [cl,rsrc]=getoption(rsrc,'Class','Sextupole'); 0021 if ~isempty(S), PolynomB(3)=S; end 0022 elem=atbaselem(fname,method,'Class',cl,'Length',L,... 0023 'PolynomB',PolynomB,rsrc{:}); 0024 end