-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLDT_Matlab.m
721 lines (643 loc) · 26.4 KB
/
LDT_Matlab.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
function varargout = LDT_Matlab(varargin)
%
%------------------Institut für Hochenergiephysik Wien---------------------
%--------------Oesterreichische Akademie der Wissenschaften----------------
%---------------------International Linear Collider------------------------
%
% Name of program: LiC_Detector_Toy.m
% ILC coordinator: Winfried Mitaroff
% Supervisor: Meinhard Regler
% Authors: Manfred Valentan, based on a program by R. Fruehwirth,
% with contributions by M. Regler. A part of the helix
% tracking code was originally written by P. Billoir
% for DELPHI
%
%--------------------------------------------------------------------------
%==========================================================================
% This program has been developed by the ILC group at the Institute of High
% Energy Physics of the Austrian Academy of Sciences in Vienna, Austria.
% It is distributed for scientific usage only. No parts of the code may be
% passed on to third parties without consent of the authors. If results
% obtained by using this program are presented publicly, please give the
% appropriate credits to the authors.
%==========================================================================
%LDT_MATLAB M-file for LDT_Matlab.fig
% LDT_MATLAB, by itself, creates a new LDT_MATLAB or raises the existing
% singleton*.
%
% H = LDT_MATLAB returns the handle to a new LDT_MATLAB or the handle to
% the existing singleton*.
%
% LDT_MATLAB('Property','Value',...) creates a new LDT_MATLAB using the
% given property value pairs. Unrecognized properties are passed via
% varargin to LDT_Matlab_OpeningFcn. This calling syntax produces a
% warning when there is an existing singleton*.
%
% LDT_MATLAB('CALLBACK') and LDT_MATLAB('CALLBACK',hObject,...) call the
% local function named CALLBACK in LDT_MATLAB.M with the given input
% arguments.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help LDT_Matlab
% Last Modified by GUIDE v2.5 21-Apr-2008 09:17:28
% Begin initialization code - DO NOT EDIT
interrupt=0;
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @LDT_Matlab_OpeningFcn, ...
'gui_OutputFcn', @LDT_Matlab_OutputFcn, ...
'gui_LayoutFcn', [ ], ...
'gui_Callback', [ ]);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% Add subroutine directories to the MatLab search path
path(path,'subroutines');
path(path,'subroutines/gui');
path(path,'subroutines/outputs');
path(path,'subroutines/simulation');
path(path,'subroutines/tests');
global unit octave
unit=1; % unit=1 : computation in [mm]
% unit=10 : computation in [cm]
% unit=1000: computation in [m]
octave=0;
return
% --- Executes just before LDT_Matlab is made visible.
function LDT_Matlab_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output_control args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin unrecognized PropertyName/PropertyValue pairs from the
% command line (see VARARGIN)
% Choose default command line output_control for LDT_Matlab
handles.output = hObject;
parameterfile='simulation_parameters_Matlab.txt';
handles.parameterfile=parameterfile;
%handles.fnameresults='results.mat';
set(handles.fnameresults,'String','results.mat')
guidata(hObject, handles);
% Update handles structure
guidata(hObject, handles);
set(hObject,'position',[10 27 180 30])
% UIWAIT makes LDT_Matlab wait for user response (see UIRESUME)
% uiwait(handles.figure1);
disp(' ');
disp(' __ ___ ______ ');
disp(' ( ) ( \ (__ __) ');
disp(' )(__ ) > ) )( v2.0 ');
disp(' (____)(___/ (__) ');
disp(' The Vienna Fast Simulation Tool ');
disp(' ');
disp('Ready!');
disp(' ');
% --- Outputs from this function are returned to the command line.
function varargout = LDT_Matlab_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output_control args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output_control from handles structure
varargout{1} = handles.output;
return
% --- Executes on selection change in barrelsetup.
function barrelsetup_Callback(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns setup contents as cell array
% contents{get(hObject,'Value')} returns selected item from setup
%contents = get(hObject,'String');
action=get(hObject,'Value');
geomdir='geom/';
switch action
case 1 %Select barrel geometry
list=get(handles.selected_barrel_geometry,'String');
[fname,dirpath]=uigetfile([geomdir,'*.bgeom']);
list{1}=[geomdir,fname];
if any(fname~=0)
set(handles.selected_barrel_geometry,'String',list)
guidata(hObject, handles);
else
%errordlg('No barrel geometry has been selected')
return
end
case 2 %Modify geometry
%fname=get(handles.selected_barrel_geometry,'String');
%fname=fname{1};
[fname,dirpath]=uigetfile([geomdir,'*.bgeom']);
if any(fname~=0)
handles.filename=fname;
guidata(hObject, handles);
else
return
end
%edit(handles.filename);
edit([geomdir,fname])
case 3 %New geometry
%path(path,'geometry files/');
edit geom/empty.bgeom;
case 4
list=get(handles.selected_barrel_geometry,'String');
[fname,dirpath]=uigetfile([geomdir,'*.bgeom']);
list{end+1}=[geomdir,fname];
if any(fname~=0)
%set(handles.selected_barrel_geometry,'String',Selected barrel geometry: ',barrelname})
set(handles.selected_barrel_geometry,'String',list)
guidata(hObject, handles);
else
%errordlg('No barrel geometry has been selected')
return
end
case 5
list=get(handles.selected_barrel_geometry,'String');
if length(list)>1
temp=list;
clear list
list=temp(1:end-1);
set(handles.selected_barrel_geometry,'String',list)
guidata(hObject, handles);
end
end
return
% --- Executes on selection change in forwardsetup.
function forwardsetup_Callback(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns setup contents as cell array
% contents{get(hObject,'Value')} returns selected item from setup
%contents = get(hObject,'String');
action=get(hObject,'Value');
geomdir='geom/';
switch action
case 1 %Select forward geometry
list=get(handles.selected_forward_geometry,'String');
[fname,dirpath]=uigetfile([geomdir,'*.fgeom']);
list{1}=[geomdir,fname];
if any(fname~=0)
set(handles.selected_forward_geometry,'String',list)
guidata(hObject, handles);
else
%errordlg('No barrel geometry has been selected')
return
end
case 2 %Modify geometry
%fname=get(handles.selected_barrel_geometry,'String');
%fname=fname{1};
[fname,dirpath]=uigetfile([geomdir,'*.fgeom']);
if any(fname~=0)
handles.filename=fname;
guidata(hObject, handles);
else
return
end
%edit(handles.filename);
edit([geomdir,fname])
case 3 %New geometry
%path(path,'geometry files/');
edit geom/empty.fgeom;
case 4 % add forward geometry to list
list=get(handles.selected_forward_geometry,'String');
[fname,dirpath]=uigetfile([geomdir,'*.fgeom']);
list{end+1}=[geomdir,fname];
if any(fname~=0)
set(handles.selected_forward_geometry,'String',list)
guidata(hObject, handles);
else
%errordlg('No barrel geometry has been selected')
return
end
case 5 % remove forward geometry from list
list=get(handles.selected_forward_geometry,'String');
if length(list)>1
temp=list;
clear list
list=temp(1:end-1);
set(handles.selected_forward_geometry,'String',list)
guidata(hObject, handles);
end
end
return
function display2D_Callback(hObject, eventdata, handles)
%Display geometry
global Flags GeomVersion
global unit Bz SPR
global whandle mhandle fidlog
convf=0.299792458*1e-3*unit; % conversion factor [Gev/c T^(-1) m^(-1)]
str=get(handles.selected_barrel_geometry,'String');
nameb=str;
if strcmp(nameb,'None')
errordlg('No barrel geometry has been selected')
return
end
str=get(handles.selected_forward_geometry,'String');
namef=str;
if strcmp(namef,'None')
errordlg('No forward geometry has been selected')
return
end
namep=handles.parameterfile;
mhandle=handles.messages;
whandle=handles.warnings;
%display=1;
%[SPR,N]=LDT_ReadParameters(namep);
%[VTX,SIT,TPC,SET,FM1,FM2,RM1,RM2]=LDT_ReadGeometry(nameb{1},namef{1});
%merging(VTX,SIT,TPC,SET,FM1,FM2,RM1,RM2);
%[theta1,theta2,theta3,theta4]=limitangles; % calculates the limiting theta
% angles to seperate forward,
% intermediate, barrel and rear
%varargout{1}=geometry3D(nameb{1},namef{1},VTX,SIT,TPC,SET,FM1,...
% FM2,RM1,RM2,SPR,theta1,theta2,theta3,theta4,display);
LDT_display2D(nameb,namef);
% calls function 'geometry', if desired,
% which draws a sketch of the arrangement
%fclose(fidlog);
%h=LDT_main('display2D',nameb,namef,namep,messagehandle,warninghandle);
%handles.display=h;
%guidata(hObject, handles);
return
function display3D_Callback(hObject, eventdata, handles)
%Display geometry
global Flags GeomVersion
global unit Bz SPR
global whandle mhandle
convf=0.299792458*1e-3*unit; % conversion factor [Gev/c T^(-1) m^(-1)]
str=get(handles.selected_barrel_geometry,'String');
nameb=str;
if strcmp(nameb,'None')
errordlg('No barrel geometry has been selected')
return
end
str=get(handles.selected_forward_geometry,'String');
namef=str;
if strcmp(namef,'None')
errordlg('No forward geometry has been selected')
return
end
namep=handles.parameterfile;
mhandle=handles.messages;
whandle=handles.warnings;
%display=2;
%[SPR,N]=LDT_ReadParameters(namep);
%[VTX,SIT,TPC,SET,FM1,FM2,RM1,RM2]=LDT_ReadGeometry(nameb{1},namef{1});
%merging(VTX,SIT,TPC,SET,FM1,FM2,RM1,RM2);
%[theta1,theta2,theta3,theta4]=limitangles; % calculates the limiting theta
% angles to seperate forward,
% intermediate, barrel and rear
%varargout{1}=geometry3D(nameb{1},namef{1},VTX,SIT,TPC,SET,FM1,...
% FM2,RM1,RM2,SPR,theta1,theta2,theta3,theta4,display);
LDT_display3D(nameb,namef);
% calls function 'geometry', if desired,
% which draws a sketch of the arrangement
%h=LDT_main('display3D',nameb,namef,namep,messagehandle,warninghandle);
%handles.display=h;
%guidata(hObject, handles);
return
% --- Executes on selection change in outputs.
function outputs_Callback(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns setup contents as cell array
% contents{get(hObject,'Value')} returns selected item from setup
%contents = get(hObject,'String');
action=get(hObject,'Value');
%geomdir='geom/';
switch action
case 1 %View log file
edit LDT.log
case 2 %Pulls histograms
fnameresults=get(handles.fnameresults,'String');
%histograms(action,fnameresults);
LDT_pulls(fnameresults);
case 3 %Residuals histograms
fnameresults=get(handles.fnameresults,'String');
%histograms(action,fnameresults);
LDT_residuals(fnameresults);
case 4 %Impacts histograms
fnameresults=get(handles.fnameresults,'String');
%impacts(fnameresults);
LDT_impacts(fnameresults);
case 5 % Curves
fnameresults=get(handles.fnameresults,'String');
LDT_curves(fnameresults);
case 6 %Rave file
[fname,dirpath]=uiputfile('*.txt');
filename=[dirpath,fname];
%rave(filename,handles.messages);
fnameresults=get(handles.fnameresults,'String');
LDT2rave(filename,fnameresults);
case 7 %JAS3 file
[fname,dirpath]=uiputfile('*.txt');
filename=[dirpath,fname];
fnameresults=get(handles.fnameresults,'String');
LDT2jas3(filename,fnameresults);
end
return
% --- Executes during object creation, after setting all properties.
function barrelsetup_CreateFcn(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'fontsize',9)
return
% --- Executes during object creation, after setting all properties.
function forwardsetup_CreateFcn(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'fontsize',9)
return
%
% --- Executes during object creation, after setting all properties.
function display2D_CreateFcn(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
%if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
% set(hObject,'BackgroundColor','white');
%end
%set(hObject,'fontsize',9)
return
%}
% --- Executes during object creation, after setting all properties.
function display3D_CreateFcn(hObject, eventdata, handles)
% hObject handle to setup (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
%if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
% set(hObject,'BackgroundColor','white');
%end
%set(hObject,'fontsize',9)
return
%}
% --- Executes on selection change in setparameters.
function setparameters_Callback(hObject, eventdata, handles)
% hObject handle to parameters (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns parameters contents as cell array
% contents{get(hObject,'Value')} returns selected item from parameters
%contents = get(hObject,'String');
% Edit simulation parameters
change_simulation_parameters(handles.parameterfile);
% --- Executes on selection change in run.
function run_Callback(hObject, eventdata, handles)
% hObject handle to parameters (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns parameters contents as cell array
% contents{get(hObject,'Value')} returns selected item from parameters
%contents = get(hObject,'String');
% Run simulation
str=get(handles.selected_barrel_geometry,'String');
%nameb=str{1};
nameb=str;
str=get(handles.selected_forward_geometry,'String');
%namef=str{1};
namef=str;
namep=handles.parameterfile;
messagehandle=handles.messages;
warninghandle=handles.warnings;
if ~exist(nameb{1})
errordlg('No barrel geometry has been selected')
return
end
if ~exist(namef{1})
errordlg('No forward geometry has been selected')
return
end
%LDT_main('run simulation',nameb,namef,namep,messagehandle,warninghandle);
LDT_run(nameb,namef,messagehandle,warninghandle);
set(handles.fnameresults,'String','results.mat')
guidata(hObject, handles);
return
% --- Executes during object creation, after setting all properties.
function parameters_CreateFcn(hObject, eventdata, handles)
% hObject handle to parameters (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'fontsize',9)
return
%{
% --- Executes on selection change in outputs.
function outputs_Callback(hObject, eventdata, handles)
% hObject handle to parameters (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns parameters contents as cell array
% contents{get(hObject,'Value')} returns selected item from parameters
contents = get(hObject,'String');
action=get(hObject,'Value');
switch action
case 1 % View log file
edit LDT_Matlab.log
end
return
%}
% --- Executes during object creation, after setting all properties.
function outputs_CreateFcn(hObject, eventdata, handles)
% hObject handle to parameters (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'fontsize',9)
return
% --- Executes on button press in stop.
function stop_Callback(hObject, eventdata, handles)
% hObject handle to stop (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Save current geometry file names
str=get(handles.selected_barrel_geometry,'String');
nameb=str;
str=get(handles.selected_forward_geometry,'String');
namef=str;
save defaultgeometry nameb namef
close all
%close(handles.output)
return
% --- Executes on button press in saveresults.
function saveresults_Callback(hObject, eventdata, handles)
% hObject handle to stop (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%global fnameresults
save temp handles hObject
clear all
load temp handles hObject
[fname,dirpath]=uiputfile('*.mat');
str=get(handles.fnameresults,'String');
load(str);
if fname
save(fname)
%load temp
str=get(handles.messages,'String');
str{2}=['Simulation results written to'];
str{3}=[dirpath,fname];
str{4}=[];
set(handles.messages,'String',str);drawnow;
delete('temp.mat')
set(handles.fnameresults,'String',fname)
guidata(hObject, handles);
end
return
% --- Executes on button press in loadresults.
function loadresults_Callback(hObject, eventdata, handles)
% hObject handle to stop (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%global fnameresults
[fname,dirpath]=uigetfile('*.mat');
if fname
set(handles.fnameresults,'String',fname)
guidata(hObject, handles);
end
return
% --- Executes during object creation, after setting all properties.
function selected_barrel_geometry_CreateFcn(hObject, eventdata, handles)
% hObject handle to selected_barrel_geometry (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
handles.selected_barrel_geometry=hObject;
set(hObject,'fontsize',7)
% Load default geometry
str=get(handles.selected_barrel_geometry,'String');
if exist('defaultgeometry.mat')
load defaultgeometry nameb
str=nameb;
else
str{1}='None';
end
set(handles.selected_barrel_geometry,'String',str);
guidata(hObject, handles);
return
% --- Executes during object creation, after setting all properties.
function selected_forward_geometry_CreateFcn(hObject, eventdata, handles)
% hObject handle to selected_barrel_geometry (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
handles.selected_forward_geometry=hObject;
set(hObject,'fontsize',7)
% Load default geometry
str=get(handles.selected_forward_geometry,'String');
if exist('defaultgeometry.mat')
load defaultgeometry namef
str=namef;
else
str{1}='None';
end
set(handles.selected_forward_geometry,'String',str);
guidata(hObject, handles);
return
%{
% --- Executes on selection change in output.
function output_Callback(hObject, eventdata, handles)
% hObject handle to output (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns output contents as cell array
% contents{get(hObject,'Value')} returns selected item from output
contents = get(hObject,'String');
action=contents{get(hObject,'Value')}
return
%}
% --- Executes during object creation, after setting all properties.
function output_CreateFcn(hObject, eventdata, handles)
% hObject handle to output (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'fontsize',9)
return
% --- Executes during object creation, after setting all properties.
function warnings_CreateFcn(hObject, eventdata, handles)
% hObject handle to output (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
handles.warnings=hObject;
guidata(hObject, handles);
set(hObject,'fontweight','bold')
set(hObject,'foregroundcolor',[0 0.5 0])
set(hObject,'fontsize',8)
% --- Executes during object creation, after setting all properties.
function messages_CreateFcn(hObject, eventdata, handles)
% hObject handle to output (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
handles.messages=hObject;
guidata(hObject, handles);
set(hObject,'fontsize',8)
% --- Executes on selection change in popupmenu5.
function popupmenu5_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu5 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu5
% --- Executes during object creation, after setting all properties.
function popupmenu5_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in cancel.
function cancel_Callback(hObject, eventdata, handles)
global interrupt
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
interrupt=1;
return
% --- Executes on button press in load_results.
function load_results_Callback(hObject, eventdata, handles)
% hObject handle to load_results (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)