source: MML/trunk/at/simulator/element/user/wigtable.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 1.5 KB
Line 
1function z = wigtable(fname, L, Nslice, filename, method)
2% wigtable(fname, L, Nslice, filename, method)
3%
4% FamName       family name
5% Length    length[m]
6% Nslice        number of slices (1 means the wiggler is represented by a
7%           single kick in the center of the device).
8% filename      name of file with wiggler tracking tables.
9% method    name of the function to use for tracking
10%
11% The tracking table is described in
12% P. Elleaume, "A new approach to the electron beam dynamics in undulators
13% and wigglers", EPAC92.
14%
15% returns assigned address in the FAMLIST that is uniquely identifies
16% the family
17
18%---------------------------------------------------------------------------
19% Modification Log:
20% -----------------
21%
22%---------------------------------------------------------------------------
23
24ElemData.FamName        = fname;  % add check for identical family names
25ElemData.Length             = L;
26ElemData.Nslice             = Nslice;
27ElemData.MaxOrder               = 3;
28ElemData.NumIntSteps    = 10;
29ElemData.R1             = diag(ones(6,1));
30ElemData.R2             = diag(ones(6,1));
31ElemData.T1             = zeros(1,6);
32ElemData.T2             = zeros(1,6);
33ElemData.PassMethod     = method;
34
35load(filename);
36ElemData.xtable = x;
37ElemData.ytable = y;
38ElemData.xkick  = xkick;
39ElemData.ykick  = ykick;
40
41global FAMLIST
42z = length(FAMLIST)+1; % number of declare families including this one
43FAMLIST{z}.FamName = fname;
44FAMLIST{z}.NumKids = 0;
45FAMLIST{z}.KidsList= [];
46FAMLIST{z}.ElemData= ElemData;
Note: See TracBrowser for help on using the repository browser.