from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatools import miriadfiller
from casatasks import casalog
from .mstools import write_history
from mstools import write_history
miriadfiller = casac.miriadfiller
"""Convert a Miriad visibility file into a CASA visibility file (MS).
The conversion of the Miriad visibility format into a measurement set. This version
has been tested for both ATNF and CARMA Miriad files.
mirfile -- Name of input Miriad visibility file (directory)
default: none; example: mirfile='mydata.uv'
.... vis -- Output ms name
default: mirfile name with suffix replaced by '.ms'
.... tsys -- Set True to use the system temperature to set the visibility weights
.... spw -- specify the spectral windows to use
.... vel -- Velocity system to use: LSRK, LSRD or TOPO
.... default: TOPO for ATCA, LSRK for CARMA
.... linecal -- (CARMA only) apply CARMA linecal on the fly?
.... wide -- (CARMA only) specify the window averages to use
.... debug -- specify level of debug messages (0,1,2,3)
casalog.origin('importmiriad')