def addcols(self, desc, dminfo={}, addtoparent=True):
        """Add one or more columns.

        Columns can always be added to a normal table.
        They can also be added to a reference table and optionally to its
        parent table.

        `desc`
          contains a description of the column(s) to be added. It can be given
          in three ways:

          - a dict created by :func:`maketabdesc`. In this way multiple
            columns can be added.
          - a dict created by :func:`makescacoldesc`, :func:`makearrcoldesc`,
            or :func:`makecoldesc`. In this way a single column can be added.
          - a dict created by :func:`getcoldesc`. The key 'name' containing
            the column name has to be defined in such a dict.

        `dminfo`
          can be used to provide detailed data manager info to tell how the
          column(s) have to be stored. The dminfo of an existing column can be
          obtained using method :func:`getdminfo`.
        `addtoparent`
          defines if the column should also be added to the parent table in
          case the current table is a reference table (result of selection).
          If True, it will be added to the parent if it does not exist yet.

        For example, add a column using the same data manager type as another
        column::

          coldmi = t.getdminfo('colarrtsm')     # get dminfo of existing column
          coldmi["NAME"] = 'tsm2'               # give it a unique name
          t.addcols (maketabdesc(makearrcoldesc("colarrtsm2",0., ndim=2)),
                     coldmi)

        """
        tdesc = desc
        # Create a tabdesc if only a coldesc is given.
        if 'name' in desc:
            import casacore.tables.tableutil as pt
            if len(desc) == 2 and 'desc' in desc:
                # Given as output from makecoldesc
                tdesc = pt.maketabdesc(desc)
            elif 'valueType' in desc:
                # Given as output of getcoldesc (with a name field added)
                cd = pt.makecoldesc(desc['name'], desc)
                tdesc = pt.maketabdesc(cd)
        self._addcols(tdesc, dminfo, addtoparent)
        self._makerow()
def addcols ( self , desc , dminfo = { } , addtoparent = True ) : tdesc = desc if 'name' in desc : import casacore . tables . tableutil as pt if len ( desc ) == 2 and 'desc' in desc : tdesc = pt . maketabdesc ( desc ) elif 'valueType' in desc : cd = pt . makecoldesc ( desc [ 'name' ] , desc ) tdesc = pt . maketabdesc ( cd ) self . _addcols ( tdesc , dminfo , addtoparent ) self . _makerow ( )
Add one or more columns.

        Columns can always be added to a normal table.
        They can also be added to a reference table and optionally to its
        parent table.

        `desc`
          contains a description of the column(s) to be added. It can be given
          in three ways:

          - a dict created by :func:`maketabdesc`. In this way multiple
            columns can be added.
          - a dict created by :func:`makescacoldesc`, :func:`makearrcoldesc`,
            or :func:`makecoldesc`. In this way a single column can be added.
          - a dict created by :func:`getcoldesc`. The key 'name' containing
            the column name has to be defined in such a dict.

        `dminfo`
          can be used to provide detailed data manager info to tell how the
          column(s) have to be stored. The dminfo of an existing column can be
          obtained using method :func:`getdminfo`.
        `addtoparent`
          defines if the column should also be added to the parent table in
          case the current table is a reference table (result of selection).
          If True, it will be added to the parent if it does not exist yet.

        For example, add a column using the same data manager type as another
        column::

          coldmi = t.getdminfo('colarrtsm')     # get dminfo of existing column
          coldmi["NAME"] = 'tsm2'               # give it a unique name
          t.addcols (maketabdesc(makearrcoldesc("colarrtsm2",0., ndim=2)),
                     coldmi)