Home > atdemos > tracking > generateTrackData.m

generateTrackData

PURPOSE ^

give some initial coordinates. Track through sample lattices.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

give some initial coordinates.  Track through sample lattices.
Store results for tracking tests.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %give some initial coordinates.  Track through sample lattices.
0002 %Store results for tracking tests.
0003 xextent = 0.003;
0004 yextent = 0.003;
0005 deltaextent = 0.02;
0006 n = 10;
0007 Z0=[];
0008 for j=-n:n
0009     for k=-n:n
0010         for l=-n:n
0011         x0=j*xextent/n;
0012         y0=k*yextent/n;
0013         delta0=l*deltaextent/n;
0014         PS0=[x0;0;y0;0;deltaextent;0];
0015         Z0=[Z0,PS0];
0016         end
0017     end
0018 end
0019 %Now, load each lattice and track
0020 dba_ring=dba;
0021 FODO_ring=FODO;
0022 AS_ring=australian_synchrotron;
0023 esrf_ring=esrf;
0024 soleil_ring=soleil;
0025 thomx_ring=thomx;
0026 
0027 Z1_dba=ringpass(dba_ring,Z0,1);
0028 Z1_FODO=ringpass(FODO_ring,Z0,1);
0029 Z1_AS=ringpass(AS_ring,Z0,1);
0030 Z1_esrf=ringpass(esrf_ring,Z0,1);
0031 Z1_soleil=ringpass(soleil_ring,Z0,1);
0032 Z1_thomx=ringpass(thomx_ring,Z0,1);
0033 
0034 save('trackTestData.mat','Z0','Z1_dba','Z1_FODO','Z1_AS','Z1_esrf','Z1_soleil','Z1_thomx')

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005