ATPASS is a numerical tracking engine for AT 1.3 ROUT = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS) LATTICE AT lattice RIN 6xN matrix: input coordinates of N particles MODE 0 - reuse lattice 1 - new lattice NTURNS number of turns REFPTS Indexes of elements where the trajectory is observed May run from 1 to length(LATTICE)+1 ROUT = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS,PREFUNC,POSTFUNC) PREFUNC function called before each element POSTFUNC function called after each element [ROUT,LOST] = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS,PREFUNC,POSTFUNC,NHIST) Returns additionally information on lost particles NHIST length of history buffer LOST 1x1 structure with the following fields: turn 1xN vector, turn number where the particle is lost element 1xN vector, element number where the particle is lost coordinates 6xNxNHIST matrix, coordinates at the entrance of the element where the particle was lost See also RINGPASS, LINEPASS
0001 function varargout=atpass(varargin) %#ok<STOUT> 0002 %ATPASS is a numerical tracking engine for AT 1.3 0003 % ROUT = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS) 0004 % 0005 % LATTICE AT lattice 0006 % RIN 6xN matrix: input coordinates of N particles 0007 % MODE 0 - reuse lattice 0008 % 1 - new lattice 0009 % NTURNS number of turns 0010 % REFPTS Indexes of elements where the trajectory is observed 0011 % May run from 1 to length(LATTICE)+1 0012 % 0013 % ROUT = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS,PREFUNC,POSTFUNC) 0014 % PREFUNC function called before each element 0015 % POSTFUNC function called after each element 0016 % 0017 % [ROUT,LOST] = ATPASS(LATTICE,RIN,MODE,NTURNS,REFPTS,PREFUNC,POSTFUNC,NHIST) 0018 % Returns additionally information on lost particles 0019 % 0020 % NHIST length of history buffer 0021 % LOST 1x1 structure with the following fields: 0022 % turn 1xN vector, turn number where the particle is lost 0023 % element 1xN vector, element number where the particle is lost 0024 % coordinates 6xNxNHIST matrix, coordinates at the entrance of the 0025 % element where the particle was lost 0026 % 0027 % See also RINGPASS, LINEPASS 0028 error('at:missingMex','missing MEX file.'); 0029 end