Commits

Ville Suoranta authored a7c03fd081b Merge
Merge pull request #374 in CASA/casa6 from CAS-13438 to master

* commit '51107a7467a28de68bb132213152209a9016731b': CAS-13438 : Added 1 test and modified one. CAS-13438 : Fixed what got broken in cas-13211 and which showed up in cas-13421. Enabled 3 tests that got skipped in cas-13420 and which were waiting for cas-13421.

casa5/code/synthesis/ImagerObjects/SIImageStore.cc

Modified
184 184 itsImageShape = imshape;
185 185 itsObjectName = objectname;
186 186 itsMiscInfo = miscinfo;
187 187
188 188 init();
189 189
190 190 validate();
191 191 }
192 192
193 193 // Used from SynthesisNormalizer::makeImageStore()
194 - SIImageStore::SIImageStore(const String &imagename, const Bool ignorefacets)
194 + SIImageStore::SIImageStore(const String &imagename, const Bool ignorefacets, const Bool ignoresumwt)
195 195 {
196 196 LogIO os( LogOrigin("SIImageStore","Open existing Images",WHERE) );
197 197
198 198
199 199 itsPsf.reset( );
200 200 itsModel.reset( );
201 201 itsResidual.reset( );
202 202 itsWeight.reset( );
203 203 itsImage.reset( );
204 204 itsMask.reset( );
279 279 /////redo this here as psf may have different coordinates
280 280 itsCoordSys = imptr->coordinates();
281 281 itsMiscInfo=imptr->miscInfo();
282 282 if( itsUseWeight && ! doesImageExist(itsImageName+String(".weight")) )
283 283 {
284 284 throw(AipsError("Internal error : Sumwt has a useweightimage=True but the weight image does not exist."));
285 285 }
286 286 }
287 287 else
288 288 {
289 - //throw( AipsError( "SumWt information does not exist. Please create either a PSF or Residual" ) );
290 - std::shared_ptr<ImageInterface<Float> > imptr;
291 - //imptr.reset( new PagedImage<Float> (itsImageName+String(".sumwt")) );
292 - if( doesImageExist(itsImageName+String(".residual") ) )
293 - { buildImage( imptr, (itsImageName+String(".residual")) ); }
294 - else
295 - { buildImage( imptr, (itsImageName+String(".psf")) ); }
296 -
297 - itsNFacets=1;
298 - itsFacetId=0;
299 - itsUseWeight=0;
300 - itsPBScaleFactor=1.0;
301 - itsCoordSys = imptr->coordinates();
302 - itsMiscInfo=imptr->miscInfo();
289 + if(!ignoresumwt)
290 + {throw( AipsError( "SumWt information does not exist. Please create either a PSF or Residual" ) );}
291 + else
292 + {
293 + os << "SumWt does not exist. Proceeding only with PSF" << LogIO::POST;
294 + std::shared_ptr<ImageInterface<Float> > imptr;
295 + //imptr.reset( new PagedImage<Float> (itsImageName+String(".sumwt")) );
296 + if( doesImageExist(itsImageName+String(".residual") ) )
297 + { buildImage( imptr, (itsImageName+String(".residual")) ); }
298 + else
299 + { buildImage( imptr, (itsImageName+String(".psf")) ); }
300 +
301 + itsNFacets=1;
302 + itsFacetId=0;
303 + itsUseWeight=False;
304 + itsPBScaleFactor=1.0;
305 + itsCoordSys = imptr->coordinates();
306 + itsMiscInfo=imptr->miscInfo();
307 + }
303 308 }
304 -
305 309 }// if psf or residual exist...
306 310
307 311 if( ignorefacets==True ) itsNFacets= 1;
308 312
309 313 init();
310 314
311 315 validate();
312 316 }
313 317
314 318 // used from getSubImageStore(), for example when creating the facets list

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut