source: MML/trunk/machine/SOLEIL/common/naff/naffutils/plotnudpT.m

Last change on this file was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1function plotnudpT(file)
2% function plotnudpT(file)
3% plot tune shift with energy from tracy output file
4
5if nargin < 1
6    file ='nudp.out'
7end
8
9try
10    [header data] = hdrload(file);
11catch
12    error('Error while opening filename %s',file)
13end
14
15%% energy in percent
16dp = data(:,1)*100;
17
18%% fractional tunes
19nux = data(:,2);
20nuz = data(:,3);
21nux(nux==0)=NaN;
22nuz(nuz==0)=NaN;
23
24%% closed orbit
25xcod = data(:,4)*1e3;
26zcod = data(:,5)*1e3;
27
28%% Set default properties
29set(0,'DefaultAxesXgrid','on');
30set(0,'DefaultAxesYgrid','on');
31
32%% Plot
33figure(44)
34subplot(1,2,1)
35plot(dp,nux,'.')
36xlabel('\delta (%)')
37ylabel('\nu_x')
38
39subplot(1,2,2)
40plot(dp,nuz,'.')
41xlabel('\delta (%)')
42ylabel('\nu_z')
43suptitle('Tune shift with energy')
44
45addlabel(0,0,datestr(now))
46
47h=figure(45)
48pos=get(h,'Position');
49set(h,'Position', [pos(1:2)  900 380]);
50subplot(1,2,1)
51plot(dp,xcod,'.')
52xlabel('\delta (%)')
53ylabel('xcod (mm)')
54
55subplot(1,2,2)
56plot(dp,zcod,'.')
57xlabel('\delta (%)')
58ylabel('zcod (mm)')
59suptitle('Closed orbit variation with energy')
60
61addlabel(0,0,datestr(now))
62
63figure(441)
64plot(dp,1-nux,'-r');hold on
65plot(dp,1-nuz,'-b');hold on
66xlabel('\delta (%)')
67ylabel('\nu')
Note: See TracBrowser for help on using the repository browser.