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