processing_components/visibility/msv2.py
def write(self):
            """
            Fill in the Measurement Sets file with correct order.
            """

            # Validate
            if self.nStokes == 0:
                raise RuntimeError("No polarization setups defined")
            if len(self.freq) == 0:
                raise RuntimeError("No frequency setups defined")
            if self.nant == 0:
                raise RuntimeError("No array geometry defined")
            if len(self.data) == 0:
                raise RuntimeError("No visibility data defined")

            # Sort the data set

            self.data.sort()

            # Write the tables
            self._write_main_table()
            self._write_antenna_table()
            self._write_polarization_table()
            self._write_observation_table()
            self._write_spectralwindow_table()
            self._write_misc_required_tables()

            # Fixup the info and keywords for the main table
            tb = table("%s" % self.basename, readonly=False, ack=False)
            tb.putinfo({'type': 'Measurement Set',
                        'readme': 'This is a MeasurementSet Table holding measurements from a Telescope'})
            tb.putkeyword('MS_VERSION', numpy.float32(2.0))
            for filename in sorted(glob.glob('%s/*' % self.basename)):
                if os.path.isdir(filename):
                    tname = os.path.basename(filename)
                    stb = table("%s/%s" % (self.basename, tname), ack=False)
                    tb.putkeyword(tname, stb)
                    stb.close()
            tb.flush()
            tb.close()

            # Clear out the data section
            del (self.data[:])
            gc.collect()

            Fill in the Measurement Sets file with correct order.
            
Fill in the Measurement Sets file with correct order.
Fill in the Measurement Sets file with correct order .
def write(self):
            if self.nStokes == 0:
                raise RuntimeError("No polarization setups defined")
            if len(self.freq) == 0:
                raise RuntimeError("No frequency setups defined")
            if self.nant == 0:
                raise RuntimeError("No array geometry defined")
            if len(self.data) == 0:
                raise RuntimeError("No visibility data defined")
            self.data.sort()
            self._write_main_table()
            self._write_antenna_table()
            self._write_polarization_table()
            self._write_observation_table()
            self._write_spectralwindow_table()
            self._write_misc_required_tables()
            tb = table("%s" % self.basename, readonly=False, ack=False)
            tb.putinfo({'type': 'Measurement Set',
                        'readme': 'This is a MeasurementSet Table holding measurements from a Telescope'})
            tb.putkeyword('MS_VERSION', numpy.float32(2.0))
            for filename in sorted(glob.glob('%s/*' % self.basename)):
                if os.path.isdir(filename):
                    tname = os.path.basename(filename)
                    stb = table("%s/%s" % (self.basename, tname), ack=False)
                    tb.putkeyword(tname, stb)
                    stb.close()
            tb.flush()
            tb.close()
            del (self.data[:])
            gc.collect()
def write ( self ) : if self . nStokes == 0 : raise RuntimeError ( "No polarization setups defined" ) if len ( self . freq ) == 0 : raise RuntimeError ( "No frequency setups defined" ) if self . nant == 0 : raise RuntimeError ( "No array geometry defined" ) if len ( self . data ) == 0 : raise RuntimeError ( "No visibility data defined" ) self . data . sort ( ) self . _write_main_table ( ) self . _write_antenna_table ( ) self . _write_polarization_table ( ) self . _write_observation_table ( ) self . _write_spectralwindow_table ( ) self . _write_misc_required_tables ( ) tb = table ( "%s" % self . basename , readonly = False , ack = False ) tb . putinfo ( { 'type' : 'Measurement Set' , 'readme' : 'This is a MeasurementSet Table holding measurements from a Telescope' } ) tb . putkeyword ( 'MS_VERSION' , numpy . float32 ( 2.0 ) ) for filename in sorted ( glob . glob ( '%s/*' % self . basename ) ) : if os . path . isdir ( filename ) : tname = os . path . basename ( filename ) stb = table ( "%s/%s" % ( self . basename , tname ) , ack = False ) tb . putkeyword ( tname , stb ) stb . close ( ) tb . flush ( ) tb . close ( ) del ( self . data [ : ] ) gc . collect ( )
Fill in the Measurement Sets file with correct order.
Fill in the Measurement Sets file with correct order .
"""
            Fill in the Measurement Sets file with correct order.
            """ # Validate # Sort the data set # Write the tables # Fixup the info and keywords for the main table # Clear out the data section
self