processing_components/visibility/msv2.py
def _write_misc_required_tables(self):
            """
            Write the other tables that are part of the measurement set but
            don't contain anything by default.
            """

            # Flag command

            col1 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Midpoint of interval for which this flag is valid',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col2 = tableutil.makescacoldesc('INTERVAL', 0.0,
                                            comment='Time interval for which this flag is valid',
                                            keywords={'QuantumUnits': ['s', ]})
            col3 = tableutil.makescacoldesc('TYPE', 'flag',
                                            comment='Type of flag (FLAG or UNFLAG)')
            col4 = tableutil.makescacoldesc('REASON', 'reason',
                                            comment='Flag reason')
            col5 = tableutil.makescacoldesc('LEVEL', 0,
                                            comment='Flag level - revision level')
            col6 = tableutil.makescacoldesc('SEVERITY', 0,
                                            comment='Severity code (0-10)')
            col7 = tableutil.makescacoldesc('APPLIED', False,
                                            comment='True if flag has been applied to main table')
            col8 = tableutil.makescacoldesc('COMMAND', 'command',
                                            comment='Flagging command')

            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8])
            tb = table("%s/FLAG_CMD" % self.basename, desc, nrow=0, ack=False)

            tb.flush()
            tb.close()

            # History

            col1 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Timestamp of message',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col2 = tableutil.makescacoldesc('OBSERVATION_ID', 0,
                                            comment='Observation id (index in OBSERVATION table)')
            col3 = tableutil.makescacoldesc('MESSAGE', 'message',
                                            comment='Log message')
            col4 = tableutil.makescacoldesc('PRIORITY', 'NORMAL',
                                            comment='Message priority')
            col5 = tableutil.makescacoldesc('ORIGIN', 'origin',
                                            comment='(Source code) origin from which message originated')
            col6 = tableutil.makescacoldesc('OBJECT_ID', 0,
                                            comment='Originating ObjectID')
            col7 = tableutil.makescacoldesc('APPLICATION', 'application',
                                            comment='Application name')
            col8 = tableutil.makearrcoldesc('CLI_COMMAND', 'command', 1,
                                            comment='CLI command sequence')
            col9 = tableutil.makearrcoldesc('APP_PARAMS', 'params', 1,
                                            comment='Application parameters')

            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8, col9])
            tb = table("%s/HISTORY" % self.basename, desc, nrow=0, ack=False)

            tb.flush()
            tb.close()

            # POINTING

            col1 = tableutil.makescacoldesc('ANTENNA_ID', 0,
                                            comment='Antenna Id')
            col2 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Time interval midpoint',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col3 = tableutil.makescacoldesc('INTERVAL', 0.0,
                                            comment='Time interval',
                                            keywords={'QuantumUnits': ['s', ]})
            col4 = tableutil.makescacoldesc('NAME', 'name',
                                            comment='Pointing position name')
            col5 = tableutil.makescacoldesc('NUM_POLY', 0,
                                            comment='Series order')
            col6 = tableutil.makescacoldesc('TIME_ORIGIN', 0.0,
                                            comment='Time origin for direction',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col7 = tableutil.makearrcoldesc('DIRECTION', 0.0, 2,
                                            comment='Antenna pointing direction as polynomial in time',
                                            keywords={'QuantumUnits': ['rad', 'rad'],
                                                      'MEASINFO': {'type': 'direction', 'Ref': 'J2000'}
                                                      })
            col8 = tableutil.makearrcoldesc('TARGET', 0.0, 2,
                                            comment='target direction as polynomial in time',
                                            keywords={'QuantumUnits': ['rad', 'rad'],
                                                      'MEASINFO': {'type': 'direction', 'Ref': 'J2000'}
                                                      })
            col9 = tableutil.makescacoldesc('TRACKING', True,
                                            comment='Tracking flag - True if on position')

            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8, col9])
            tb = table("%s/POINTING" % self.basename, desc, nrow=0, ack=False)

            tb.flush()
            tb.close()

            # Processor

            col1 = tableutil.makescacoldesc('TYPE', 'type',
                                            comment='Processor type')
            col2 = tableutil.makescacoldesc('SUB_TYPE', 'subtype',
                                            comment='Processor sub type')
            col3 = tableutil.makescacoldesc('TYPE_ID', 0,
                                            comment='Processor type id')
            col4 = tableutil.makescacoldesc('MODE_ID', 0,
                                            comment='Processor mode id')
            col5 = tableutil.makescacoldesc('FLAG_ROW', False,
                                            comment='flag')

            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5])
            tb = table("%s/PROCESSOR" % self.basename, desc, nrow=0, ack=False)

            tb.flush()
            tb.close()

            # State

            col1 = tableutil.makescacoldesc('SIG', True,
                                            comment='True for a source observation')
            col2 = tableutil.makescacoldesc('REF', False,
                                            comment='True for a reference observation')
            col3 = tableutil.makescacoldesc('CAL', 0.0,
                                            comment='Noise calibration temperature',
                                            keywords={'QuantumUnits': ['K', ]})
            col4 = tableutil.makescacoldesc('LOAD', 0.0,
                                            comment='Load temperature',
                                            keywords={'QuantumUnits': ['K', ]})
            col5 = tableutil.makescacoldesc('SUB_SCAN', 0,
                                            comment='Sub scan number, relative to scan number')
            col6 = tableutil.makescacoldesc('OBS_MODE', 'mode',
                                            comment='Observing mode, e.g., OFF_SPECTRUM')
            col7 = tableutil.makescacoldesc('FLAG_ROW', False,
                                            comment='Row flag')

            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7])
            tb = table("%s/STATE" % self.basename, desc, nrow=0, ack=False)

            tb.flush()
            tb.close()

            Write the other tables that are part of the measurement set but
            don't contain anything by default.
            
