from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatasks import casalog
from casatools import table, agentflagger, ms, imager, measures, msmetadata, sdm
from .mstools import write_history
from . import flaghelper as fh
from . import convertephem as ce
from .parallel.parallel_data_helper import ParallelDataHelper
from mstools import write_history
from parallel.parallel_data_helper import ParallelDataHelper
import recipes.ephemerides.convertephem as ce
agentflagger = casac.agentflagger
msmetadata = casac.msmetadata
with_pointing_correction=None,
polyephem_tabtimestep=None
"""Convert an ALMA Science Data Model observation into a CASA visibility file (MS) or single-dish data format (Scantable).
The conversion of the ALMA SDM archive format into a measurement set. This version
is under development and is geared to handling many spectral windows of different
asdm -- Name of input ASDM file (directory)
default: none; example: asdm='ExecBlock3'
vis -- Root ms or scantable name, note a prefix (.ms or .asap) is NOT appended to this name
createmms -- Create a Multi-MS
corr_mode -- correlation mode to be considered on input. Could
be one or more of the following, ao, co, ac, or all
srt -- spectral resolution type. Could be one or more of
the following, fr, ca, bw, or all
time_sampling -- specifies the time sampling, INTEGRATION and/or
SUBINTEGRATION. could be one or more of the following
ocorr_mode -- output data for correlation mode AUTO_ONLY