|
6 | 6 | %
|
7 | 7 | % RDT=computeRDT(ring, index, varargin)
|
8 | 8 | %
|
| 9 | +% INPUTS |
9 | 10 | % ring is the AT lattice
|
10 | 11 | % index is the vector of indexes where one wants to compute RDTs
|
11 | 12 | % The additional arguments can be up to five strings:
|
12 | 13 | % chromatic, coupling, geometric1, geometric2 and tuneshifts
|
| 14 | +% |
| 15 | +% OPTIONS (order does not matter) |
| 16 | +% dp: Default 0. Energy offset to calculate the optics parameters. |
13 | 17 | %
|
14 |
| -% example: |
| 18 | +% EXAMPLES |
15 | 19 | % RDT=computeRDT(ring, indexBPM, 'geometric1', 'tuneshifts');
|
16 | 20 | % creates an array of structs (the length of the array is the number of
|
17 | 21 | % indexes where you want to compute driving terms) with first order
|
18 | 22 | % geometric driving terms and tune shifts with amplitude.
|
19 | 23 | % The driving terms are complex numbers, the tune shifts are real.
|
20 | 24 | %
|
| 25 | +% RDT=computeRDT(ring, indexBPM, 'geometric1', 'dp',0.01); |
| 26 | +% Calculate the first order geometric RDTs using the optics with |
| 27 | +% 0.01 energy offset. |
21 | 28 |
|
22 | 29 | naddvar=length(varargin);
|
| 30 | +[dp,args] = getoption(varargin,'dp',0); |
23 | 31 | chromatic=0;
|
24 | 32 | coupling=0;
|
25 | 33 | geometric1=0;
|
26 | 34 | geometric2=0;
|
27 | 35 | tuneshifts=0;
|
28 | 36 | for ii=1:naddvar
|
29 |
| - switch varargin{ii} |
| 37 | + switch args{ii} |
30 | 38 | case 'chromatic'
|
31 | 39 | chromatic=1;
|
32 | 40 | case 'coupling'
|
|
55 | 63 |
|
56 | 64 | indDQSO=findcells(ring,'Class','Bend','Quadrupole','Sextupole','Octupole','Multipole');
|
57 | 65 |
|
58 |
| -[~,AVEBETA,AVEMU,AVEDISP,~,~]=atavedata(ring,0,1:length(ring)); |
| 66 | +[~,AVEBETA,AVEMU,AVEDISP,~,~]=atavedata(ring,dp,1:length(ring)); |
59 | 67 |
|
60 | 68 | Lin=atlinopt(ring,0,1:(length(ring)+1));
|
61 | 69 |
|
|
0 commit comments