Write the other tables that are part of the measurement set but
don't contain anything by default.
Write the other tables that are part of the measurement set but don ' t contain anything by default .
def _write_misc_required_tables(self):
            col1 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Midpoint of interval for which this flag is valid',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col2 = tableutil.makescacoldesc('INTERVAL', 0.0,
                                            comment='Time interval for which this flag is valid',
                                            keywords={'QuantumUnits': ['s', ]})
            col3 = tableutil.makescacoldesc('TYPE', 'flag',
                                            comment='Type of flag (FLAG or UNFLAG)')
            col4 = tableutil.makescacoldesc('REASON', 'reason',
                                            comment='Flag reason')
            col5 = tableutil.makescacoldesc('LEVEL', 0,
                                            comment='Flag level - revision level')
            col6 = tableutil.makescacoldesc('SEVERITY', 0,
                                            comment='Severity code (0-10)')
            col7 = tableutil.makescacoldesc('APPLIED', False,
                                            comment='True if flag has been applied to main table')
            col8 = tableutil.makescacoldesc('COMMAND', 'command',
                                            comment='Flagging command')
            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8])
            tb = table("%s/FLAG_CMD" % self.basename, desc, nrow=0, ack=False)
            tb.flush()
            tb.close()
            col1 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Timestamp of message',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col2 = tableutil.makescacoldesc('OBSERVATION_ID', 0,
                                            comment='Observation id (index in OBSERVATION table)')
            col3 = tableutil.makescacoldesc('MESSAGE', 'message',
                                            comment='Log message')
            col4 = tableutil.makescacoldesc('PRIORITY', 'NORMAL',
                                            comment='Message priority')
            col5 = tableutil.makescacoldesc('ORIGIN', 'origin',
                                            comment='(Source code) origin from which message originated')
            col6 = tableutil.makescacoldesc('OBJECT_ID', 0,
                                            comment='Originating ObjectID')
            col7 = tableutil.makescacoldesc('APPLICATION', 'application',
                                            comment='Application name')
            col8 = tableutil.makearrcoldesc('CLI_COMMAND', 'command', 1,
                                            comment='CLI command sequence')
            col9 = tableutil.makearrcoldesc('APP_PARAMS', 'params', 1,
                                            comment='Application parameters')
            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8, col9])
            tb = table("%s/HISTORY" % self.basename, desc, nrow=0, ack=False)
            tb.flush()
            tb.close()
            col1 = tableutil.makescacoldesc('ANTENNA_ID', 0,
                                            comment='Antenna Id')
            col2 = tableutil.makescacoldesc('TIME', 0.0,
                                            comment='Time interval midpoint',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col3 = tableutil.makescacoldesc('INTERVAL', 0.0,
                                            comment='Time interval',
                                            keywords={'QuantumUnits': ['s', ]})
            col4 = tableutil.makescacoldesc('NAME', 'name',
                                            comment='Pointing position name')
            col5 = tableutil.makescacoldesc('NUM_POLY', 0,
                                            comment='Series order')
            col6 = tableutil.makescacoldesc('TIME_ORIGIN', 0.0,
                                            comment='Time origin for direction',
                                            keywords={'QuantumUnits': ['s', ],
                                                      'MEASINFO': {'type': 'epoch', 'Ref': 'UTC'}
                                                      })
            col7 = tableutil.makearrcoldesc('DIRECTION', 0.0, 2,
                                            comment='Antenna pointing direction as polynomial in time',
                                            keywords={'QuantumUnits': ['rad', 'rad'],
                                                      'MEASINFO': {'type': 'direction', 'Ref': 'J2000'}
                                                      })
            col8 = tableutil.makearrcoldesc('TARGET', 0.0, 2,
                                            comment='target direction as polynomial in time',
                                            keywords={'QuantumUnits': ['rad', 'rad'],
                                                      'MEASINFO': {'type': 'direction', 'Ref': 'J2000'}
                                                      })
            col9 = tableutil.makescacoldesc('TRACKING', True,
                                            comment='Tracking flag - True if on position')
            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7, col8, col9])
            tb = table("%s/POINTING" % self.basename, desc, nrow=0, ack=False)
            tb.flush()
            tb.close()
            col1 = tableutil.makescacoldesc('TYPE', 'type',
                                            comment='Processor type')
            col2 = tableutil.makescacoldesc('SUB_TYPE', 'subtype',
                                            comment='Processor sub type')
            col3 = tableutil.makescacoldesc('TYPE_ID', 0,
                                            comment='Processor type id')
            col4 = tableutil.makescacoldesc('MODE_ID', 0,
                                            comment='Processor mode id')
            col5 = tableutil.makescacoldesc('FLAG_ROW', False,
                                            comment='flag')
            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5])
            tb = table("%s/PROCESSOR" % self.basename, desc, nrow=0, ack=False)
            tb.flush()
            tb.close()
            col1 = tableutil.makescacoldesc('SIG', True,
                                            comment='True for a source observation')
            col2 = tableutil.makescacoldesc('REF', False,
                                            comment='True for a reference observation')
            col3 = tableutil.makescacoldesc('CAL', 0.0,
                                            comment='Noise calibration temperature',
                                            keywords={'QuantumUnits': ['K', ]})
            col4 = tableutil.makescacoldesc('LOAD', 0.0,
                                            comment='Load temperature',
                                            keywords={'QuantumUnits': ['K', ]})
            col5 = tableutil.makescacoldesc('SUB_SCAN', 0,
                                            comment='Sub scan number, relative to scan number')
            col6 = tableutil.makescacoldesc('OBS_MODE', 'mode',
                                            comment='Observing mode, e.g., OFF_SPECTRUM')
            col7 = tableutil.makescacoldesc('FLAG_ROW', False,
                                            comment='Row flag')
            desc = tableutil.maketabdesc([col1, col2, col3, col4, col5, col6, col7])
            tb = table("%s/STATE" % self.basename, desc, nrow=0, ack=False)
            tb.flush()
            tb.close()
