|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnom.tam.fits.BasicHDU
nom.tam.fits.ExtensionHDU
nom.tam.fits.TableHDU
nom.tam.fits.BinaryTableHDU
public class BinaryTableHDU
FITS binary table header/data unit
Field Summary |
---|
Fields inherited from class nom.tam.fits.BasicHDU |
---|
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT |
Constructor Summary | |
---|---|
BinaryTableHDU()
Build an empty binary table HDU. |
|
BinaryTableHDU(Header header)
Create a binary table header/data unit. |
|
BinaryTableHDU(java.lang.Object[][] table)
Build a binary table HDU from the supplied data. |
Method Summary | |
---|---|
void |
addColumn(Column col)
Add a column to tabular data. |
void |
addColumn(java.lang.Object[] data)
Add a column without any associated header information. |
int |
findColumn(java.lang.String name)
Find the column which has the given name (i.e., TTYPE) |
Column |
getColumn(int colNumber)
Get the header and data associated with the given column. |
Column |
getColumn(java.lang.String name)
Get the header and data information for a given column. |
java.lang.String |
getColumnFITSType(int index)
Get the FITS type of a column in the table. |
java.lang.String |
getColumnName(int index)
Get the name of a column in the table. |
int |
getNumColumns()
Get the number of columns for this table |
int |
getNumRows()
Get the number of rows for this table |
java.lang.Object |
getVarData(int col)
Return a variable column. |
java.lang.Object |
getVarData(java.lang.String name)
Return a variable column. |
void |
info()
Print out some information about this HDU. |
boolean |
isHeader()
Check that this HDU has a valid header. |
static boolean |
isHeader(Header header)
Check that this is a valid binary table header. |
Column |
makeVarColumn(java.lang.Object[] data)
Create a variable column from the supplied data. |
Column |
makeVarColumn(java.lang.Object[] data,
java.lang.String type)
Create a variable column from the supplied data. |
Column |
makeVarColumn(java.lang.Object[] data,
java.lang.String type,
java.lang.String[] keys)
Create a variable column from the supplied data. |
Data |
manufactureData()
Create a Data object to correspond to the header description. |
protected void |
setColumnStrings()
Set the default base keys which are expected to be associated with a binary table. |
Methods inherited from class nom.tam.fits.TableHDU |
---|
addColumnString |
Methods inherited from class nom.tam.fits.ExtensionHDU |
---|
getExtensionLevel, getExtensionName, getExtensionType, getExtensionVersion |
Methods inherited from class nom.tam.fits.BasicHDU |
---|
getAuthor, getAxes, getBitPix, getBlankValue, getBScale, getBUnit, getBZero, getCreationDate, getData, getEpoch, getEquinox, getGroupCount, getHeader, getInstrument, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getTelescope, getTrimmedString, readData, skipData, skipData, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryTableHDU(Header header) throws FitsException
header
- the template specifying the binary table.
FitsException
- if there was a problem with the header.public BinaryTableHDU(java.lang.Object[][] table) throws FitsException
table
- the array used to build the binary table.
FitsException
- if there was a problem with the data.public BinaryTableHDU() throws FitsException
FitsException
- if there was a problem building the empty HDU.Method Detail |
---|
public static boolean isHeader(Header header)
header
- to validate.
true
if this is a binary table header.public boolean isHeader()
true
if this HDU has a valid header.protected void setColumnStrings()
public void addColumn(java.lang.Object[] data) throws FitsException
data
- The column data to be added. Data 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).
FitsException
- the column could not be added.public int findColumn(java.lang.String name)
name
- The desired name.
public Column getColumn(java.lang.String name) throws FitsException
name
- The name (TTYPE) of column desired.
FitsException
- if colNumber
could not be deleted.public Column getColumn(int colNumber) throws FitsException
colNumber
- The Fits (first=1) index of the desired column.
FitsException
- if colNumber
could not be found.public void addColumn(Column col) throws FitsException
col
- The column to be added. It should have the same
dimension as all of the other columns.
FitsException
- if col
could not be added.public Column makeVarColumn(java.lang.Object[] data) throws FitsException
data
- The column of data to be added. It should have the same
dimension as all of the other columns.
FitsException
- if column could not be added.public Column makeVarColumn(java.lang.Object[] data, java.lang.String type) throws FitsException
data
- The column of data to be added. It should have the same
dimension as all of the other columns.type
- The Fits type for this column (S, L, B, etc.)
FitsException
- if column could not be added.public Column makeVarColumn(java.lang.Object[] data, java.lang.String type, java.lang.String[] keys) throws FitsException
data
- The column of data to be added. It should have the same
dimension as all of the other columns.type
- The Fits type for this column (S, L, B, etc.)keys
- The list of keys for this column (may be null).
FitsException
- if column could not be added.public java.lang.Object getVarData(java.lang.String name) throws FitsException
name
- The name of the column to fetch.
name
was not found, or an
array of data (as an Object).
FitsException
- if the column could not be found or returned.public java.lang.Object getVarData(int col) throws FitsException
col
- The column number to fetch.
FitsException
- if col
was not a valid column
number, was not a variable column, or had
an invalid Fits type.public Data manufactureData() throws FitsException
FitsException
- if the binary table could not be created.public int getNumColumns()
public int getNumRows()
public java.lang.String getColumnName(int index) throws FitsException
FitsException
- if an invalid index was requested.public java.lang.String getColumnFITSType(int index) throws FitsException
FitsException
- if an invalid index was requested.public void info()
info
in class BasicHDU
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |