from casatools import synthesisimager, synthesisnormalizer
from casatasks import casalog
from .imager_base import PySynthesisImager
from .parallel_imager_helper import PyParallelImagerHelper
synth_imager_name = 'synthesisimager'
synth_imager_import = 'from casatools import synthesisimager'
An implementation of parallel continuum imaging, using synthesisxxxx tools
Datasets are partitioned by row and major cycles are parallelized.
Gathers and normalization are done before passing the images to a
non-parallel minor cycle. The output model image is them scattered to
all the nodes for the next parallel major cycle.
There are N synthesisimager objects.
There is 1 instance per image field, of the normalizer and deconvolver.
class PyParallelContSynthesisImager(PySynthesisImager):
def __init__(self,params=None):
PySynthesisImager.__init__(self,params)
self.PH = PyParallelImagerHelper()
self.selpars = self.allselpars;
self.allselpars = self.PH.partitionContDataSelection(self.allselpars)
self.listOfNodes = self.PH.getNodeList();
def resetSaveModelParams(self, params=None):
mainparams = params.getSelPars()
for n in self.allselpars:
for v in self.allselpars[n]:
self.allselpars[n][v]['readonly']=mainparams[v]['readonly']
self.allselpars[n][v]['usescratch']=mainparams[v]['usescratch']