source: MML/trunk/machine/SOLEIL/Booster/applications/measorbitv.m @ 17

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
5step =1;   % pas en mm
6borne=11;   % max en mm
7
8scanz=-borne:step:borne;
9nmax=21;
10NQP=[1 : nmax];
11table=[];
12
13%orbit_bump(QP,dz(1));
14fprintf('******** Mesure orbite **********   \n');
15for 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');
48end
49
Note: See TracBrowser for help on using the repository browser.