-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmac_setprogress.m
174 lines (140 loc) · 4.63 KB
/
smac_setprogress.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
function smac_setprogress(prog)
% SMAC_SETPROGRESS Set progress indicator and clear fields in SMAC structure
%
% SMAC_SETPROGRESS(PROG)
%
% SMAC_SETPROGRESS sets certain fields in the SMAC structure and clears
% others, depending on the string supplied in PROG. It is intended to make
% the structure representative of the location in the curve-fitting process
% as if the user had started from the beginning, in case the user has
% backed up. This ensures that the structure data is all consistent.
%==========================================================================
%
% ********************************************************************
% *** Copyright (C) 2008 Sandia Corporation. ***
% *** ***
% *** Under the terms of Contract DE-AC04-94AL85000 with Sandia ***
% *** Corporation, the U.S. Government retains certain rights in ***
% *** this software. ***
% ********************************************************************
%
% The contents of this file are subject to the Mozilla Public License
% Version 1.1 (the "License"); you may not use this file except in
% compliance with the License. You may obtain a copy of the License at
%
% http://www.mozilla.org/MPL/
%
% Software distributed under the License is distributed on an "AS IS"
% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
% License for the specific language governing rights and limitations under
% the License.
%
% The Original Code is SMAC.
%
% The Initial Developer of the Original Code is Randy Mayes.
% All Rights Reserved.
%
% Contributor(s): Dan Hensley / ATA Engineering.
%==========================================================================
% HISTORY
% 03-Jun-2004 / ATA Engineering / Dan Hensley
% o Initial creation
%
% 01-Nov-2004 / ATA Engineering / Dan Hensley
% o Update for new storage
%
% 09-Nov-2004 / ATA Engineering / Dan Hensley
% o Update for new storage (.nroots,.shape,.corr,.corr_ref)
%
% 13-Jun-2005 / ATA Engineering / Dan Hensley
% o Several updates for new data structure members
%
% 31-Aug-2005 / ATA Engineering / Dan Hensley
% o Update for .shape.refpick
%
%==========================================================================
global ss
% Clear out information depending on where we are in the process
switch prog,
case 'pinv'
ss.done.pinv=true;
ss.done.corr=false;
ss.done.selroots=false;
ss.done.autofit=false;
ss.corr.corr=[];
ss.corr.corrind=[];
ss.corr.nroots=[];
ss.corr.corr_ref=[];
ss.freqrangecc=[];
ss.fit.rootlist=[];
ss.fit.rootlistorig=[];
ss.fit.corr_ref=[];
ss.fa=imat_fn;
ss.mif.ana.nmif=imat_fn([]);
ss.mif.ana.cmif=imat_fn([]);
ss.mif.ana.mmif=imat_fn([]);
ss.shape.residues=[];
ss.shape.shape=imat_shp([]);
ss.shape.refpick=[];
ss.shape.rootsel=[];
sstmp=smac_create_data_structure;
ss.residuals=sstmp.residuals;
case 'corrcoef'
ss.done.corr=true;
ss.done.selroots=false;
ss.done.autofit=false;
% ss.corr.corrind=[];
% ss.corr.nroots=[];
ss.fit.rootlist=[];
ss.fit.rootlistorig=[];
ss.fit.corr_ref=[];
ss.fa=imat_fn([]);
ss.mif.ana.nmif=imat_fn([]);
ss.mif.ana.cmif=imat_fn([]);
ss.mif.ana.mmif=imat_fn([]);
ss.shape.residues=[];
ss.shape.shape=imat_shp([]);
ss.shape.refpick=[];
ss.shape.rootsel=[];
sstmp=smac_create_data_structure;
ss.residuals=sstmp.residuals;
case 'plotcorr'
ss.done.corr=true;
ss.done.selroots=false;
ss.done.autofit=false;
ss.fit.rootlist=[];
ss.fit.rootlistorig=[];
ss.fit.corr_ref=[];
ss.fa=imat_fn([]);
ss.mif.ana.nmif=imat_fn([]);
ss.mif.ana.cmif=imat_fn([]);
ss.mif.ana.mmif=imat_fn([]);
ss.shape.residues=[];
ss.shape.shape=imat_shp([]);
ss.shape.refpick=[];
ss.shape.rootsel=[];
case 'selroots'
ss.done.selroots=true;
ss.done.autofit=false;
ss.fit.rootlist=[];
ss.fit.rootlistorig=[];
ss.fit.corr_ref=[];
ss.fa=imat_fn([]);
ss.mif.ana.nmif=imat_fn([]);
ss.mif.ana.cmif=imat_fn([]);
ss.mif.ana.mmif=imat_fn([]);
ss.shape.residues=[];
ss.shape.shape=imat_shp([]);
ss.shape.refpick=[];
case 'autofit'
ss.done.autofit=true;
ss.fa=imat_fn([]);
ss.mif.ana.nmif=imat_fn([]);
ss.mif.ana.cmif=imat_fn([]);
ss.mif.ana.mmif=imat_fn([]);
ss.shape.residues=[];
ss.shape.shape=imat_shp([]);
ss.shape.refpick=[];
otherwise,
uiwait(errordlg(sprintf('INTERNAL ERROR: Unknown process step ''%s''',prog)))
end