PageRenderTime 29ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/ATF2/FlightSim/testApps/extCoupling/extCoupling.m

http://atf2flightsim.googlecode.com/
MATLAB | 571 lines | 253 code | 107 blank | 211 comment | 31 complexity | 3253e9926b251e226ac2844b4794e226 MD5 | raw file
Possible License(s): BSD-2-Clause, LGPL-2.0, IPL-1.0, BSD-3-Clause
  1. function varargout = extCoupling(varargin)
  2. % EXTCOUPLING M-file for extCoupling.fig
  3. % EXTCOUPLING, by itself, creates a new EXTCOUPLING or raises the existing
  4. % singleton*.
  5. %
  6. % H = EXTCOUPLING returns the handle to a new EXTCOUPLING or the handle to
  7. % the existing singleton*.
  8. %
  9. % EXTCOUPLING('CALLBACK',hObject,eventData,handles,...) calls the local
  10. % function named CALLBACK in EXTCOUPLING.M with the given input arguments.
  11. %
  12. % EXTCOUPLING('Property','Value',...) creates a new EXTCOUPLING or raises the
  13. % existing singleton*. Starting from the left, property value pairs
  14. % are
  15. % applied to the GUI before extCoupling_OpeningFcn gets called. An
  16. % unrecognized property name or invalid value makes property application
  17. % stop. All inputs are passed to extCoupling_OpeningFcn via varargin.
  18. %
  19. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  20. % instance to run (singleton)".
  21. %
  22. % See also: GUIDE, GUIDATA, GUIHANDLES
  23. % Edit the above text to modify the response to help extCoupling
  24. % Last Modified by GUIDE v2.5 18-May-2010 06:39:18
  25. % Begin initialization code - DO NOT EDIT
  26. gui_Singleton = 1;
  27. gui_State = struct('gui_Name', mfilename, ...
  28. 'gui_Singleton', gui_Singleton, ...
  29. 'gui_OpeningFcn', @extCoupling_OpeningFcn, ...
  30. 'gui_OutputFcn', @extCoupling_OutputFcn, ...
  31. 'gui_LayoutFcn', [] , ...
  32. 'gui_Callback', []);
  33. if nargin && ischar(varargin{1})
  34. gui_State.gui_Callback = str2func(varargin{1});
  35. end
  36. if nargout
  37. [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  38. else
  39. gui_mainfcn(gui_State, varargin{:});
  40. end
  41. % End initialization code - DO NOT EDIT
  42. % --- Executes just before extCoupling is made visible.
  43. function extCoupling_OpeningFcn(hObject, eventdata, handles, varargin)
  44. % This function has no output args, see OutputFcn.
  45. % hObject handle to figure
  46. % eventdata reserved - to be defined in a future version of MATLAB
  47. % handles structure with handles and user data (see GUIDATA)
  48. % varargin command line arguments to extCoupling (see VARARGIN)
  49. % Choose default command line output for extCoupling
  50. handles.output = handles;
  51. % Update handles structure
  52. guidata(hObject, handles);
  53. % UIWAIT makes extCoupling wait for user response (see UIRESUME)
  54. % uiwait(handles.figure1);
  55. % Check access
  56. accessUpdate(handles);
  57. % --- Outputs from this function are returned to the command line.
  58. function varargout = extCoupling_OutputFcn(hObject, eventdata, handles)
  59. % varargout cell array for returning output args (see VARARGOUT);
  60. % hObject handle to figure
  61. % eventdata reserved - to be defined in a future version of MATLAB
  62. % handles structure with handles and user data (see GUIDATA)
  63. % Get default command line output from handles structure
  64. varargout{1} = handles.output;
  65. % --- Executes on button press in pushbutton8.
  66. function pushbutton8_Callback(hObject, eventdata, handles)
  67. % hObject handle to pushbutton8 (see GCBO)
  68. % eventdata reserved - to be defined in a future version of MATLAB
  69. % handles structure with handles and user data (see GUIDATA)
  70. global FL
  71. FL.Gui=rmfield(FL.Gui,'extCoupling');
  72. delete(handles.figure1);
  73. % --- Executes on button press in pushbutton4.
  74. function pushbutton4_Callback(hObject, eventdata, handles)
  75. % hObject handle to pushbutton4 (see GCBO)
  76. % eventdata reserved - to be defined in a future version of MATLAB
  77. % handles structure with handles and user data (see GUIDATA)
  78. % --- Executes on button press in pushbutton5.
  79. function pushbutton5_Callback(hObject, eventdata, handles)
  80. % hObject handle to pushbutton5 (see GCBO)
  81. % eventdata reserved - to be defined in a future version of MATLAB
  82. % handles structure with handles and user data (see GUIDATA)
  83. % --- Apply correction
  84. function pushbutton6_Callback(hObject, eventdata, handles)
  85. % hObject handle to pushbutton6 (see GCBO)
  86. % eventdata reserved - to be defined in a future version of MATLAB
  87. % handles structure with handles and user data (see GUIDATA)
  88. iknob=get(handles.popupmenu2,'Value');
  89. knobs={'Skew1' 'Skew2' 'Skew3' 'Skew4'};
  90. if iknob==1
  91. for nknob=1:length(knobs)
  92. set(handles.text2,'String',['Applying optimal measured coupling knob to ',knobs{nknob}])
  93. set(handles.text2,'foregroundcolor','black')
  94. drawnow('expose');
  95. pars.knob_name=knobs{nknob}; extCoupling_run('setPars',pars);
  96. stat=extCoupling_run('commit');
  97. if stat{1}~=1; guierr(handles,stat{2}); return; end;
  98. end % for nknob
  99. else
  100. set(handles.text2,'String',['Applying optimal measured coupling knob to ',knobs{iknob-1}])
  101. set(handles.text2,'foregroundcolor','black')
  102. drawnow('expose');
  103. pars.knob_name=knobs{iknob-1}; extCoupling_run('setPars',pars);
  104. stat=extCoupling_run('commit');
  105. if stat{1}~=1; guierr(handles,stat{2}); end;
  106. end % if iknob
  107. % --- Executes on button press in pushbutton7.
  108. function pushbutton7_Callback(hObject, eventdata, handles)
  109. % hObject handle to pushbutton7 (see GCBO)
  110. % eventdata reserved - to be defined in a future version of MATLAB
  111. % handles structure with handles and user data (see GUIDATA)
  112. % --- Executes on button press in pushbutton9.
  113. function pushbutton9_Callback(hObject, eventdata, handles) %#ok<*INUSD,*DEFNU>
  114. % hObject handle to pushbutton9 (see GCBO)
  115. % eventdata reserved - to be defined in a future version of MATLAB
  116. % handles structure with handles and user data (see GUIDATA)
  117. % Remove gui from list and self-terminate
  118. global FL
  119. FL.Gui.extPars=extPars;
  120. % --- Executes on selection change in popupmenu1.
  121. function popupmenu1_Callback(hObject, eventdata, handles) %#ok<*INUSL>
  122. % hObject handle to popupmenu1 (see GCBO)
  123. % eventdata reserved - to be defined in a future version of MATLAB
  124. % handles structure with handles and user data (see GUIDATA)
  125. % Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
  126. % contents{get(hObject,'Value')} returns selected item from popupmenu1
  127. global FL
  128. knobs={'Skew1' 'Skew2' 'Skew3' 'Skew4'};
  129. [stat data]=extCoupling_run('getData');
  130. if stat{1}~=1; guierr(handles,stat{2}); return; end;
  131. idata=get(hObject,'Value');
  132. knob=knobs{idata};
  133. if isfield(data,knob)
  134. plot(handles.axes1,data.(knob).plot.x,data.(knob).plot.y,'ro')
  135. hold on
  136. plot(handles.axes1,data.(knob).plot.fit.x,data.(knob).plot.fit.y,'b')
  137. hold off
  138. xlabel(handles.axes1,'Knob Value'); ylabel(handles.axes1,'\epsilon_y (pm)');
  139. ver_line(data.(knob).fit.B(1),'r-',handles.axes1)
  140. if isfield(FL.Gui,'wsPlots') && isfield(FL.Gui.wsPlots,'figure1') && ishandle(FL.Gui.wsPlots.figure1)
  141. wstxt={'MW0X' 'MW1X' 'MW2X' 'MW3X' 'MW4X'};
  142. for iws=1:5
  143. figure(FL.Gui.wsPlots.figure1)
  144. [A,B,C] = parabola_fit( data.(knob).plot.x, data.(knob).wiresig(iws,:), 0 ) ;
  145. fitdata=C(1)+A(1)*(data.(knob).plot.fit.x-B(1)).^2;
  146. subplot(2,3,iws,'Parent',FL.Gui.wsPlots.uipanel1),plot( data.(knob).plot.x, data.(knob).wiresig(iws,:), 'ro' )
  147. subplot(2,3,iws,'Parent',FL.Gui.wsPlots.uipanel1),xlabel(wstxt{iws})
  148. hold on; plot(data.(knob).plot.fit.x, fitdata, 'b'); hold off;
  149. ver_line(B(1),'r-')
  150. end % for iws
  151. end % if ws plot window open
  152. end % if data field filled
  153. % --- Executes during object creation, after setting all properties.
  154. function popupmenu1_CreateFcn(hObject, eventdata, handles)
  155. % hObject handle to popupmenu1 (see GCBO)
  156. % eventdata reserved - to be defined in a future version of MATLAB
  157. % handles empty - handles not created until after all CreateFcns called
  158. % Hint: popupmenu controls usually have a white background on Windows.
  159. % See ISPC and COMPUTER.
  160. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  161. set(hObject,'BackgroundColor','white');
  162. end
  163. % --- Executes on button press in pushbutton3.
  164. function pushbutton3_Callback(hObject, eventdata, handles)
  165. % hObject handle to pushbutton3 (see GCBO)
  166. % eventdata reserved - to be defined in a future version of MATLAB
  167. % handles structure with handles and user data (see GUIDATA)
  168. global FL
  169. FL.Gui.wsPlots = wsPlots;
  170. popupmenu1_Callback(handles.popupmenu1,[],handles);
  171. function edit1_Callback(hObject, eventdata, handles)
  172. % hObject handle to edit1 (see GCBO)
  173. % eventdata reserved - to be defined in a future version of MATLAB
  174. % handles structure with handles and user data (see GUIDATA)
  175. % Hints: get(hObject,'String') returns contents of edit1 as text
  176. % str2double(get(hObject,'String')) returns contents of edit1 as a double
  177. % --- Executes during object creation, after setting all properties.
  178. function edit1_CreateFcn(hObject, eventdata, handles)
  179. % hObject handle to edit1 (see GCBO)
  180. % eventdata reserved - to be defined in a future version of MATLAB
  181. % handles empty - handles not created until after all CreateFcns called
  182. % Hint: edit controls usually have a white background on Windows.
  183. % See ISPC and COMPUTER.
  184. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  185. set(hObject,'BackgroundColor','white');
  186. end
  187. % --- Executes on button press in pushbutton1.
  188. function pushbutton1_Callback(hObject, eventdata, handles)
  189. % hObject handle to pushbutton1 (see GCBO)
  190. % eventdata reserved - to be defined in a future version of MATLAB
  191. % handles structure with handles and user data (see GUIDATA)
  192. % --- Executes on button press in pushbutton2.
  193. function pushbutton2_Callback(hObject, eventdata, handles)
  194. % hObject handle to pushbutton2 (see GCBO)
  195. % eventdata reserved - to be defined in a future version of MATLAB
  196. % handles structure with handles and user data (see GUIDATA)
  197. set(handles.edit1,'String','')
  198. % --- Executes on button press in pushbutton10.
  199. function pushbutton10_Callback(hObject, eventdata, handles)
  200. % hObject handle to pushbutton10 (see GCBO)
  201. % eventdata reserved - to be defined in a future version of MATLAB
  202. % handles structure with handles and user data (see GUIDATA)
  203. accessUpdate(handles);
  204. % --- Executes on selection change in popupmenu2.
  205. function popupmenu2_Callback(hObject, eventdata, handles)
  206. % hObject handle to popupmenu2 (see GCBO)
  207. % eventdata reserved - to be defined in a future version of MATLAB
  208. % handles structure with handles and user data (see GUIDATA)
  209. % Hints: contents = get(hObject,'String') returns popupmenu2 contents as cell array
  210. % contents{get(hObject,'Value')} returns selected item from popupmenu2
  211. % --- Executes during object creation, after setting all properties.
  212. function popupmenu2_CreateFcn(hObject, eventdata, handles)
  213. % hObject handle to popupmenu2 (see GCBO)
  214. % eventdata reserved - to be defined in a future version of MATLAB
  215. % handles empty - handles not created until after all CreateFcns called
  216. % Hint: popupmenu controls usually have a white background on Windows.
  217. % See ISPC and COMPUTER.
  218. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  219. set(hObject,'BackgroundColor','white');
  220. end
  221. % --- Scan
  222. function pushbutton11_Callback(hObject, eventdata, handles)
  223. % hObject handle to pushbutton11 (see GCBO)
  224. % eventdata reserved - to be defined in a future version of MATLAB
  225. % handles structure with handles and user data (see GUIDATA)
  226. % get list of knobs to scan
  227. knobs={'Skew1' 'Skew2' 'Skew3' 'Skew4'};
  228. scanreq=get(handles.popupmenu2,'Value');
  229. % Initialise to get emit calc data from current lattice
  230. extCoupling_run('init');
  231. opt_text=[];
  232. if scanreq==1
  233. for iknob=1:length(knobs)
  234. set(handles.text2,'String',['Starting scan for knob: ',knobs{iknob}]); set(handles.text2,'foregroundcolor','black');
  235. drawnow('expose');
  236. pars.knob_name=knobs{iknob};
  237. extCoupling_run('setPars',pars);
  238. stat=extCoupling_run('scan');
  239. if stat{1}~=1; guierr(handles,stat{2}); end;
  240. extCoupling('popupmenu1_Callback',handles.popupmenu1,[],handles); % update plot axis
  241. [stat data]=extCoupling_run('getData');
  242. opt_text=[opt_text pars.knob_name ' : ' num2str(data.(pars.knob_name).fit.B(1)) ' '];
  243. end % for iknob
  244. else
  245. set(handles.text2,'String',['Starting scan for knob: ',knobs{scanreq-1}]); set(handles.text2,'foregroundcolor','black');
  246. drawnow('expose');
  247. pars.knob_name=knobs{scanreq-1};
  248. extCoupling_run('setPars',pars);
  249. stat=extCoupling_run('scan');
  250. if stat{1}~=1; guierr(handles,stat{2}); end;
  251. extCoupling('popupmenu1_Callback',handles.popupmenu1,[],handles); % update plot axis
  252. [stat data]=extCoupling_run('getData');
  253. opt_text=[opt_text pars.knob_name ' : ' num2str(data.(pars.knob_name).fit.B(1))];
  254. end % if scanreq=1
  255. set(handles.text3,'String',opt_text)
  256. set(handles.text2,'String','Scan Complete.'); set(handles.text2,'foregroundcolor','black');
  257. function guierr(handles,txt)
  258. set(handles.text2,'String',txt)
  259. set(handles.text2,'foregroundcolor','red')
  260. drawnow('expose');
  261. function accessUpdate(handles)
  262. set(handles.text2,'String','Checking/requesting access')
  263. set(handles.text2,'foregroundcolor','black')
  264. drawnow('expose');
  265. [stat resp] = controls_access;
  266. bhan=handles.pushbutton10;
  267. if stat{1}~=1
  268. set(bhan,'backgroundcolor','black')
  269. set(bhan,'foregroundcolor','white')
  270. set(handles.text2,'String',stat{2})
  271. set(handles.text2,'foregroundcolor','red')
  272. drawnow('expose');
  273. elseif resp
  274. set(bhan,'backgroundcolor','green')
  275. set(bhan,'foregroundcolor','black')
  276. set(handles.text2,'String','Access to required control PV''s granted')
  277. set(handles.text2,'foregroundcolor','black')
  278. drawnow('expose');
  279. else
  280. set(bhan,'backgroundcolor','red')
  281. set(bhan,'foregroundcolor','black')
  282. set(handles.text2,'String','Access to required control PV''s denied')
  283. set(handles.text2,'foregroundcolor','red')
  284. drawnow('expose');
  285. end % if stat/resp
  286. % --- Executes during object deletion, before destroying properties.
  287. function figure1_DeleteFcn(hObject, eventdata, handles)
  288. % hObject handle to figure1 (see GCBO)
  289. % eventdata reserved - to be defined in a future version of MATLAB
  290. % handles structure with handles and user data (see GUIDATA)
  291. global FL
  292. if isfield(FL,'Gui') && isfield(FL.Gui,'extCoupling')
  293. FL.Gui=rmfield(FL.Gui,'extCoupling');
  294. end
  295. delete(handles.figure1);
  296. % --- Executes on button press in pushbutton12.
  297. function pushbutton12_Callback(hObject, eventdata, handles)
  298. % hObject handle to pushbutton12 (see GCBO)
  299. % eventdata reserved - to be defined in a future version of MATLAB
  300. % handles structure with handles and user data (see GUIDATA)
  301. popupmenu1_Callback(handles.popupmenu1,[],handles);
  302. % --- Executes on button press in checkbox1.
  303. function checkbox1_Callback(hObject, eventdata, handles)
  304. % hObject handle to checkbox1 (see GCBO)
  305. % eventdata reserved - to be defined in a future version of MATLAB
  306. % handles structure with handles and user data (see GUIDATA)
  307. % Hint: get(hObject,'Value') returns toggle state of checkbox1
  308. pars.eta_meas=get(hObject,'Value');
  309. extCoupling_run('setPars',pars);
  310. function edit2_Callback(hObject, eventdata, handles)
  311. % hObject handle to edit2 (see GCBO)
  312. % eventdata reserved - to be defined in a future version of MATLAB
  313. % handles structure with handles and user data (see GUIDATA)
  314. global INSTR BEAMLINE
  315. dispval=str2double(get(hObject,'String'));
  316. mw=findcells(BEAMLINE,'Name','MW0X');
  317. mwi=findcells(BEAMLINE,'Index',mw);
  318. if ~isempty(mwi)
  319. INSTR{mwi}.dispref(3)=dispval*1e-3;
  320. else
  321. errordlg('INSTR not found for this wirescanner!','extCoupling error');
  322. end
  323. % --- Executes during object creation, after setting all properties.
  324. function edit2_CreateFcn(hObject, eventdata, handles)
  325. % hObject handle to edit2 (see GCBO)
  326. % eventdata reserved - to be defined in a future version of MATLAB
  327. % handles empty - handles not created until after all CreateFcns called
  328. % Hint: edit controls usually have a white background on Windows.
  329. % See ISPC and COMPUTER.
  330. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  331. set(hObject,'BackgroundColor','white');
  332. end
  333. function edit3_Callback(hObject, eventdata, handles)
  334. % hObject handle to edit3 (see GCBO)
  335. % eventdata reserved - to be defined in a future version of MATLAB
  336. % handles structure with handles and user data (see GUIDATA)
  337. global INSTR BEAMLINE
  338. dispval=str2double(get(hObject,'String'));
  339. mw=findcells(BEAMLINE,'Name','MW1X');
  340. mwi=findcells(BEAMLINE,'Index',mw);
  341. if ~isempty(mwi)
  342. INSTR{mwi}.dispref(3)=dispval*1e-3;
  343. else
  344. errordlg('INSTR not found for this wirescanner!','extCoupling error');
  345. end
  346. % --- Executes during object creation, after setting all properties.
  347. function edit3_CreateFcn(hObject, eventdata, handles)
  348. % hObject handle to edit3 (see GCBO)
  349. % eventdata reserved - to be defined in a future version of MATLAB
  350. % handles empty - handles not created until after all CreateFcns called
  351. % Hint: edit controls usually have a white background on Windows.
  352. % See ISPC and COMPUTER.
  353. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  354. set(hObject,'BackgroundColor','white');
  355. end
  356. function edit4_Callback(hObject, eventdata, handles)
  357. % hObject handle to edit4 (see GCBO)
  358. % eventdata reserved - to be defined in a future version of MATLAB
  359. % handles structure with handles and user data (see GUIDATA)
  360. global INSTR BEAMLINE
  361. dispval=str2double(get(hObject,'String'));
  362. mw=findcells(BEAMLINE,'Name','MW3X');
  363. mwi=findcells(BEAMLINE,'Index',mw);
  364. if ~isempty(mwi)
  365. INSTR{mwi}.dispref(3)=dispval*1e-3;
  366. else
  367. errordlg('INSTR not found for this wirescanner!','extCoupling error');
  368. end
  369. % --- Executes during object creation, after setting all properties.
  370. function edit4_CreateFcn(hObject, eventdata, handles)
  371. % hObject handle to edit4 (see GCBO)
  372. % eventdata reserved - to be defined in a future version of MATLAB
  373. % handles empty - handles not created until after all CreateFcns called
  374. % Hint: edit controls usually have a white background on Windows.
  375. % See ISPC and COMPUTER.
  376. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  377. set(hObject,'BackgroundColor','white');
  378. end
  379. function edit5_Callback(hObject, eventdata, handles)
  380. % hObject handle to edit5 (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. global INSTR BEAMLINE
  384. dispval=str2double(get(hObject,'String'));
  385. mw=findcells(BEAMLINE,'Name','MW2X');
  386. mwi=findcells(BEAMLINE,'Index',mw);
  387. if ~isempty(mwi)
  388. INSTR{mwi}.dispref(3)=dispval*1e-3;
  389. else
  390. errordlg('INSTR not found for this wirescanner!','extCoupling error');
  391. end
  392. % --- Executes during object creation, after setting all properties.
  393. function edit5_CreateFcn(hObject, eventdata, handles)
  394. % hObject handle to edit5 (see GCBO)
  395. % eventdata reserved - to be defined in a future version of MATLAB
  396. % handles empty - handles not created until after all CreateFcns called
  397. % Hint: edit controls usually have a white background on Windows.
  398. % See ISPC and COMPUTER.
  399. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  400. set(hObject,'BackgroundColor','white');
  401. end
  402. function edit6_Callback(hObject, eventdata, handles)
  403. % hObject handle to edit6 (see GCBO)
  404. % eventdata reserved - to be defined in a future version of MATLAB
  405. % handles structure with handles and user data (see GUIDATA)
  406. global INSTR BEAMLINE
  407. dispval=str2double(get(hObject,'String'));
  408. mw=findcells(BEAMLINE,'Name','MW4X');
  409. mwi=findcells(BEAMLINE,'Index',mw);
  410. if ~isempty(mwi)
  411. INSTR{mwi}.dispref(3)=dispval*1e-3;
  412. else
  413. errordlg('INSTR not found for this wirescanner!','extCoupling error');
  414. end
  415. % --- Executes during object creation, after setting all properties.
  416. function edit6_CreateFcn(hObject, eventdata, handles)
  417. % hObject handle to edit6 (see GCBO)
  418. % eventdata reserved - to be defined in a future version of MATLAB
  419. % handles empty - handles not created until after all CreateFcns called
  420. % Hint: edit controls usually have a white background on Windows.
  421. % See ISPC and COMPUTER.
  422. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  423. set(hObject,'BackgroundColor','white');
  424. end
  425. % --- Executes on button press in checkbox2.
  426. function checkbox2_Callback(hObject, eventdata, handles)
  427. % hObject handle to checkbox2 (see GCBO)
  428. % eventdata reserved - to be defined in a future version of MATLAB
  429. % handles structure with handles and user data (see GUIDATA)
  430. % Hint: get(hObject,'Value') returns toggle state of checkbox2
  431. % --- Executes on button press in checkbox3.
  432. function checkbox3_Callback(hObject, eventdata, handles)
  433. % hObject handle to checkbox3 (see GCBO)
  434. % eventdata reserved - to be defined in a future version of MATLAB
  435. % handles structure with handles and user data (see GUIDATA)
  436. % Hint: get(hObject,'Value') returns toggle state of checkbox3
  437. % --- Executes on button press in checkbox4.
  438. function checkbox4_Callback(hObject, eventdata, handles)
  439. % hObject handle to checkbox4 (see GCBO)
  440. % eventdata reserved - to be defined in a future version of MATLAB
  441. % handles structure with handles and user data (see GUIDATA)
  442. % Hint: get(hObject,'Value') returns toggle state of checkbox4
  443. % --- Executes on button press in checkbox5.
  444. function checkbox5_Callback(hObject, eventdata, handles)
  445. % hObject handle to checkbox5 (see GCBO)
  446. % eventdata reserved - to be defined in a future version of MATLAB
  447. % handles structure with handles and user data (see GUIDATA)
  448. % Hint: get(hObject,'Value') returns toggle state of checkbox5
  449. % --- Executes on button press in checkbox6.
  450. function checkbox6_Callback(hObject, eventdata, handles)
  451. % hObject handle to checkbox6 (see GCBO)
  452. % eventdata reserved - to be defined in a future version of MATLAB
  453. % handles structure with handles and user data (see GUIDATA)
  454. % Hint: get(hObject,'Value') returns toggle state of checkbox6
  455. function setWhichWS(handles)
  456. for icb=2:6
  457. ws(icb-1)=get(handles.(sprintf('checkbox%d',icb)),'Value');
  458. end
  459. extCoupling_run('choosews',find(ws));
  460. % --- Executes on button press in pushbutton13.
  461. function pushbutton13_Callback(hObject, eventdata, handles)
  462. % hObject handle to pushbutton13 (see GCBO)
  463. % eventdata reserved - to be defined in a future version of MATLAB
  464. % handles structure with handles and user data (see GUIDATA)