from casatasks import casalog
from casatools import image, measures, ms, msmetadata, quanta, table
from . import mslisthelper, sdbeamutil, sdutil
from .task_tsdimaging import conform_mslist
def sdimaging(infiles, outfile, overwrite, field, spw, antenna, scan, intent,
mode, nchan, start, width, veltype, outframe,
gridfunction, convsupport, truncate, gwidth, jwidth,
imsize, cell, phasecenter, projection, ephemsrcname,
pointingcolumn, restfreq, stokes, minweight, brightnessunit, clipminmax,
enablecache, convertfirst,
'The sdimaging task is deprecated and will be removed in future releases. '
'Please use tsdimaging instead.',
with sdimaging_worker(**locals()) as worker:
"""Return True if the argument is string type."""
return type(val) in [str, numpy.str_]
def get_subtable_path(vis, name):
return os.path.join(vis, name)
class cleanhelper_minimal(object):
def __init__(self, imtool='', vis='', sort_index=None, usescratch=False, casalog=casalog):
if((type(vis)==list) and (len(vis)==1)):
assert not isinstance(imtool, str)
assert sort_index is not None
self.sortedvisindx = sort_index
self.sortedvislist = [self.vislist[i] for i in sort_index]
self.dataspecframe='LSRK'
def convertvf(self,vf,frame,field,restf,veltype='radio'):
returns doppler(velocity) or frequency in string
currently use first rest frequency
Assume input vf (velocity or fequency in a string) and
output are the same 'frame'.
if(frame==''): frame=self.dataspecframe
if(qa.quantity(vf)['unit'].find('m/s') > -1):
elif(qa.quantity(vf)['unit'].find('Hz') > -1):