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