casalog.post(" %s %s %s %s %s %s" % (str_split(spwIdList[i], '_')[1].ljust(4), str(nChanList[i]).ljust(4), str(refFreqList[i]/1e6).ljust(8), str(np.array(chanWidthList[i])/1e3).ljust(8), str(np.array(chanWidthList[i])*nChanList[i]/1e6).ljust(8), basebandList[i].ljust(8)))
from __future__ import absolute_import
from xml.dom import minidom
except ImportError as exc:
raise ImportError("task listsdm requires minidom but there was an import error: {}".
from casatasks.private.casa_transition import is_CASA6
from casatools import quanta, measures
from casatasks import casalog
xmlscans = minidom.parse(sdm+'/Scan.xml')
rowlist = xmlscans.getElementsByTagName("row")
rowfid = rownode.getElementsByTagName("scanNumber")
fid = int(rowfid[0].childNodes[0].nodeValue)
rowsubs = rownode.getElementsByTagName("numSubscan")
rowsubs = rownode.getElementsByTagName("numSubScan")
nsubs = int(rowsubs[0].childNodes[0].nodeValue)
rownint = rownode.getElementsByTagName("numIntent")
nint = int(rownint[0].childNodes[0].nodeValue)
rowintents = rownode.getElementsByTagName("scanIntent")
sint = str(rowintents[0].childNodes[0].nodeValue)
rowstart = rownode.getElementsByTagName("startTime")
start = int(rowstart[0].childNodes[0].nodeValue)
startmjd = float(start)*1.0E-9/86400.0
t = _qa.quantity(startmjd,'d')
starttime = _qa.time(t,form="ymd",prec=8)[0]
startTimeShort.append(_qa.time(t,prec=8)[0])
rowend = rownode.getElementsByTagName("endTime")
end = int(rowend[0].childNodes[0].nodeValue)
endmjd = float(end)*1.0E-9/86400.0
t = _qa.quantity(endmjd,'d')
endtime = _qa.time(t,form="ymd",prec=8)[0]
endTimeShort.append(_qa.time(t,prec=8)[0])
rowsrc = rownode.getElementsByTagName("sourceName")
src = str(rowsrc[0].childNodes[0].nodeValue)
scandict[fid]['start'] = starttime
scandict[fid]['end'] = endtime
timestr = starttime+'~'+endtime
scandict[fid]['timerange'] = timestr
scandict[fid]['source'] = src
scandict[fid]['intent'] = rint
scandict[fid]['nsubs'] = nsubs