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