res=sdimaging(infiles=self.rawfile,outfile=self.outfile,intent='',cell=self.cell,imsize=self.imsize,phasecenter=self.phasecenter,gridfunction=self.gridfunction,mode='frequency',nchan=10,start=start,width=width)
from __future__ import absolute_import
from __future__ import print_function
from casatasks.private.casa_transition import is_CASA6
from casatools import ctsys, image, regionmanager, measures, msmetadata, table, quanta
from casatools import ms as mstool
from casatasks import sdimaging, flagdata
from casatasks.private.sdutil import tbmanager, toolmanager, table_selector
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from testhelper import copytree_ignore_subversion, TableCacheValidator
ctsys_resolve = ctsys.resolve
from __main__ import default
from taskinit import metool as measures
from taskinit import qatool as quanta
from taskinit import tbtool as table
from taskinit import mstool
from taskinit import iatool as image
from taskinit import rgtool as regionmanager
from taskinit import msmdtool as msmetadata
from . import selection_syntax
import tests.selection_syntax as selection_syntax
from tests.testutils import copytree_ignore_subversion, TableCacheValidator
from sdimaging import sdimaging
from sdutil import tbmanager, toolmanager, table_selector
dataRoot = os.path.join(os.environ.get('CASAPATH').split()[0],'data')
def ctsys_resolve(apath):
return os.path.join(dataRoot,apath)
def construct_refstat_uniform(fluxval, blc_data, trc_data):
Return a dictionary of analytic reference statistics of uniform image
fluxval : the uniform flux of the image
blc_data : blc of un-masked pixel (e.g., [0,0,0,0] for whole image)
trc_data : trc of un-masked pixel
a dictionary of statistics, 'min', 'max', 'rms', 'sigma', 'mean',
'npts', 'sum', and 'sumsq'
nvalid *= abs(trc_data[idim]-blc_data[idim]+1)
retstat = {'min': [fluxval], 'max': [fluxval], 'rms': [fluxval],
'sigma': [0.], 'mean': [fluxval], 'npts': [nvalid],
'sum': [fluxval*nvalid], 'sumsq': [fluxval**2*nvalid]}
Out of place merge of two dictionaries.
If both dictionary has the same keys, value of the second