source: MML/trunk/mml/at/ploteta.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.0 KB
Line 
1function 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
17if nargin == 0
18        global THERING
19        RING = THERING;
20end
21
22[TD, tune] = twissring(THERING,0,1:length(THERING)+1,'chroma');
23ETA        = cat(2,TD.Dispersion)';
24S          = cat(1,TD.SPos);
25
26disp(tune)
27
28% figure
29% plot betax and betay in two subplots
30
31h1 = subplot(5,1,[1 2]);
32plot(S,ETA(:,1),'.-b');
33ylabel('\eta_x [m]');
34xlim([0 S(end)]);
35
36title('Dispersion functions');
37
38h2 = subplot(5,1,3);
39drawlattice
40set(h2,'YTick',[])
41
42h3 = subplot(5,1,[4 5]);
43plot(S,ETA(:,3),'.-r');
44xlabel('s - position [m]');
45ylabel('\eta_z [m]');
46
47linkaxes([h1 h2 h3],'x')
48set([h1 h2 h3],'XGrid','On','YGrid','On');
Note: See TracBrowser for help on using the repository browser.