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 | |
---|
4 | clear |
---|
5 | istart=3000; |
---|
6 | npoint=1024; |
---|
7 | |
---|
8 | device ='BOO-C01/DG/BPM.01'; |
---|
9 | attribute='ZPosDD'; |
---|
10 | temp=tango_read_attribute2(device,attribute); |
---|
11 | X=temp.value; |
---|
12 | plot(X) |
---|
13 | |
---|
14 | n1=istart; |
---|
15 | n2=n1+npoint; |
---|
16 | m1 = int16(npoint/10); |
---|
17 | m2 = int16(npoint-m1); |
---|
18 | Xseg=X(n1:n2); |
---|
19 | Xfft = fft(Xseg,npoint); |
---|
20 | PXfft = Xfft.* conj(Xfft) / npoint; |
---|
21 | f = (1:npoint)/npoint; |
---|
22 | mx = max(PXfft(m1:m2)); |
---|
23 | nux = (find(PXfft==mx)-1)/ npoint; |
---|
24 | nux=nux(2) |
---|
25 | |
---|
26 | plot(f,PXfft) |
---|
27 | ylim([0 1.5*mx]) |
---|
28 | |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.