concattool = iatool.imageconcat(outfile=fullconcatimname, mode=type, infiles=subimliststr.strip("'"), axis=-1, tempclose=False, overwrite=True)
from __future__ import absolute_import
from casatasks.private.casa_transition import is_CASA6
from casatools import synthesisutils, synthesisimager
from casatools import image as imageanalysis
from casatasks import casalog
from .imager_base import PySynthesisImager
from .parallel_imager_helper import PyParallelImagerHelper
from imagerhelpers.imager_base import PySynthesisImager
from imagerhelpers.parallel_imager_helper import PyParallelImagerHelper
synthesisimager = casac.synthesisimager
synthesisutils = casac.synthesisutils
imageanalysis = casac.image
An implementation of parallel cube imaging, using synthesisxxxx tools.
Major and minor cycles are parallelized across frequency, by running separate
PySynthesisImagers independently per frequency chunk.
Iteration control is not synchronized, interactive mask drawing can't be done.
Reference concatenation of all the image products is done at the end.
There are N PySynthesisImager objects, each with their own
synthesisimager, deconvolvers, normalizers and iterbot.
class PyParallelCubeSynthesisImager():
def __init__(self,params=None):
allselpars = params.getSelPars()
allimagepars = params.getImagePars()
self.allinimagepars = copy.deepcopy(allimagepars)
self.allgridpars = params.getGridPars()
self.allnormpars = params.getNormPars()
self.weightpars = params.getWeightPars()
self.decpars = params.getDecPars()
self.iterpars = params.getIterPars()
self.PH = PyParallelImagerHelper()
self.NF = len(allimagepars.keys())
self.listOfNodes = self.PH.getNodeList();
self.SItool = synthesisimager()
for mss in sorted( allselpars.keys() ):
origspw[mss]={'spw':allselpars[mss]['spw']}
self.SItool.selectdata( allselpars[mss] )
for fid in sorted( allimagepars.keys() ):
self.SItool.defineimage( allimagepars[fid], self.allgridpars[fid] )
allimagepars[fid]['csys'] = self.SItool.getcsys()
if allimagepars[fid]['nchan'] == -1:
allimagepars[fid]['nchan'] = self.SItool.updatenchan()
alldataimpars[fid] = self.PH.partitionCubeSelection(allselpars,allimagepars[fid])