Source
184
184
Float tol = 0.01; // threshold test torelance (CAS-11278)
185
185
if ( itsMajorDone==0 && itsIterDone==0 )
186
186
{
187
187
if (itsMaskSum==0.0) { stopCode=7; } // if zero mask is detected it should exit right away
188
188
else { stopCode=0; }
189
189
}
190
190
else if ( itsIterDone >= itsNiter ||
191
191
itsPeakResidual <= itsThreshold ||
192
192
itsPeakResidual <= itsNsigmaThreshold ||
193
193
abs(itsPeakResidual - itsThreshold)/itsThreshold < tol ||
194
-
// will be enabled in the next commit
195
-
//abs(itsPeakResidual - itsNsigmaThreshold)/itsNsigmaThreshold < tol ||
194
+
abs(itsPeakResidual - itsNsigmaThreshold)/itsNsigmaThreshold < tol ||
196
195
itsStopFlag )
197
196
{
198
197
// os << "Reached global stopping criteria : ";
199
198
200
199
if( itsIterDone >= itsNiter ) { stopCode=1; }
201
200
//os << "Numer of iterations. "; // (" << itsIterDone << ") >= limit (" << itsNiter << ")" ;
202
201
if( usePeakRes <= itsThreshold || (usePeakRes-itsThreshold)/itsThreshold < tol) {stopCode=2; }
203
-
else if ( usePeakRes <= itsNsigmaThreshold ) {
204
-
// will be enabled in the next commit
205
-
//else if ( usePeakRes <= itsNsigmaThreshold || (itsPeakResidual - itsNsigmaThreshold)/itsNsigmaThreshold < tol ) {
202
+
else if ( usePeakRes <= itsNsigmaThreshold || (itsPeakResidual - itsNsigmaThreshold)/itsNsigmaThreshold < tol ) {
206
203
if (itsNsigmaThreshold!=0.0) { stopCode=8; } // for nsigma=0.0 this mode is turned off
207
204
}
208
205
209
206
//os << "Peak residual (" << itsPeakResidual << ") <= threshold(" << itsThreshold << ")";
210
207
if( itsStopFlag ) {stopCode=3;}
211
208
//os << "Forced stop. ";
212
209
// os << LogIO::POST;
213
210
214
211
//return true;
215
212
}