1 | function plotchamberT(TracyVersion) |
---|
2 | % Plot vaccum chamber produced by Tracy code |
---|
3 | % |
---|
4 | % TracyVersion : tracy2 or tracy3 format |
---|
5 | |
---|
6 | if nargin == 0 |
---|
7 | TracyVersion='tracy2'; |
---|
8 | end |
---|
9 | |
---|
10 | % lecture du fichier de structure |
---|
11 | files = fullfile(getmmlroot, 'machine/SOLEIL/common/naff/naffutils/structure'); |
---|
12 | try |
---|
13 | struc=dlmread(files); |
---|
14 | catch |
---|
15 | error('Error while opening file %s',files) |
---|
16 | end |
---|
17 | |
---|
18 | %% Lecture du fichier de la chambre |
---|
19 | file0 = 'chambre.out'; |
---|
20 | |
---|
21 | try |
---|
22 | if strcmpi(TracyVersion, 'tracy2') |
---|
23 | % Tracy 2 |
---|
24 | [num dummy s mxch pxch vch ] = textread(file0,'%d %s %f %f %f %f','headerlines',3); |
---|
25 | else |
---|
26 | % Tracy 3 |
---|
27 | [num dummy s mxch pxch vch vch] = textread(file0,'%d %s %f %f %f %f %f','headerlines',3); |
---|
28 | end |
---|
29 | catch |
---|
30 | error('Error while opening file %s',file0) |
---|
31 | end |
---|
32 | |
---|
33 | figure(42) |
---|
34 | clf |
---|
35 | subplot(2,1,1) |
---|
36 | plot(s,pxch,'k-'); |
---|
37 | hold on |
---|
38 | plot(s,mxch,'k-'); |
---|
39 | plot(struc(:,1),struc(:,2)/2*0.3*max(pxch),'k-'); |
---|
40 | axis([0 44.2621 1.1*min(mxch) 1.1*max(pxch)]); |
---|
41 | grid on |
---|
42 | xlabel('s (m)') |
---|
43 | ylabel('x (mm)') |
---|
44 | title('Vacuum pipe dimensions') |
---|
45 | |
---|
46 | subplot(2,1,2) |
---|
47 | plot(s,vch,'k-'); |
---|
48 | hold on |
---|
49 | plot(struc(:,1),struc(:,2)/2*0.3*max(vch),'k-') |
---|
50 | plot(s,-vch,'k-'); |
---|
51 | axis([0 44.2621 -1.1*max(vch) 1.1*max(vch)]); |
---|
52 | grid on |
---|
53 | xlabel('s (m)') |
---|
54 | ylabel('z (mm)') |
---|
55 | |
---|
56 | addlabel(0,0,datestr(now)); |
---|