def get_rec_column_descr(self, colnum, vstorage):
        """
        Get a descriptor entry for the specified column.

        parameters
        ----------
        colnum: integer
            The column number, 0 offset
        vstorage: string
            See docs in read_columns
        """
        npy_type, isvar, istbit = self._get_tbl_numpy_dtype(colnum)
        name = self._info['colinfo'][colnum]['name']

        if isvar:
            if vstorage == 'object':
                descr = (name, 'O')
            else:
                tform = self._info['colinfo'][colnum]['tform']
                max_size = _extract_vararray_max(tform)

                if max_size <= 0:
                    name = self._info['colinfo'][colnum]['name']
                    mess = 'Will read as an object field'
                    if max_size < 0:
                        mess = "Column '%s': No maximum size: '%s'. %s"
                        mess = mess % (name, tform, mess)
                        warnings.warn(mess, FITSRuntimeWarning)
                    else:
                        mess = "Column '%s': Max size is zero: '%s'. %s"
                        mess = mess % (name, tform, mess)
                        warnings.warn(mess, FITSRuntimeWarning)

                    # we are forced to read this as an object array
                    return self.get_rec_column_descr(colnum, 'object')

                if npy_type[0] == 'S':
                    # variable length string columns cannot
                    # themselves be arrays I don't think
                    npy_type = 'S%d' % max_size
                    descr = (name, npy_type)
                elif npy_type[0] == 'U':
                    # variable length string columns cannot
                    # themselves be arrays I don't think
                    npy_type = 'U%d' % max_size
                    descr = (name, npy_type)
                else:
                    descr = (name, npy_type, max_size)
        else:
            tdim = self._info['colinfo'][colnum]['tdim']
            shape = _tdim2shape(
                tdim, name,
                is_string=(npy_type[0] == 'S' or npy_type[0] == 'U'))
            if shape is not None:
                descr = (name, npy_type, shape)
            else:
                descr = (name, npy_type)
        return descr, isvar
def get_rec_column_descr ( self , colnum , vstorage ) : npy_type , isvar , istbit = self . _get_tbl_numpy_dtype ( colnum ) name = self . _info [ 'colinfo' ] [ colnum ] [ 'name' ] if isvar : if vstorage == 'object' : descr = ( name , 'O' ) else : tform = self . _info [ 'colinfo' ] [ colnum ] [ 'tform' ] max_size = _extract_vararray_max ( tform ) if max_size <= 0 : name = self . _info [ 'colinfo' ] [ colnum ] [ 'name' ] mess = 'Will read as an object field' if max_size < 0 : mess = "Column '%s': No maximum size: '%s'. %s" mess = mess % ( name , tform , mess ) warnings . warn ( mess , FITSRuntimeWarning ) else : mess = "Column '%s': Max size is zero: '%s'. %s" mess = mess % ( name , tform , mess ) warnings . warn ( mess , FITSRuntimeWarning ) return self . get_rec_column_descr ( colnum , 'object' ) if npy_type [ 0 ] == 'S' : npy_type = 'S%d' % max_size descr = ( name , npy_type ) elif npy_type [ 0 ] == 'U' : npy_type = 'U%d' % max_size descr = ( name , npy_type ) else : descr = ( name , npy_type , max_size ) else : tdim = self . _info [ 'colinfo' ] [ colnum ] [ 'tdim' ] shape = _tdim2shape ( tdim , name , is_string = ( npy_type [ 0 ] == 'S' or npy_type [ 0 ] == 'U' ) ) if shape is not None : descr = ( name , npy_type , shape ) else : descr = ( name , npy_type ) return descr , isvar
Get a descriptor entry for the specified column.

        parameters
        ----------
        colnum: integer
            The column number, 0 offset
        vstorage: string
            See docs in read_columns