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.0 KB
|
Line | |
---|
1 | function [DSx DSz] = modelchrosensitivity(varargin) |
---|
2 | %modelchrosensitivity - Computes sextupole change for a given dxi |
---|
3 | % |
---|
4 | % INPUTS |
---|
5 | % 1. dxix - horizontal tune change |
---|
6 | % 2. dxiz - vertical tune change |
---|
7 | % |
---|
8 | % OUTPUTS |
---|
9 | % 1. DSx - sextupole change to get dxix |
---|
10 | % 2. DSz - sextupole change to get dxiz |
---|
11 | % |
---|
12 | % See Also modeltunesensitivity |
---|
13 | |
---|
14 | % |
---|
15 | % Written by Laurent S. Nadolski |
---|
16 | |
---|
17 | if isempty(varargin) |
---|
18 | dxix = 1e-1; |
---|
19 | dxiz = 1e-1; |
---|
20 | elseif nvargin == 1 |
---|
21 | dxix = dxiz; |
---|
22 | end |
---|
23 | |
---|
24 | fprintf('Sextupole change for dxix of %f and dxiz = %f \n',dxix,dxiz); |
---|
25 | |
---|
26 | % get all sextupoles |
---|
27 | a = findmemberof('SEXT'); |
---|
28 | |
---|
29 | for k = 1:10 |
---|
30 | |
---|
31 | Family = a{k}; |
---|
32 | |
---|
33 | [bx bz] = modeltwiss('beta',Family); |
---|
34 | [etax etaz] = modeldisp(Family); |
---|
35 | |
---|
36 | L = getleff(Family); |
---|
37 | NQ = length(getspos(Family)); |
---|
38 | |
---|
39 | DSx(k) = 2*pi*dxix/bx(1)/etax(1)/NQ/L(1); |
---|
40 | DSz(k) = -2*pi*dxiz/bz(1)/etax(1)/NQ/L(1); |
---|
41 | |
---|
42 | fprintf('%s : DSxL = %1.2e DSzL = %1.2e betax = %2.2f m betaz = %2.2f m etax = %2.2f m NQ = %2.0f L= %1.2e m \n', ... |
---|
43 | Family, DSx(k)*L(1), DSz(k)*L(1), bx(1), bz(1), etax(1), NQ, L(1)); |
---|
44 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.