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 varargout = plotbeta(varargin) |
---|
2 | % PLOTETA plots UNCOUPLED! eta-functions |
---|
3 | % |
---|
4 | % INPUTS |
---|
5 | % 0. PLOTETA with no argumnts uses THERING as the default lattice |
---|
6 | % 1. RING - PLOTETA(RING) calculates eta functions of the lattice RING |
---|
7 | % |
---|
8 | % NOTES |
---|
9 | % 1. PLOTETA uses FINDORBIT4 and LINOPT which assume a lattice |
---|
10 | % with NO accelerating cavities and NO radiation |
---|
11 | % |
---|
12 | % See also plotcod, plotbeta |
---|
13 | |
---|
14 | % Written by Andrei Terebilo |
---|
15 | % Modified by Laurent S. Nadolski |
---|
16 | |
---|
17 | if nargin == 0 |
---|
18 | global THERING |
---|
19 | RING = THERING; |
---|
20 | end |
---|
21 | |
---|
22 | [TD, tune] = twissring(THERING,0,1:length(THERING)+1,'chroma'); |
---|
23 | ETA = cat(2,TD.Dispersion)'; |
---|
24 | S = cat(1,TD.SPos); |
---|
25 | |
---|
26 | disp(tune) |
---|
27 | |
---|
28 | % figure |
---|
29 | % plot betax and betay in two subplots |
---|
30 | |
---|
31 | h1 = subplot(5,1,[1 2]); |
---|
32 | plot(S,ETA(:,1),'.-b'); |
---|
33 | ylabel('\eta_x [m]'); |
---|
34 | xlim([0 S(end)]); |
---|
35 | |
---|
36 | title('Dispersion functions'); |
---|
37 | |
---|
38 | h2 = subplot(5,1,3); |
---|
39 | drawlattice |
---|
40 | set(h2,'YTick',[]) |
---|
41 | |
---|
42 | h3 = subplot(5,1,[4 5]); |
---|
43 | plot(S,ETA(:,3),'.-r'); |
---|
44 | xlabel('s - position [m]'); |
---|
45 | ylabel('\eta_z [m]'); |
---|
46 | |
---|
47 | linkaxes([h1 h2 h3],'x') |
---|
48 | set([h1 h2 h3],'XGrid','On','YGrid','On'); |
---|
Note: See
TracBrowser
for help on using the repository browser.