from __future__ import absolute_import
from casatasks.private.casa_transition import is_CASA6
from casatasks import casalog
from casatools import sdm, table, quanta, ms
def exportasdm(vis=None, asdm=None, datacolumn=None, archiveid=None, rangeid=None,
subscanduration=None, sbduration=None, apcorrected=None,
verbose=None, showversion=None, useversion=None):
""" Convert a CASA visibility file (MS) into an ALMA or EVLA Science Data Model.
asdm -- Name of output ASDM file (directory),
default: none; example: asdm='ExecBlock3'
datacolumn -- specifies which of the MS data columns (DATA,
CORRECTED_DATA, or MODEL_DATA) should be used as the
visibilities in the ASDM, default: DATA
archiveid -- the X0 in uid://X0/X1/X<running>
rangeid -- the X1 in uid://X0/X1/X<running>
subscanduration -- maximum duration of a subscan in the output ASDM
sbduration -- maximum duration of a scheduling block in the output ASDM
apcorrected -- If true, the data in column datacolumn should be regarded
as having atmospheric phase correction, default: False
verbose -- produce log output, default: True
showversion -- report the version of the ASDM class set,
useversion -- Selects the version of MS2asdm to be used (presently only \'v3\' is available)
casalog.origin('exportasdm')
parsummary = 'vis=\"'+str(vis)+'\", asdm=\"'+str(asdm)+'\", datacolumn=\"'+str(datacolumn)+'\",'