1 | function varargout = PSB_tempogui(varargin) |
---|
2 | % PSB_TEMPOGUI M-file for PSB_tempogui.fig |
---|
3 | % PSB_TEMPOGUI, by itself, creates a new PSB_TEMPOGUI or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % H = PSB_TEMPOGUI returns the handle to a new PSB_TEMPOGUI or the handle to |
---|
7 | % the existing singleton*. |
---|
8 | % |
---|
9 | % PSB_TEMPOGUI('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
10 | % function named CALLBACK in PSB_TEMPOGUI.M with the given input arguments. |
---|
11 | % |
---|
12 | % PSB_TEMPOGUI('Property','Value',...) creates a new PSB_TEMPOGUI or raises the |
---|
13 | % existing singleton*. Starting from the left, property value pairs are |
---|
14 | % applied to the GUI before PSB_tempogui_OpeningFunction gets called. An |
---|
15 | % unrecognized property name or invalid value makes property application |
---|
16 | % stop. All inputs are passed to PSB_tempogui_OpeningFcn via varargin. |
---|
17 | % |
---|
18 | % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one |
---|
19 | % instance to run (singleton)". |
---|
20 | % |
---|
21 | % See also: GUIDE, GUIDATA, GUIHANDLES |
---|
22 | |
---|
23 | % Edit the above text to modify the response to help PSB_tempogui |
---|
24 | |
---|
25 | % Last Modified by GUIDE v2.5 13-Dec-2010 11:49:59 |
---|
26 | |
---|
27 | % Begin initialization code - DO NOT EDIT |
---|
28 | gui_Singleton = 1; |
---|
29 | gui_State = struct('gui_Name', mfilename, ... |
---|
30 | 'gui_Singleton', gui_Singleton, ... |
---|
31 | 'gui_OpeningFcn', @PSB_tempogui_OpeningFcn, ... |
---|
32 | 'gui_OutputFcn', @PSB_tempogui_OutputFcn, ... |
---|
33 | 'gui_LayoutFcn', [] , ... |
---|
34 | 'gui_Callback', []); |
---|
35 | if nargin && ischar(varargin{1}) |
---|
36 | gui_State.gui_Callback = str2func(varargin{1}); |
---|
37 | end |
---|
38 | |
---|
39 | if nargout |
---|
40 | [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
41 | else |
---|
42 | gui_mainfcn(gui_State, varargin{:}); |
---|
43 | end |
---|
44 | % End initialization code - DO NOT EDIT |
---|
45 | |
---|
46 | |
---|
47 | % --- Executes just before PSB_tempogui is made visible. |
---|
48 | function PSB_tempogui_OpeningFcn(hObject, eventdata, handles, varargin) |
---|
49 | % This function has no output args, see OutputFcn. |
---|
50 | % hObject handle to figure |
---|
51 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
52 | % handles structure with handles and user data (see GUIDATA) |
---|
53 | % varargin command line arguments to PSB_tempogui (see VARARGIN) |
---|
54 | |
---|
55 | % Choose default command line output for PSB_tempogui |
---|
56 | handles.output = hObject; |
---|
57 | |
---|
58 | % Update handles structure |
---|
59 | guidata(hObject, handles); |
---|
60 | |
---|
61 | % UIWAIT makes PSB_tempogui wait for user response (see UIRESUME) |
---|
62 | % uiwait(handles.figure1); |
---|
63 | lat_2020_3170_pseudo1 |
---|
64 | updateatindex; |
---|
65 | handles.ATIndexList = atindex; |
---|
66 | handles.thetax = 0; |
---|
67 | handles.thetaz = 0; |
---|
68 | handles.Turns = 1; |
---|
69 | |
---|
70 | [betax betaz] = modelbeta('all'); |
---|
71 | [alphax alphaz] = modeltwiss('alpha', 'all'); |
---|
72 | |
---|
73 | handles.alphaT = alphax(handles.ATIndexList.TEMPO); |
---|
74 | handles.betaT = betax(handles.ATIndexList.TEMPO); |
---|
75 | handles.gammaT=(1+handles.alphaT*handles.alphaT)/handles.betaT; |
---|
76 | |
---|
77 | handles.HCOR = getsp('HCOR', 'Model'); |
---|
78 | |
---|
79 | % Update handles structure |
---|
80 | guidata(hObject, handles); |
---|
81 | |
---|
82 | |
---|
83 | % --- Outputs from this function are returned to the command line. |
---|
84 | function varargout = PSB_tempogui_OutputFcn(hObject, eventdata, handles) |
---|
85 | % varargout cell array for returning output args (see VARARGOUT); |
---|
86 | % hObject handle to figure |
---|
87 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
88 | % handles structure with handles and user data (see GUIDATA) |
---|
89 | |
---|
90 | % Get default command line output from handles structure |
---|
91 | varargout{1} = handles.output; |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | function edit_KEMV_Callback(hObject, eventdata, handles) |
---|
96 | % hObject handle to edit_KEMV (see GCBO) |
---|
97 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
98 | % handles structure with handles and user data (see GUIDATA) |
---|
99 | |
---|
100 | % Hints: get(hObject,'String') returns contents of edit_KEMV as text |
---|
101 | % str2double(get(hObject,'String')) returns contents of edit_KEMV as a double |
---|
102 | handles.thetaz = str2double(get(hObject,'String'))*1e-6; % rad |
---|
103 | % Update handles structure |
---|
104 | guidata(hObject, handles); |
---|
105 | pushbutton_plot_Callback(handles.pushbutton_plot, eventdata, handles) |
---|
106 | |
---|
107 | |
---|
108 | % --- Executes during object creation, after setting all properties. |
---|
109 | function edit_KEMV_CreateFcn(hObject, eventdata, handles) |
---|
110 | % hObject handle to edit_KEMV (see GCBO) |
---|
111 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
112 | % handles empty - handles not created until after all CreateFcns called |
---|
113 | |
---|
114 | % Hint: edit controls usually have a white background on Windows. |
---|
115 | % See ISPC and COMPUTER. |
---|
116 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
117 | set(hObject,'BackgroundColor','white'); |
---|
118 | end |
---|
119 | |
---|
120 | |
---|
121 | |
---|
122 | function edit_KEMH_Callback(hObject, eventdata, handles) |
---|
123 | % hObject handle to edit_KEMH (see GCBO) |
---|
124 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
125 | % handles structure with handles and user data (see GUIDATA) |
---|
126 | |
---|
127 | % Hints: get(hObject,'String') returns contents of edit_KEMH as text |
---|
128 | % str2double(get(hObject,'String')) returns contents of edit_KEMH as a double |
---|
129 | |
---|
130 | handles.thetax = str2double(get(hObject,'String'))*1e-6; % rad |
---|
131 | % Update handles structure |
---|
132 | guidata(hObject, handles); |
---|
133 | pushbutton_plot_Callback(handles.pushbutton_plot, eventdata, handles) |
---|
134 | |
---|
135 | % --- Executes during object creation, after setting all properties. |
---|
136 | function edit_KEMH_CreateFcn(hObject, eventdata, handles) |
---|
137 | % hObject handle to edit_KEMH (see GCBO) |
---|
138 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
139 | % handles empty - handles not created until after all CreateFcns called |
---|
140 | |
---|
141 | % Hint: edit controls usually have a white background on Windows. |
---|
142 | % See ISPC and COMPUTER. |
---|
143 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
144 | set(hObject,'BackgroundColor','white'); |
---|
145 | end |
---|
146 | |
---|
147 | |
---|
148 | % --- Executes on button press in pushbutton_init. |
---|
149 | function pushbutton_init_Callback(hObject, eventdata, handles) |
---|
150 | % hObject handle to pushbutton_init (see GCBO) |
---|
151 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
152 | % handles structure with handles and user data (see GUIDATA) |
---|
153 | lat_2020_3170_pseudo1 |
---|
154 | |
---|
155 | |
---|
156 | % --- Executes on button press in pushbutton_plot. |
---|
157 | function pushbutton_plot_Callback(hObject, eventdata, handles) |
---|
158 | % hObject handle to pushbutton_plot (see GCBO) |
---|
159 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
160 | % handles structure with handles and user data (see GUIDATA) |
---|
161 | |
---|
162 | global THERING |
---|
163 | handles.Turns = get(handles.popupmenu_Nturn ,'Value'); |
---|
164 | L = 13.4165; %m Position for point source on diaphragme |
---|
165 | |
---|
166 | if strcmp(get(get(handles.uipanel_plane, 'SelectedObject'), 'Tag'), 'radiobutton_Hplane') |
---|
167 | hplane = 1; |
---|
168 | else |
---|
169 | hplane = 0; |
---|
170 | end |
---|
171 | |
---|
172 | if hplane % if KEMH |
---|
173 | % construct Line for transport from KEMH to end of the ring |
---|
174 | REFPTS= (handles.ATIndexList.KEMH:length(THERING)); |
---|
175 | LINE = THERING(REFPTS); |
---|
176 | % transport |
---|
177 | Rin = [0; handles.thetax; 0; 0; 0; 0]; |
---|
178 | Rout = linepass(LINE,Rin,1:(length(LINE)+1)); |
---|
179 | % now make n turns |
---|
180 | [x, ATIndex, LostBeam] = getturns(Rout(:,end), handles.Turns, 'All'); |
---|
181 | % construct turn 1 |
---|
182 | htour1 = [zeros(6,handles.ATIndexList.KEMH-1), Rout(:,:)]*1e3; |
---|
183 | % purpose ? |
---|
184 | vtour0 = [zeros(6,handles.ATIndexList.KEMH-1), Rout(:,:)]*1e3; |
---|
185 | vtour1(:,:) = x(:,1,:)*1e3;vtour1 = vtour1'; |
---|
186 | z = x; |
---|
187 | else % KEMV activated |
---|
188 | Rin = [0;0;0;handles.thetaz;0; 0]; |
---|
189 | LINE = THERING(handles.ATIndexList.KEMV:end); |
---|
190 | % transport the beam from KEMV to end of RING |
---|
191 | Rout = LINEPASS(LINE,Rin,1:(length(LINE)+1)); |
---|
192 | % now make n turn by transporting the beam |
---|
193 | [z, ATIndex, LostBeam] = getturns(Rout(:,end), handles.Turns, 'All'); |
---|
194 | vtour0 = [zeros(6,handles.ATIndexList.KEMV-1), Rout(:,:)]*1e3; |
---|
195 | vtour1(:,:) = z(:,1,:)*1e3;vtour1 = vtour1'; |
---|
196 | htour1(:,:) = z(:,1,:)*1e3;htour1 = htour1'; |
---|
197 | x = z; |
---|
198 | end |
---|
199 | |
---|
200 | %select low axes |
---|
201 | axes(handles.axes1);cla; |
---|
202 | |
---|
203 | % get position for all points |
---|
204 | spos = findspos(THERING, 1:(length(THERING)+1)); |
---|
205 | sposBPM = getspos('BPMx'); |
---|
206 | |
---|
207 | if hplane |
---|
208 | plot(spos, htour1(1,:),'b-'); hold on |
---|
209 | % SOURCE POINT |
---|
210 | xTEMPO = htour1(1,handles.ATIndexList.TEMPO); |
---|
211 | xpTEMPO = htour1(2,handles.ATIndexList.TEMPO); |
---|
212 | LxTEMPO = xTEMPO+L*xpTEMPO; % at L meters |
---|
213 | else |
---|
214 | plot(spos, vtour0(1,:),'b-'); hold on |
---|
215 | end |
---|
216 | slegend={'#1'}; |
---|
217 | if handles.Turns > 1 |
---|
218 | plot(spos, x(:,1,1)*1e3,'r'); |
---|
219 | xTEMPO = x(handles.ATIndexList.TEMPO,handles.Turns-1, 1)*1e3; |
---|
220 | xpTEMPO = x(handles.ATIndexList.TEMPO,handles.Turns-1, 2)*1e3; |
---|
221 | LxTEMPO = xTEMPO+L*xpTEMPO; |
---|
222 | slegend=[slegend, {'#2'}]; |
---|
223 | if handles.Turns > 2 |
---|
224 | plot(spos, x(:,2,1)*1e3,'g'); |
---|
225 | slegend=[slegend, {'#3'}]; |
---|
226 | if handles.Turns > 3 |
---|
227 | plot(spos, x(:,3,1)*1e3,'c'); |
---|
228 | slegend=[slegend, {'#4'}]; |
---|
229 | if handles.Turns > 4 |
---|
230 | plot(spos, x(:,4,1)*1e3,'k'); |
---|
231 | slegend=[slegend, {'#5'}]; |
---|
232 | end |
---|
233 | end |
---|
234 | end |
---|
235 | end |
---|
236 | legend(slegend) |
---|
237 | % Replot BPM position for turn 1 |
---|
238 | plot(sposBPM, htour1(1,family2atindex('BPMx')),'b.'); |
---|
239 | |
---|
240 | % plot positions of kickers |
---|
241 | plot(spos(handles.ATIndexList.KEMH), 0, 'ks'); hold on; |
---|
242 | plot(spos(handles.ATIndexList.KEMV), 0, 'rs'); |
---|
243 | |
---|
244 | xlabel('s-position (m)') |
---|
245 | ylabel('x-position (mm)') |
---|
246 | xlim([0 getcircumference]) |
---|
247 | % Show position of point TEMPO source |
---|
248 | plot(repmat(findspos(THERING, handles.ATIndexList.TEMPO), 2,1), ... |
---|
249 | 1.1*[-1 1]*max(x(:,1,1)*1e3),'k'); |
---|
250 | |
---|
251 | % compute position at BPM and point sources |
---|
252 | %BPMspos = getspos('BPMx', [8 1; 8 2]); |
---|
253 | %diff(BPMspos) |
---|
254 | %xTempo = x(:,1,1); |
---|
255 | |
---|
256 | % Position first time the beam cross TEMPO BL |
---|
257 | fprintf('Turn %d Center SDM08 x = %.3f mm x'' = %.3f mrad x @ 10m = %.3f mm\n', ... |
---|
258 | handles.Turns, xTEMPO,xpTEMPO, LxTEMPO); |
---|
259 | fprintf('Center SDM08 z = %.3f mm z'' = %.3f mrad z @ 10m = %.3f mm\n',... |
---|
260 | htour1(3,handles.ATIndexList.TEMPO),htour1(4,handles.ATIndexList.TEMPO), ... |
---|
261 | htour1(3,handles.ATIndexList.TEMPO)+L*htour1(4,handles.ATIndexList.TEMPO)); |
---|
262 | |
---|
263 | %ylim([-2 2]) |
---|
264 | |
---|
265 | % second axis |
---|
266 | axes(handles.axes2);cla; |
---|
267 | plot(spos, vtour0(3,:)); hold on |
---|
268 | if handles.Turns > 1 |
---|
269 | plot(spos, z(:,1,3)*1e3,'r'); |
---|
270 | if handles.Turns > 2 |
---|
271 | plot(spos, z(:,2,3)*1e3,'g'); |
---|
272 | if handles.Turns > 3 |
---|
273 | plot(spos, z(:,3,3)*1e3,'c'); |
---|
274 | if handles.Turns > 4 |
---|
275 | plot(spos, z(:,4,3)*1e3,'k'); |
---|
276 | end |
---|
277 | end |
---|
278 | end |
---|
279 | end |
---|
280 | |
---|
281 | % Compute position at BPM and poitn source first time the beam cross TEMPO |
---|
282 | fprintf('Center SDM08 x = %.3f mm x'' = %.3f mrad\n x @ 10m = %.3f mm\n', ... |
---|
283 | htour1(1,handles.ATIndexList.TEMPO),htour1(2,handles.ATIndexList.TEMPO), ... |
---|
284 | htour1(1,handles.ATIndexList.TEMPO)+L*htour1(2,handles.ATIndexList.TEMPO)); |
---|
285 | set(handles.text_xTEMPO10m, 'String',... |
---|
286 | num2str(LxTEMPO)); |
---|
287 | |
---|
288 | fprintf('Center SDM08 z = %.3f mm z'' = %.3f mrad\n z @ 10m = %.3f mm\n',... |
---|
289 | htour1(3,handles.ATIndexList.TEMPO),htour1(4,handles.ATIndexList.TEMPO), ... |
---|
290 | htour1(3,handles.ATIndexList.TEMPO)+L*htour1(4,handles.ATIndexList.TEMPO)); |
---|
291 | legend(slegend) |
---|
292 | xlabel('s-position (m)') |
---|
293 | ylabel('z-position (mm)') |
---|
294 | xlim([0 getcircumference]) |
---|
295 | % plot if 2 turn at least |
---|
296 | if size(z,2) > 1 |
---|
297 | plot(repmat(findspos(THERING, handles.ATIndexList.TEMPO), 2,1), ... |
---|
298 | 1.1*[-1 1]*max(z(:,2,3)*1e3),'k'); |
---|
299 | end |
---|
300 | %ylim([-2 2]) |
---|
301 | |
---|
302 | BPMid = dev2elem('BPMx', [8 1; 8 2]); |
---|
303 | |
---|
304 | set(handles.text_BPM8_1_hposition,'String',num2str(htour1(1,handles.ATIndexList.BPM(BPMid(1))))) |
---|
305 | set(handles.text_BPM8_1_vposition,'String',num2str(vtour1(3,handles.ATIndexList.BPM(BPMid(1))))) |
---|
306 | set(handles.text_BPM8_2_hposition,'String',num2str(htour1(1,handles.ATIndexList.BPM(BPMid(2))))) |
---|
307 | set(handles.text_BPM8_2_vposition,'String',num2str(vtour1(3,handles.ATIndexList.BPM(BPMid(2))))) |
---|
308 | |
---|
309 | set(handles.text_BPM8_1_hangle,'String',num2str(htour1(2,handles.ATIndexList.BPM(BPMid(1))))) |
---|
310 | set(handles.text_BPM8_1_vangle,'String',num2str(vtour1(4,handles.ATIndexList.BPM(BPMid(1))))) |
---|
311 | set(handles.text_BPM8_2_hangle,'String',num2str(htour1(2,handles.ATIndexList.BPM(BPMid(2))))) |
---|
312 | set(handles.text_BPM8_2_vangle,'String',num2str(vtour1(4,handles.ATIndexList.BPM(BPMid(2))))) |
---|
313 | |
---|
314 | % Source point |
---|
315 | set(handles.text_TEMPO_hposition,'String',num2str(htour1(1,handles.ATIndexList.TEMPO))) |
---|
316 | set(handles.text_TEMPO_vposition,'String',num2str(vtour1(3,handles.ATIndexList.TEMPO))) |
---|
317 | set(handles.text_TEMPO_hangle,'String',num2str(htour1(2,handles.ATIndexList.TEMPO))) |
---|
318 | set(handles.text_TEMPO_vangle,'String',num2str(vtour1(4,handles.ATIndexList.TEMPO))) |
---|
319 | |
---|
320 | % Invariant |
---|
321 | x = htour1(1,handles.ATIndexList.TEMPO) *1e-3; |
---|
322 | xp = htour1(2,handles.ATIndexList.TEMPO) *1e-3; |
---|
323 | A = handles.gammaT*x*x+2*handles.alphaT*x*xp+handles.betaT*xp*xp; |
---|
324 | set(handles.text_TEMPO_xmax,'String',num2str(sqrt(A/handles.gammaT)*1e3)); |
---|
325 | |
---|
326 | % --- Executes on selection change in popupmenu_Nturn. |
---|
327 | function popupmenu_Nturn_Callback(hObject, eventdata, handles) |
---|
328 | % hObject handle to popupmenu_Nturn (see GCBO) |
---|
329 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
330 | % handles structure with handles and user data (see GUIDATA) |
---|
331 | |
---|
332 | % Hints: contents = get(hObject,'String') returns popupmenu_Nturn contents as cell array |
---|
333 | % contents{get(hObject,'Value')} returns selected item from popupmenu_Nturn |
---|
334 | pushbutton_plot_Callback(handles.pushbutton_plot, eventdata, handles) |
---|
335 | |
---|
336 | |
---|
337 | % --- Executes during object creation, after setting all properties. |
---|
338 | function popupmenu_Nturn_CreateFcn(hObject, eventdata, handles) |
---|
339 | % hObject handle to popupmenu_Nturn (see GCBO) |
---|
340 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
341 | % handles empty - handles not created until after all CreateFcns called |
---|
342 | |
---|
343 | % Hint: popupmenu controls usually have a white background on Windows. |
---|
344 | % See ISPC and COMPUTER. |
---|
345 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
346 | set(hObject,'BackgroundColor','white'); |
---|
347 | end |
---|
348 | |
---|
349 | |
---|
350 | % --- Executes on button press in radiobutton_zoom1. |
---|
351 | function radiobutton_zoom1_Callback(hObject, eventdata, handles) |
---|
352 | % hObject handle to radiobutton_zoom1 (see GCBO) |
---|
353 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
354 | % handles structure with handles and user data (see GUIDATA) |
---|
355 | |
---|
356 | % Hint: get(hObject,'Value') returns toggle state of radiobutton_zoom1 |
---|
357 | if get(hObject,'Value') |
---|
358 | dragzoom(handles.axes1) |
---|
359 | else |
---|
360 | dragzoom(handles.axes1) |
---|
361 | end |
---|
362 | |
---|
363 | % --- Executes on button press in radiobutton_zoom2. |
---|
364 | function radiobutton_zoom2_Callback(hObject, eventdata, handles) |
---|
365 | % hObject handle to radiobutton_zoom2 (see GCBO) |
---|
366 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
367 | % handles structure with handles and user data (see GUIDATA) |
---|
368 | |
---|
369 | % Hint: get(hObject,'Value') returns toggle state of radiobutton_zoom2 |
---|
370 | |
---|
371 | if get(hObject,'Value') |
---|
372 | dragzoom(handles.axes2) |
---|
373 | else |
---|
374 | dragzoom(handles.axes2) |
---|
375 | end |
---|
376 | |
---|
377 | |
---|
378 | % --- Executes on button press in pushbutton_SaveHCOR. |
---|
379 | function pushbutton_SaveHCOR_Callback(hObject, eventdata, handles) |
---|
380 | % hObject handle to pushbutton_SaveHCOR (see GCBO) |
---|
381 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
382 | % handles structure with handles and user data (see GUIDATA) |
---|
383 | |
---|
384 | handles.HCOR = getsp('HCOR', 'Model'); |
---|
385 | |
---|
386 | % Update handles structure |
---|
387 | guidata(hObject, handles); |
---|
388 | |
---|
389 | % --- Executes on button press in pushbutton_Restore. |
---|
390 | function pushbutton_Restore_Callback(hObject, eventdata, handles) |
---|
391 | % hObject handle to pushbutton_Restore (see GCBO) |
---|
392 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
393 | % handles structure with handles and user data (see GUIDATA) |
---|
394 | |
---|
395 | setsp('HCOR', handles.HCOR, 'Model'); |
---|
396 | pushbutton_plot_Callback(handles.pushbutton_plot, eventdata, handles) |
---|
397 | |
---|
398 | function edit_angle_Callback(hObject, eventdata, handles) |
---|
399 | % hObject handle to edit_angle (see GCBO) |
---|
400 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
401 | % handles structure with handles and user data (see GUIDATA) |
---|
402 | |
---|
403 | % Hints: get(hObject,'String') returns contents of edit_angle as text |
---|
404 | % str2double(get(hObject,'String')) returns contents of edit_angle as a double |
---|
405 | angle = str2double(get(hObject,'String')); |
---|
406 | |
---|
407 | % 2 BPMs for TEMPO BL |
---|
408 | BPMspos = getspos('BPMx', [8 1; 8 2]); |
---|
409 | |
---|
410 | setorbitbump('BPMx', [8 1; 8 2], [0 diff(BPMspos)*angle],'HCOR', [-2 -1 1 2], 'Model') |
---|
411 | pushbutton_plot_Callback(handles.pushbutton_plot, eventdata, handles) |
---|