Source
238
238
if( ! itsImages->hasMask() ) // i.e. if there is no existing mask to re-use...
239
239
{ masksum = -1.0;}
240
240
else
241
241
{
242
242
masksum = itsImages->getMaskSum();
243
243
itsImages->mask()->unlock();
244
244
}
245
245
Bool validMask = ( masksum > 0 );
246
246
247
247
// Calculate Peak Residual and Max Psf Sidelobe, and fill into SubIterBot.
248
+
os<<"Calling peakresnomask..."<<LogIO::POST;
248
249
Float peakresnomask = itsImages->getPeakResidual();
250
+
os<<"Set PeakRes validMask="<<validMask<<LogIO::POST;
249
251
itsLoopController.setPeakResidual( validMask ? itsImages->getPeakResidualWithinMask() : peakresnomask );
252
+
os<<"Set PeakRes DONE"<<LogIO::POST;
250
253
itsLoopController.setPeakResidualNoMask( peakresnomask );
251
254
itsLoopController.setMaxPsfSidelobe( itsImages->getPSFSidelobeLevel() );
252
255
253
256
//re-calculate current nsigma threhold
254
257
//os<<"Calling calcRobustRMS ....syndeconv."<<LogIO::POST;
255
258
Float nsigmathresh = 0.0;
256
259
Bool useautomask = ( itsAutoMaskAlgorithm=="multithresh" ? true : false);
257
260
Int iterdone = itsLoopController.getIterDone();
258
261
if ( itsNsigma >0.0 ) {
259
262
itsMaskHandler->setPBMaskLevel(itsPBMask);