Last change
on this file since 17 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.3 KB
|
Line | |
---|
1 | % Appel en série orbit_bump |
---|
2 | % Mesure orbite et taille faisceau sur perte dans la chambre veticale au |
---|
3 | % droit de chaque QP verticale |
---|
4 | |
---|
5 | step =1; % pas en mm |
---|
6 | borne=11; % max en mm |
---|
7 | |
---|
8 | scanz=-borne:step:borne; |
---|
9 | nmax=21; |
---|
10 | NQP=[1 : nmax]; |
---|
11 | table=[]; |
---|
12 | |
---|
13 | %orbit_bump(QP,dz(1)); |
---|
14 | fprintf('******** Mesure orbite ********** \n'); |
---|
15 | for i=nmax:nmax % on saute le premier QPV = orbite à l'injection |
---|
16 | setsp('VCOR',vcor0); |
---|
17 | QP=i; |
---|
18 | fprintf('QP = %g ',QP); |
---|
19 | R=[]; |
---|
20 | for dz=scanz |
---|
21 | setsp('VCOR',vcor0); |
---|
22 | orbit_bump(QP,dz);pause(2) |
---|
23 | tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent'); |
---|
24 | pause(1.5) |
---|
25 | temp=tango_read_attribute2('LT1/DG/MC','qIct2'); lt1charge=temp.value; |
---|
26 | temp=tango_read_attribute2('BOO-C01/DG/DCCT','qExt'); boocharge=-temp.value; |
---|
27 | if lt1charge==0 |
---|
28 | r=-1; |
---|
29 | else |
---|
30 | r=(boocharge+0.09)/lt1charge*100; |
---|
31 | end |
---|
32 | if r<0 |
---|
33 | r=0; |
---|
34 | end |
---|
35 | R=[R r]; |
---|
36 | fprintf(' %6.2f ',r); |
---|
37 | |
---|
38 | end |
---|
39 | fprintf('\n'); |
---|
40 | setam('VCOR',vcor0); |
---|
41 | [estimates, model] = fitprofil(scanz, R); |
---|
42 | fprintf('Sig=%g Dz=%g \n',estimates(1),estimates(2)); |
---|
43 | [sse, FittedCurve] = model(estimates); |
---|
44 | plot(scanz, R, '*', scanz, FittedCurve, 'r'); |
---|
45 | ylim([0 100]) |
---|
46 | grid on |
---|
47 | fprintf('\n'); |
---|
48 | end |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.