Package nom.tam.fits

Class BinaryTableHDU

All Implemented Interfaces:
FitsElement
Direct Known Subclasses:
CompressedImageHDU, CompressedTableHDU

public class BinaryTableHDU extends TableHDU<BinaryTable>
FITS binary table header/data unit
  • Constructor Details

  • Method Details

    • encapsulate

      public static BinaryTable encapsulate(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(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(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(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.
    • 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
    • write

      public void write(ArrayDataOutput ado) throws FitsException
      Description copied from interface: FitsElement
      Write the contents of the element to a data sink.
      Specified by:
      write in interface FitsElement
      Overrides:
      write in class BasicHDU<BinaryTable>
      Parameters:
      ado - The data sink.
      Throws:
      FitsException - if the write was unsuccessful.