import math, re, sys, logging
from functools import reduce
msmd = casatools.msmetadata()
desc = {'ANTENNA_ID': {'comment': 'ID of antenna in this array',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'FEED_ID': {'comment': 'Feed id',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'INTERVAL': {'comment': 'Interval for which this set of parameters is accurate',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'keywords': {'QuantumUnits': np.array(['s'], dtype='<U1')},
'SPECTRAL_WINDOW_ID': {'comment': 'ID for this spectral window setup',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'TIME': {'comment': 'Midpoint of time for which this set of parameters is accurate',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'keywords': {'MEASINFO': {'Ref': 'UTC', 'type': 'epoch'},
'QuantumUnits': np.array(['s'], dtype='<U1')},
'TSYS': {'comment': 'System temp. for each of the two receptors',
'dataManagerGroup': 'StandardStMan',
'dataManagerType': 'StandardStMan',
'keywords': {'QuantumUnits': np.array(['K'], dtype='<U1')},
'_define_hypercolumn_': {},
'_private_keywords_': {}}
dminfo = {'*1': {'COLUMNS': np.array(['ANTENNA_ID', 'FEED_ID', 'INTERVAL', 'SPECTRAL_WINDOW_ID', 'TIME',