Class BinaryTableHDU
- All Implemented Interfaces:
FitsElement
- Direct Known Subclasses:
CompressedImageHDU, CompressedTableHDU
FITS binary table header/data unit
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IFitsHeader[]The standard column keywords for a binary table.Fields inherited from class BasicHDU
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT, isPrimary, myData, myHeader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAdd a column to the table without any associated header information.protected static IFitsHeader[]protected IFitsHeader[]What are the standard column stems for a binary table?static BinaryTablevoidinfo(PrintStream stream) Print out some information about this HDU.static booleanbooleanisHeader()Check that this HDU has a valid header.static booleanCheck that this is a valid binary table header.static BinaryTablemanufactureData(Header header) static HeadermanufactureHeader(Data data) private voidprtField(PrintStream stream, String type, String field) booleansetComplexColumn(int index) Convert a column in the table to complex.voidwrite(ArrayDataOutput ado) Write the contents of the element to a data sink.Methods inherited from class TableHDU
addRow, deleteColumnsIndexOne, deleteColumnsIndexOne, deleteColumnsIndexZero, deleteColumnsIndexZero, deleteRows, deleteRows, findColumn, getColumn, getColumn, getColumnFormat, getColumnMeta, getColumnName, getColumns, getElement, getNCols, getNRows, getRow, setColumn, setColumn, setColumnMeta, setColumnMeta, setColumnMeta, setColumnMeta, setColumnMeta, setColumnMeta, setColumnMeta, setColumnName, setCurrentColumn, setCurrentColumn, setElement, setRowMethods inherited from class BasicHDU
addValue, addValue, addValue, addValue, addValue, addValue, addValue, addValue, canBePrimary, card, getAuthor, getAxes, getBitPix, getBlankValue, getBScale, getBUnit, getBZero, getCreationDate, getData, getDummyHDU, getEpoch, getEquinox, getFileOffset, getGroupCount, getHeader, getInstrument, getKernel, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getTelescope, getTrimmedString, getTrimmedString, read, reset, rewrite, rewriteable, saveReplaceCard, setPrimaryHDU
-
Field Details
-
KEY_STEMS
The standard column keywords for a binary table.
-
-
Constructor Details
-
BinaryTableHDU
-
-
Method Details
-
encapsulate
- 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
-
isHeader
Check that this is a valid binary table header.- Parameters:
header- to validate.- Returns:
trueif this is a binary table header.
-
manufactureData
- 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
- 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
Description copied from class:TableHDUAdd a column to the table without any associated header information.- Overrides:
addColumnin classTableHDU<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
-
columnKeyStems
What are the standard column stems for a binary table?- Specified by:
columnKeyStemsin classTableHDU<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
Print out some information about this HDU.- Specified by:
infoin classBasicHDU<BinaryTable>- Parameters:
stream- the printstream to write the info on
-
isHeader
public boolean isHeader()Check that this HDU has a valid header.- Returns:
trueif this HDU has a valid header.
-
prtField
-
setComplexColumn
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
Description copied from interface:FitsElementWrite the contents of the element to a data sink.- Specified by:
writein interfaceFitsElement- Overrides:
writein classBasicHDU<BinaryTable>- Parameters:
ado- The data sink.- Throws:
FitsException- if the write was unsuccessful.
-