1 | function varargout = bpmrespmatgui(varargin) |
---|
2 | % BPMRESPMATGUI M-file for bpmrespmatgui.fig |
---|
3 | % BPMRESPMATGUI, by itself, creates a new BPMRESPMATGUI or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % H = BPMRESPMATGUI returns the handle to a new BPMRESPMATGUI or the handle to |
---|
7 | % the existing singleton*. |
---|
8 | % |
---|
9 | % BPMRESPMATGUI('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
10 | % function named CALLBACK in BPMRESPMATGUI.M with the given input arguments. |
---|
11 | % |
---|
12 | % BPMRESPMATGUI('Property','Value',...) creates a new BPMRESPMATGUI or raises the |
---|
13 | % existing singleton*. Starting from the left, property value pairs are |
---|
14 | % applied to the GUI before bpmrespmatgui_OpeningFcn gets called. An |
---|
15 | % unrecognized property name or invalid value makes property application |
---|
16 | % stop. All inputs are passed to bpmrespmatgui_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 bpmrespmatgui |
---|
24 | |
---|
25 | % Last Modified by GUIDE v2.5 21-Mar-2011 17:01:17 |
---|
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', @bpmrespmatgui_OpeningFcn, ... |
---|
32 | 'gui_OutputFcn', @bpmrespmatgui_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 bpmrespmatgui is made visible. |
---|
48 | function bpmrespmatgui_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 bpmrespmatgui (see VARARGIN) |
---|
54 | |
---|
55 | % Choose default command line output for bpmrespmatgui |
---|
56 | handles.output = hObject; |
---|
57 | |
---|
58 | % Directory name for saving data |
---|
59 | handles.DirName = ''; |
---|
60 | |
---|
61 | % Update handles structure |
---|
62 | guidata(hObject, handles); |
---|
63 | |
---|
64 | % UIWAIT makes bpmrespmatgui wait for user response (see UIRESUME) |
---|
65 | % uiwait(handles.figure1); |
---|
66 | |
---|
67 | |
---|
68 | % --- Outputs from this function are returned to the command line. |
---|
69 | function varargout = bpmrespmatgui_OutputFcn(hObject, eventdata, handles) |
---|
70 | % varargout cell array for returning output args (see VARARGOUT); |
---|
71 | % hObject handle to figure |
---|
72 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
73 | % handles structure with handles and user data (see GUIDATA) |
---|
74 | |
---|
75 | % Get default command line output from handles structure |
---|
76 | varargout{1} = handles.output; |
---|
77 | |
---|
78 | |
---|
79 | % --- Executes on button press in pushbutton_bruit. |
---|
80 | function pushbutton_bruit_Callback(hObject, eventdata, handles) |
---|
81 | % hObject handle to pushbutton_bruit (see GCBO) |
---|
82 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
83 | % handles structure with handles and user data (see GUIDATA) |
---|
84 | |
---|
85 | switch getmode('BPMx') |
---|
86 | case 'Online' |
---|
87 | [Rx Ry DCCT tout BPMxStd BPMyStd FileName] = monbpm('Archive',180); |
---|
88 | otherwise |
---|
89 | [Rx Ry DCCT tout BPMxStd BPMyStd FileName] = monbpm('Archive',10); |
---|
90 | end |
---|
91 | |
---|
92 | system(['mv ' FileName ' ' handles.DirName filesep]); |
---|
93 | |
---|
94 | |
---|
95 | % --- Executes on button press in pushbutton_dispersion. |
---|
96 | function pushbutton_dispersion_Callback(hObject, eventdata, handles) |
---|
97 | % hObject handle to pushbutton_dispersion (see GCBO) |
---|
98 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
99 | % handles structure with handles and user data (see GUIDATA) |
---|
100 | |
---|
101 | figure |
---|
102 | [Dx, Dy, FileName] = measdisp('Archive', 'Display'); |
---|
103 | system(['mv ' FileName ' ' handles.DirName filesep]); |
---|
104 | |
---|
105 | |
---|
106 | % --- Executes on button press in pushbutton_matSOFB. |
---|
107 | function pushbutton_matSOFB_Callback(hObject, eventdata, handles) |
---|
108 | % hObject handle to pushbutton_matSOFB (see GCBO) |
---|
109 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
110 | % handles structure with handles and user data (see GUIDATA) |
---|
111 | |
---|
112 | switch getmode('BPMx') |
---|
113 | case 'Online' |
---|
114 | [Rmat, OutputFileName] = measbpmresp('Archive'); |
---|
115 | if ~isempty(Rmat) |
---|
116 | tango_giveInformationMessage('Fin de mesure Matrice réponse'); |
---|
117 | end |
---|
118 | otherwise |
---|
119 | [Rmat, OutputFileName] = measbpmresp('Archive', 'Model'); |
---|
120 | end |
---|
121 | if ~isempty(Rmat) |
---|
122 | system(['mv ' OutputFileName ' ' handles.DirName filesep]); |
---|
123 | end |
---|
124 | |
---|
125 | % --- Executes on button press in pushbutton_matFOFB. |
---|
126 | function pushbutton_matFOFB_Callback(hObject, eventdata, handles) |
---|
127 | % hObject handle to pushbutton_matFOFB (see GCBO) |
---|
128 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
129 | % handles structure with handles and user data (see GUIDATA) |
---|
130 | |
---|
131 | switch getmode('BPMx') |
---|
132 | case 'Online' |
---|
133 | [Rmat, OutputFileName] = measbpmresp4FOFB('Archive'); |
---|
134 | if ~isempty(Rmat) |
---|
135 | tango_giveInformationMessage('Fin de mesure Matrice réponse'); |
---|
136 | end |
---|
137 | otherwise |
---|
138 | [Rmat, OutputFileName] = measbpmresp4FOFB('Archive', 'Model'); |
---|
139 | end |
---|
140 | |
---|
141 | if ~isempty(Rmat) |
---|
142 | system(['mv ' OutputFileName ' ' handles.DirName filesep]); |
---|
143 | end |
---|
144 | |
---|
145 | % --- Executes on button press in pushbutton_directory. |
---|
146 | function pushbutton_directory_Callback(hObject, eventdata, handles) |
---|
147 | % hObject handle to pushbutton_directory (see GCBO) |
---|
148 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
149 | % handles structure with handles and user data (see GUIDATA) |
---|
150 | |
---|
151 | RootDirectory = fileparts(getfamilydata('Directory', 'LOCOData')); |
---|
152 | DirName = RootDirectory; |
---|
153 | while ~ischar(DirName) || (strcmpi(DirName, RootDirectory) || exist(DirName, 'dir') ~=7) |
---|
154 | DirName = uigetdir(RootDirectory, 'Select or create a LOC0 directory'); |
---|
155 | if strcmpi(DirName, RootDirectory) |
---|
156 | h = warndlg('Abort: Directory is not correct. Choose a subdirectory'); |
---|
157 | uiwait(h) |
---|
158 | elseif ischar(DirName) && exist(DirName, 'dir') ~=7 |
---|
159 | warndlg('Abort: Directory not selected'); |
---|
160 | end |
---|
161 | end |
---|
162 | cd(DirName); % gotodirectory |
---|
163 | |
---|
164 | handles.DirName = DirName; |
---|
165 | % Update handles structure |
---|
166 | guidata(hObject, handles); |
---|
167 | |
---|
168 | ival = regexp(DirName,'/', 'end'); |
---|
169 | |
---|
170 | set(handles.text_directory, 'String', DirName(ival(end)+1:end)); |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | % --- Executes on button press in pushbutton_buildloco. |
---|
175 | function pushbutton_buildloco_Callback(hObject, eventdata, handles) |
---|
176 | % hObject handle to pushbutton_buildloco (see GCBO) |
---|
177 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
178 | % handles structure with handles and user data (see GUIDATA) |
---|
179 | buildlocoinput |
---|
180 | |
---|
181 | % --- Executes on button press in pushbutton_locogui. |
---|
182 | function pushbutton_locogui_Callback(hObject, eventdata, handles) |
---|
183 | % hObject handle to pushbutton_locogui (see GCBO) |
---|
184 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
185 | % handles structure with handles and user data (see GUIDATA) |
---|
186 | |
---|
187 | locogui |
---|
188 | |
---|
189 | |
---|
190 | % --- Executes on button press in pushbutton_applysym. |
---|
191 | function pushbutton_applysym_Callback(hObject, eventdata, handles) |
---|
192 | % hObject handle to pushbutton_applysym (see GCBO) |
---|
193 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
194 | % handles structure with handles and user data (see GUIDATA) |
---|
195 | LOCOsymgui |
---|
196 | |
---|
197 | |
---|
198 | % --- Executes on button press in pushbutton_directory2. |
---|
199 | function pushbutton_directory2_Callback(hObject, eventdata, handles) |
---|
200 | % hObject handle to pushbutton_directory2 (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 | pushbutton_directory_Callback(hObject, eventdata, handles) |
---|
204 | |
---|
205 | % --- Executes on button press in pushbutton_measdisp2. |
---|
206 | function pushbutton_measdisp2_Callback(hObject, eventdata, handles) |
---|
207 | % hObject handle to pushbutton_measdisp2 (see GCBO) |
---|
208 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
209 | % handles structure with handles and user data (see GUIDATA) |
---|
210 | pushbutton_dispersion_Callback |
---|
211 | |
---|
212 | % --- Executes on button press in pushbutton_bpmmon2. |
---|
213 | function pushbutton_bpmmon2_Callback(hObject, eventdata, handles) |
---|
214 | % hObject handle to pushbutton_bpmmon2 (see GCBO) |
---|
215 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
216 | % handles structure with handles and user data (see GUIDATA) |
---|
217 | pushbutton_bruit_Callback |
---|
218 | |
---|
219 | |
---|
220 | % --- Executes on button press in pushbutton_applyFOFB. |
---|
221 | function pushbutton_applyFOFB_Callback(hObject, eventdata, handles) |
---|
222 | % hObject handle to pushbutton_applyFOFB (see GCBO) |
---|
223 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
224 | % handles structure with handles and user data (see GUIDATA) |
---|
225 | |
---|
226 | |
---|
227 | % --- Executes on button press in pushbutton_locogui2. |
---|
228 | function pushbutton_locogui2_Callback(hObject, eventdata, handles) |
---|
229 | % hObject handle to pushbutton_locogui2 (see GCBO) |
---|
230 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
231 | % handles structure with handles and user data (see GUIDATA) |
---|
232 | locogui |
---|
233 | |
---|
234 | % --- Executes on button press in pushbutton_buildlocoFOFB. |
---|
235 | function pushbutton_buildlocoFOFB_Callback(hObject, eventdata, handles) |
---|
236 | % hObject handle to pushbutton_buildlocoFOFB (see GCBO) |
---|
237 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
238 | % handles structure with handles and user data (see GUIDATA) |
---|
239 | buildlocoinput_fofb |
---|