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:
755 bytes
|
Line | |
---|
1 | function anaphase2bpm |
---|
2 | |
---|
3 | DirectoryName = getfamilydata('Directory','BPMData'); |
---|
4 | Filename = uigetfile(DirectoryName); |
---|
5 | |
---|
6 | |
---|
7 | if isequal(FileName,0) |
---|
8 | disp('User pressed cancel') |
---|
9 | return; |
---|
10 | else |
---|
11 | a = load(fullfile(DirectoryName, Filename)); |
---|
12 | AM = getfield(a, 'AM'); |
---|
13 | bpmlist = dev2elem('BPMx',AM.DeviceList); |
---|
14 | end |
---|
15 | |
---|
16 | %% |
---|
17 | i1=50; |
---|
18 | i2=200; |
---|
19 | |
---|
20 | x1 = AM.Data.X(1,i1:i2); |
---|
21 | x2 = AM.Data.X(2,i1:i2); |
---|
22 | |
---|
23 | x = x1; |
---|
24 | |
---|
25 | phi1 = modelphase('BPMx',[12 1]); |
---|
26 | phi2 = modelphase('BPMx',[14 1]); |
---|
27 | psi = -(phi2 - phi1); |
---|
28 | beta1 = modelbeta('BPMx',[12 1]); |
---|
29 | beta2 = modelbeta('BPMx',[14 1]); |
---|
30 | alpha1 = modeltwiss('alpha','BPMx',[12 1]); |
---|
31 | |
---|
32 | xp = x2/sin(psi)/sqrt(beta1*beta2) - (alpha1 + cot(psi))/beta1*x1; |
---|
33 | plot(x,xp,'.') |
---|
34 | grid on |
---|
35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.