source: MML/trunk/machine/SOLEIL/Booster/applications/meas_booster_tune.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: 561 bytes
Line 
1% Mesure nombte d'onde booster
2% En mode SPM, le faisceau est exité le long du cycle = possible mesure du nombre d'onde
3
4clear
5istart=3000;
6npoint=1024;
7
8device   ='BOO-C01/DG/BPM.01';
9attribute='ZPosDD';
10temp=tango_read_attribute2(device,attribute);
11X=temp.value;
12plot(X)
13
14n1=istart;
15n2=n1+npoint;
16m1 = int16(npoint/10);
17m2 = int16(npoint-m1);
18Xseg=X(n1:n2);
19Xfft     = fft(Xseg,npoint);
20PXfft    = Xfft.* conj(Xfft) / npoint;
21f = (1:npoint)/npoint;
22mx    = max(PXfft(m1:m2));
23nux   = (find(PXfft==mx)-1)/ npoint;
24nux=nux(2)
25
26plot(f,PXfft)
27ylim([0 1.5*mx])
28
29
Note: See TracBrowser for help on using the repository browser.