Block<CountedPtr<SIImageStore> > SynthesisImager::createChanChunkImageStoreList(
CountedPtr<SIImageStore> imagestore,
LogIO os(LogOrigin("SynthesisImager", "createChanChunkImageStoreList"));
Int chunksize=imagestore->getShape()[3]/chanchunks;
Int rem=imagestore->getShape()[3] % chanchunks;
///Avoid an extra chunk with 1 channel as it cause bumps in linear interpolation
chunksize=imagestore->getShape()[3]/chanchunks;
rem=imagestore->getShape()[3] % chanchunks;
// os << LogIO::WARN << "chanchunks ["+String::toString(chanchunks)+"] is not a divisor of nchan ["+String::toString(imagestore->getShape()[3])+"].";
// 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 ;
if( rem < chunksize ) extrachunks=1;
extrachunks=rem/chunksize;
if( rem % chunksize > 0 ) extrachunks += 1;
os << "Creating " << chanchunks +extrachunks << " reference subCubes (channel chunks) for gridding " << LogIO::POST;
Block<CountedPtr<SIImageStore> > chunkList( chanchunks + extrachunks );
if( chanchunks==1 ) { chunkList[0] = imagestore; return chunkList; }
// Remember, only the FIRST field in each run can have chanchunks. So, check for this.
if( ! unChanChunkedImStore_p.null() ) {
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. ") );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Utility function to properly convert Double to String.
//With C++11 we can probably use STL to_string() function instead...
String SynthesisImager::doubleToString(const Double& df) {
ss.precision(std::numeric_limits<double>::digits10+2);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Bool SynthesisImager::makePB()
LogIO os( LogOrigin("SynthesisImager","makePB",WHERE) );