import sys
import pyrap
from pyrap.tables import table, maketabdesc, makecoldesc
from pyrap.tables import tablecolumn

print(sys.argv[1])

#inputMS = '/local/work/gheller/mock/test1hr_t201806301100_SBL150.MS'
#inputMS = 'gauss_t201806301100_SBL180.MS'
#inputMS = 'gauss_t201806301100_SBH300.MS'
#inputMS = 'C_RADIO30MHz500_t201806301100_SBL180.MS'
#inputMS = 'C_sky802_t201806301100_SBL180.MS'
#inputMS = 'onehour_10asec_t201806301100_SBL180.MS'
#oinputMS = 'sixhours_t201806301100_SBL180.MS'

inputMS = sys.argv[1]
t=table(inputMS,readonly=False)

print("     ")
print("Columns in the MS")
print(t.colnames())
print("     ")

t.putcol('DATA', t.getcol('MODEL_DATA'))
t.flush()
