Commits
R. V. Urvashi authored 6fbeb61c702
1347 1347 | return localMapper; |
1348 1348 | } |
1349 1349 | |
1350 1350 | |
1351 1351 | Block<CountedPtr<SIImageStore> > SynthesisImager::createFacetImageStoreList( |
1352 1352 | CountedPtr<SIImageStore> imagestore, |
1353 1353 | Int facets) |
1354 1354 | { |
1355 1355 | LogIO os(LogOrigin("SynthesisImager", "createFacetImageStoreList")); |
1356 1356 | |
1357 - | os << "Creating " << facets*facets << " facets in total " << LogIO::POST; |
1357 + | // os << "Creating " << facets*facets << " facets in total " << LogIO::POST; |
1358 1358 | |
1359 1359 | Block<CountedPtr<SIImageStore> > facetList( facets*facets ); |
1360 1360 | |
1361 1361 | if( facets==1 ) { facetList[0] = imagestore; return facetList; } |
1362 1362 | |
1363 1363 | // Remember, only the FIRST field in each run can have facets. So, check for this. |
1364 1364 | if( ! unFacettedImStore_p.null() ) { |
1365 1365 | throw( AipsError("A facetted image has already been set. Facets are supported only for the main (first) field. Please submit a feature-request if you need multiple facets for outlier fields as well. ") ); |
1366 1366 | } |
1367 1367 | |
1368 1368 | unFacettedImStore_p = imagestore; |
1369 1369 | facetsStore_p = facets; |
1370 - | |
1370 + | |
1371 + | os << "Creating " << facets*facets << " facets with shapes : " ; |
1371 1372 | // Note : facets : Number of facets on a side. |
1372 1373 | // Note : facet : index from range(0, facets*facets) |
1373 1374 | for (Int facet=0; facet< facets*facets; ++facet){ |
1374 1375 | facetList[facet] = unFacettedImStore_p->getSubImageStore(facet, facets); |
1375 - | } |
1376 - | |
1376 + | facetList[facet]->psf(); // To initialize the shapes. Needs first access. CAS-10132 |
1377 + | os << "(" << facet << " : " << facetList[facet]->getShape() << ")"; //<< LogIO::POST; |
1378 + | } |
1379 + | os << LogIO::POST; |
1380 + | |
1377 1381 | return facetList; |
1378 1382 | } |
1379 1383 | |
1380 1384 | /* |
1381 1385 | void SynthesisImager::setPsfFromOneFacet() |
1382 1386 | { |
1383 1387 | |
1384 1388 | if( unFacettedImStore_p.null() ){ |
1385 1389 | throw(AipsError("Internal Error in SynthesisImager : Setting PSF on Null unfacettedimage")); |
1386 1390 | } |
1432 1436 | // os << "Therefore, "+String::toString(imagestore->getShape()[3] % chanchunks)+" channel(s) at the end of the cube will be treated as an extra chunk." << LogIO::POST ; |
1433 1437 | |
1434 1438 | if( rem < chunksize ) extrachunks=1; |
1435 1439 | else |
1436 1440 | { |
1437 1441 | extrachunks=rem/chunksize; |
1438 1442 | if( rem % chunksize > 0 ) extrachunks += 1; |
1439 1443 | } |
1440 1444 | } |
1441 1445 | |
1442 - | os << "Creating " << chanchunks +extrachunks << " reference subCubes (channel chunks) for gridding " << LogIO::POST; |
1446 + | os << "Creating " << chanchunks +extrachunks << " reference subCubes (channel chunks) for gridding. Shapes : "; // << LogIO::POST; |
1443 1447 | |
1444 1448 | Block<CountedPtr<SIImageStore> > chunkList( chanchunks + extrachunks ); |
1445 1449 | |
1446 1450 | if( chanchunks==1 ) { chunkList[0] = imagestore; return chunkList; } |
1447 1451 | |
1448 1452 | // Remember, only the FIRST field in each run can have chanchunks. So, check for this. |
1449 1453 | if( ! unChanChunkedImStore_p.null() ) { |
1450 1454 | throw( AipsError("A channel chunked image has already been set. Chanchunks are supported only for the main (first) field. Please submit a feature-request if you need multiple chanchunks for outlier fields as well. ") ); |
1451 1455 | } |
1452 1456 | |
1453 1457 | unChanChunkedImStore_p = imagestore; |
1454 1458 | chanChunksStore_p = chanchunks; |
1455 1459 | |
1456 1460 | for (Int chunk=0; chunk< chanchunks+extrachunks; ++chunk){ |
1457 1461 | chunkList[chunk] = unChanChunkedImStore_p->getSubImageStore(0,1,chunk, chanchunks); |
1462 + | chunkList[chunk]->psf(); // To initialize the shapes. Needs first access. CAS-10132 |
1463 + | os << "(" << chunk << " : " << chunkList[chunk]->getShape() << ")"; //<< LogIO::POST; |
1458 1464 | } |
1465 + | os << LogIO::POST; |
1459 1466 | |
1460 1467 | return chunkList; |
1461 1468 | } |
1462 1469 | |
1463 1470 | |
1464 1471 | |
1465 1472 | |
1466 1473 | void SynthesisImager::appendToMapperList(String imagename, |
1467 1474 | CoordinateSystem& csys, |
1468 1475 | IPosition imshape, |