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;
249
248
Float peakresnomask = itsImages->getPeakResidual();
250
-
os<<"Set PeakRes validMask="<<validMask<<LogIO::POST;
251
249
itsLoopController.setPeakResidual( validMask ? itsImages->getPeakResidualWithinMask() : peakresnomask );
252
-
os<<"Set PeakRes DONE"<<LogIO::POST;
253
250
itsLoopController.setPeakResidualNoMask( peakresnomask );
254
251
itsLoopController.setMaxPsfSidelobe( itsImages->getPSFSidelobeLevel() );
255
252
256
253
//re-calculate current nsigma threhold
257
254
//os<<"Calling calcRobustRMS ....syndeconv."<<LogIO::POST;
258
255
Float nsigmathresh = 0.0;
259
256
Bool useautomask = ( itsAutoMaskAlgorithm=="multithresh" ? true : false);
260
257
Int iterdone = itsLoopController.getIterDone();
261
258
if ( itsNsigma >0.0 ) {
262
259
itsMaskHandler->setPBMaskLevel(itsPBMask);