Package nom.tam.fits

Class BinaryTableHDU

    • Field Detail

      • KEY_STEMS

        private static final IFitsHeader[] KEY_STEMS
        The standard column keywords for a binary table.
    • Method Detail

      • encapsulate

        public static BinaryTable encapsulate​(java.lang.Object o)
                                       throws FitsException
        Parameters:
        o - data to encapsulate
        Returns:
        Encapsulate data in a BinaryTable data type
        Throws:
        FitsException - if the type of the data is not usable as data
      • isData

        public static boolean isData​(java.lang.Object o)
      • isHeader

        public static boolean isHeader​(Header header)
        Check that this is a valid binary table header.
        Parameters:
        header - to validate.
        Returns:
        true if this is a binary table header.
      • manufactureData

        public static BinaryTable manufactureData​(Header header)
                                           throws FitsException
        Parameters:
        header - the template specifying the binary table.
        Returns:
        a new created data from a binary table header.
        Throws:
        FitsException - if there was a problem with the header.
      • manufactureHeader

        public static Header manufactureHeader​(Data data)
                                        throws FitsException
        Parameters:
        data - the data used to build the binary table. This is typically some kind of array of objects.
        Returns:
        a newly created binary table HDU from the supplied data.
        Throws:
        FitsException - if there was a problem with the data.
      • addColumn

        public int addColumn​(java.lang.Object data)
                      throws FitsException
        Description copied from class: TableHDU
        Add a column to the table without any associated header information.
        Overrides:
        addColumn in class TableHDU<BinaryTable>
        Parameters:
        data - the new column information. the newCol should be an Object[] where type of all of the constituents is identical. The length of data should match the other columns. Note: It is valid for data to be a 2 or higher dimensionality primitive array. In this case the column index is the first (in Java speak) index of the array. E.g., if called with int[30][20][10], the number of rows in the table should be 30 and this column will have elements which are 2-d integer arrays with TDIM = (10,20).
        Returns:
        the number of columns in the adapted table
        Throws:
        FitsException - if the operation failed
      • binaryTableColumnKeyStems

        protected static IFitsHeader[] binaryTableColumnKeyStems()
      • columnKeyStems

        protected IFitsHeader[] columnKeyStems()
        What are the standard column stems for a binary table?
        Specified by:
        columnKeyStems in class TableHDU<BinaryTable>
        Returns:
        the stems of the keywords that are associated with table columns. Users can supplement this with their own and call the appropriate deleteColumns fields.
      • info

        public void info​(java.io.PrintStream stream)
        Print out some information about this HDU.
        Specified by:
        info in class BasicHDU<BinaryTable>
        Parameters:
        stream - the printstream to write the info on
      • isHeader

        public boolean isHeader()
        Check that this HDU has a valid header.
        Returns:
        true if this HDU has a valid header.
      • prtField

        private void prtField​(java.io.PrintStream stream,
                              java.lang.String type,
                              java.lang.String field)
      • setComplexColumn

        public boolean setComplexColumn​(int index)
                                 throws FitsException
        Convert a column in the table to complex. Only tables with appropriate types and dimensionalities can be converted. It is legal to call this on a column that is already complex.
        Parameters:
        index - The 0-based index of the column to be converted.
        Returns:
        Whether the column can be converted
        Throws:
        FitsException - if the header could not be adapted