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 | % 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=6; % max en mm |
---|
7 | |
---|
8 | scanz=-borne:step:borne; |
---|
9 | nmax=12; |
---|
10 | |
---|
11 | NQP=[1 : nmax]; |
---|
12 | table=[]; |
---|
13 | |
---|
14 | fprintf('******** Mesure orbite ********** \n'); |
---|
15 | for i=nmax:nmax % on saute le premier QPV = orbite à l'injection |
---|
16 | setsp('HCOR',hcor0); |
---|
17 | QP=i; |
---|
18 | fprintf('QP = %g ',QP); |
---|
19 | R=[]; |
---|
20 | for dz=scanz |
---|
21 | setsp('HCOR',hcor0); |
---|
22 | orbit_bumph(QP,dz);pause(1) |
---|
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/lt1charge*100; |
---|
31 | end |
---|
32 | R=[R r]; |
---|
33 | fprintf(' %6.2f ',r); |
---|
34 | |
---|
35 | end |
---|
36 | fprintf('\n'); |
---|
37 | orbit_bumph(QP,-borne) |
---|
38 | [estimates, model] = fitprofil(scanz, R); |
---|
39 | fprintf('Sig=%g Dz=%g \n',estimates(1),estimates(2)); |
---|
40 | plot(scanz, R, '*') |
---|
41 | hold on |
---|
42 | [sse, FittedCurve] = model(estimates); |
---|
43 | plot(scanz, FittedCurve, 'r'); hold off |
---|
44 | fprintf('\n'); |
---|
45 | end |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.