ATDRIFT(FAMNAME,LENGTH,PASSMETHOD) creates a drift space element with Class 'Drift' FAMNAME family name LENGTH length [m] PASSMETHOD tracking function, defaults to 'DriftPass' ATDRIFT(FAMNAME,LENGTH,PASSMETHOD,'FIELDNAME1',VALUE1,...) Each pair {'FIELDNAME',VALUE} is added to the element See also: ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR
0001 function elem=atdrift(fname,varargin) 0002 %ATDRIFT(FAMNAME,LENGTH,PASSMETHOD) 0003 % creates a drift space element with Class 'Drift' 0004 % 0005 %FAMNAME family name 0006 %LENGTH length [m] 0007 %PASSMETHOD tracking function, defaults to 'DriftPass' 0008 % 0009 %ATDRIFT(FAMNAME,LENGTH,PASSMETHOD,'FIELDNAME1',VALUE1,...) 0010 % Each pair {'FIELDNAME',VALUE} is added to the element 0011 % 0012 %See also: ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND 0013 % ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR 0014 0015 [rsrc,L,method]=decodeatargs({0,'DriftPass'},varargin); 0016 [L,rsrc]=getoption(rsrc,'Length',L); 0017 [method,rsrc]=getoption(rsrc,'PassMethod',method); 0018 [cl,rsrc]=getoption(rsrc,'Class','Drift'); 0019 elem=atbaselem(fname,method,'Class',cl,'Length',L,rsrc{:}); 0020 end