0001 function out = testTracking
0002
0003
0004
0005 xextent = 0.003;
0006 yextent = 0.003;
0007 deltaextent = 0.02;
0008 n = 10;
0009 Z0=[];
0010 for j=-n:n
0011 for k=-n:n
0012 for l=-n:n
0013 x0=j*xextent/n;
0014 y0=k*yextent/n;
0015 delta0=l*deltaextent/n;
0016 PS0=[x0;0;y0;0;deltaextent;0];
0017 Z0=[Z0,PS0];
0018 end
0019 end
0020 end
0021
0022 dba_ring=dba;
0023 FODO_ring=FODO;
0024 AS_ring=australian_synchrotron;
0025 esrf_ring=esrf;
0026 soleil_ring=soleil;
0027 thomx_ring=thomx;
0028
0029 Z1_dba_=ringpass(dba_ring,Z0,1);
0030 Z1_FODO_=ringpass(FODO_ring,Z0,1);
0031 Z1_AS_=ringpass(AS_ring,Z0,1);
0032 Z1_esrf_=ringpass(esrf_ring,Z0,1);
0033 Z1_soleil_=ringpass(soleil_ring,Z0,1);
0034 Z1_thomx_=ringpass(thomx_ring,Z0,1);
0035
0036 load trackTestData.mat
0037
0038 epsilon=1e-15;
0039
0040 out=[max(max(Z1_dba_-Z1_dba))<epsilon,max(max(Z1_FODO_-Z1_FODO))<epsilon,...
0041 max(max(Z1_AS_-Z1_AS))<epsilon,max(max(Z1_esrf_-Z1_esrf))<epsilon,...
0042 max(max(Z1_soleil_-Z1_soleil))<epsilon,max(max(Z1_thomx_-Z1_thomx))<epsilon];