1 | orbfig = findobj(allchild(0),'tag','FTsetup'); |
---|
2 | |
---|
3 | if ~isempty(orbfig), delete(orbfig); end |
---|
4 | orbfig = findobj(allchild(0),'tag','FTsetup'); |
---|
5 | |
---|
6 | if ~isempty(orbfig), delete(orbfig); end |
---|
7 | |
---|
8 | kmax = 8; % button number |
---|
9 | |
---|
10 | height = 10 + kmax*30 + 30; %670; |
---|
11 | a = figure('Color',[0.8 0.8 0.8], ... |
---|
12 | 'Interruptible', 'on', ... |
---|
13 | 'HandleVisibility','off', ... |
---|
14 | 'MenuBar','none', ... |
---|
15 | 'Name', 'First Turn Orbit correction (experimental interface)', ... |
---|
16 | 'NumberTitle','off', ... |
---|
17 | 'Units','pixels', ... |
---|
18 | 'Position',[5 70 210*2 height], ... |
---|
19 | 'Resize','off', ... |
---|
20 | 'Tag','FTsetup'); |
---|
21 | |
---|
22 | height = height - 35; |
---|
23 | |
---|
24 | for k = 1:kmax, |
---|
25 | b1(k) = uicontrol('Parent',a, ... |
---|
26 | 'Position',[3 height-(k-1)*30 204 27], ... |
---|
27 | 'Interruptible', 'off', ... |
---|
28 | 'Tag','button22'); |
---|
29 | end |
---|
30 | |
---|
31 | for k = 1:kmax, |
---|
32 | b2(k) = uicontrol('Parent',a, ... |
---|
33 | 'Position',[3 + 210 height-(k-1)*30 204 27], ... |
---|
34 | 'Interruptible', 'off', ... |
---|
35 | 'Tag','button22'); |
---|
36 | end |
---|
37 | |
---|
38 | set(b1(1), 'String','H plane','BackGroundColor','b'); |
---|
39 | set(b1(2), 'Callback','firstturnscorrection(Xcod,''Horizontal'',''NoDisplay'');', 'String','H Correction (No Display)'); |
---|
40 | set(b1(3), 'Callback','firstturnscorrection(Xcod,''Horizontal'');', 'String','H Correction'); |
---|
41 | set(b1(4), 'Callback','setsp(''HCOR'',0);disp(''zeroing HCOR'');', 'String','HCOR to zero'); |
---|
42 | set(b1(5), 'Callback','HCOR0_ = getam(''HCOR'');disp(''HCOR saved'');', 'String','Save HCOR (1-depth buffer)'); |
---|
43 | set(b1(6), 'Callback','setsp(''HCOR'',HCOR0_);disp(''HCOR restored'');', 'String','Set back HCOR (1-depth buffer)'); |
---|
44 | set(b1(7), 'Callback','figure; plot(getspos(''BPMx''),Xcod); grid on;', 'String','plot H-cod'); |
---|
45 | set(b1(8), 'Callback','', 'String','Compute COD'); |
---|
46 | |
---|
47 | set(b2(1), 'String','V plane','BackGroundColor','r'); |
---|
48 | set(b2(2), 'Callback','firstturnscorrection(Zcod,''Vertical'',''NoDisplay'');', 'String','V Correction (No Display)'); |
---|
49 | set(b2(3), 'Callback','firstturnscorrection(Zcod,''Vertical'');', 'String','V Correction'); |
---|
50 | set(b2(4), 'Callback','setsp(''VCOR'',0);disp(''zeroing VCOR'');', 'String','VCOR to zero'); |
---|
51 | set(b2(5), 'Callback','VCOR0_ = getam(''VCOR'');disp(''VCOR saved'');', 'String','Save VCOR (1-depth buffer)'); |
---|
52 | set(b2(6), 'Callback','setsp(''VCOR'',VCOR0_);disp(''VCOR restored'');', 'String','Set back VCOR (1-depth buffer)'); |
---|
53 | set(b2(7), 'Callback','figure; plot(getspos(''BPMz''),Zcod); grid on;', 'String','plot V-cod'); |
---|
54 | set(b2(8), 'Callback','', 'String','Compute COD'); |
---|