def _write_misc_required_tables ( self ) : col1 = tableutil . makescacoldesc ( 'TIME' , 0.0 , comment = 'Midpoint of interval for which this flag is valid' , keywords = { 'QuantumUnits' : [ 's' , ] , 'MEASINFO' : { 'type' : 'epoch' , 'Ref' : 'UTC' } } ) col2 = tableutil . makescacoldesc ( 'INTERVAL' , 0.0 , comment = 'Time interval for which this flag is valid' , keywords = { 'QuantumUnits' : [ 's' , ] } ) col3 = tableutil . makescacoldesc ( 'TYPE' , 'flag' , comment = 'Type of flag (FLAG or UNFLAG)' ) col4 = tableutil . makescacoldesc ( 'REASON' , 'reason' , comment = 'Flag reason' ) col5 = tableutil . makescacoldesc ( 'LEVEL' , 0 , comment = 'Flag level - revision level' ) col6 = tableutil . makescacoldesc ( 'SEVERITY' , 0 , comment = 'Severity code (0-10)' ) col7 = tableutil . makescacoldesc ( 'APPLIED' , False , comment = 'True if flag has been applied to main table' ) col8 = tableutil . makescacoldesc ( 'COMMAND' , 'command' , comment = 'Flagging command' ) desc = tableutil . maketabdesc ( [ col1 , col2 , col3 , col4 , col5 , col6 , col7 , col8 ] ) tb = table ( "%s/FLAG_CMD" % self . basename , desc , nrow = 0 , ack = False ) tb . flush ( ) tb . close ( ) col1 = tableutil . makescacoldesc ( 'TIME' , 0.0 , comment = 'Timestamp of message' , keywords = { 'QuantumUnits' : [ 's' , ] , 'MEASINFO' : { 'type' : 'epoch' , 'Ref' : 'UTC' } } ) col2 = tableutil . makescacoldesc ( 'OBSERVATION_ID' , 0 , comment = 'Observation id (index in OBSERVATION table)' ) col3 = tableutil . makescacoldesc ( 'MESSAGE' , 'message' , comment = 'Log message' ) col4 = tableutil . makescacoldesc ( 'PRIORITY' , 'NORMAL' , comment = 'Message priority' ) col5 = tableutil . makescacoldesc ( 'ORIGIN' , 'origin' , comment = '(Source code) origin from which message originated' ) col6 = tableutil . makescacoldesc ( 'OBJECT_ID' , 0 , comment = 'Originating ObjectID' ) col7 = tableutil . makescacoldesc ( 'APPLICATION' , 'application' , comment = 'Application name' ) col8 = tableutil . makearrcoldesc ( 'CLI_COMMAND' , 'command' , 1 , comment = 'CLI command sequence' ) col9 = tableutil . makearrcoldesc ( 'APP_PARAMS' , 'params' , 1 , comment = 'Application parameters' ) desc = tableutil . maketabdesc ( [ col1 , col2 , col3 , col4 , col5 , col6 , col7 , col8 , col9 ] ) tb = table ( "%s/HISTORY" % self . basename , desc , nrow = 0 , ack = False ) tb . flush ( ) tb . close ( ) col1 = tableutil . makescacoldesc ( 'ANTENNA_ID' , 0 , comment = 'Antenna Id' ) col2 = tableutil . makescacoldesc ( 'TIME' , 0.0 , comment = 'Time interval midpoint' , keywords = { 'QuantumUnits' : [ 's' , ] , 'MEASINFO' : { 'type' : 'epoch' , 'Ref' : 'UTC' } } ) col3 = tableutil . makescacoldesc ( 'INTERVAL' , 0.0 , comment = 'Time interval' , keywords = { 'QuantumUnits' : [ 's' , ] } ) col4 = tableutil . makescacoldesc ( 'NAME' , 'name' , comment = 'Pointing position name' ) col5 = tableutil . makescacoldesc ( 'NUM_POLY' , 0 , comment = 'Series order' ) col6 = tableutil . makescacoldesc ( 'TIME_ORIGIN' , 0.0 , comment = 'Time origin for direction' , keywords = { 'QuantumUnits' : [ 's' , ] , 'MEASINFO' : { 'type' : 'epoch' , 'Ref' : 'UTC' } } ) col7 = tableutil . makearrcoldesc ( 'DIRECTION' , 0.0 , 2 , comment = 'Antenna pointing direction as polynomial in time' , keywords = { 'QuantumUnits' : [ 'rad' , 'rad' ] , 'MEASINFO' : { 'type' : 'direction' , 'Ref' : 'J2000' } } ) col8 = tableutil . makearrcoldesc ( 'TARGET' , 0.0 , 2 , comment = 'target direction as polynomial in time' , keywords = { 'QuantumUnits' : [ 'rad' , 'rad' ] , 'MEASINFO' : { 'type' : 'direction' , 'Ref' : 'J2000' } } ) col9 = tableutil . makescacoldesc ( 'TRACKING' , True , comment = 'Tracking flag - True if on position' ) desc = tableutil . maketabdesc ( [ col1 , col2 , col3 , col4 , col5 , col6 , col7 , col8 , col9 ] ) tb = table ( "%s/POINTING" % self . basename , desc , nrow = 0 , ack = False ) tb . flush ( ) tb . close ( ) col1 = tableutil . makescacoldesc ( 'TYPE' , 'type' , comment = 'Processor type' ) col2 = tableutil . makescacoldesc ( 'SUB_TYPE' , 'subtype' , comment = 'Processor sub type' ) col3 = tableutil . makescacoldesc ( 'TYPE_ID' , 0 , comment = 'Processor type id' ) col4 = tableutil . makescacoldesc ( 'MODE_ID' , 0 , comment = 'Processor mode id' ) col5 = tableutil . makescacoldesc ( 'FLAG_ROW' , False , comment = 'flag' ) desc = tableutil . maketabdesc ( [ col1 , col2 , col3 , col4 , col5 ] ) tb = table ( "%s/PROCESSOR" % self . basename , desc , nrow = 0 , ack = False ) tb . flush ( ) tb . close ( ) col1 = tableutil . makescacoldesc ( 'SIG' , True , comment = 'True for a source observation' ) col2 = tableutil . makescacoldesc ( 'REF' , False , comment = 'True for a reference observation' ) col3 = tableutil . makescacoldesc ( 'CAL' , 0.0 , comment = 'Noise calibration temperature' , keywords = { 'QuantumUnits' : [ 'K' , ] } ) col4 = tableutil . makescacoldesc ( 'LOAD' , 0.0 , comment = 'Load temperature' , keywords = { 'QuantumUnits' : [ 'K' , ] } ) col5 = tableutil . makescacoldesc ( 'SUB_SCAN' , 0 , comment = 'Sub scan number, relative to scan number' ) col6 = tableutil . makescacoldesc ( 'OBS_MODE' , 'mode' , comment = 'Observing mode, e.g., OFF_SPECTRUM' ) col7 = tableutil . makescacoldesc ( 'FLAG_ROW' , False , comment = 'Row flag' ) desc = tableutil . maketabdesc ( [ col1 , col2 , col3 , col4 , col5 , col6 , col7 ] ) tb = table ( "%s/STATE" % self . basename , desc , nrow = 0 , ack = False ) tb . flush ( ) tb . close ( )
Write the other tables that are part of the measurement set but
don't contain anything by default.
Write the other tables that are part of the measurement set but don ' t contain anything by default .
"""
            Write the other tables that are part of the measurement set but
            don't contain anything by default.
            """ # Flag command # History # POINTING # Processor # State
self