public class AsciiTableHDU extends TableHDU<AsciiTable>
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT, isPrimary, myData, myHeader
Constructor and Description |
---|
AsciiTableHDU(Header h,
AsciiTable d)
Create an ASCII table header/data unit.
|
Modifier and Type | Method and Description |
---|---|
int |
addColumn(Object newCol)
Add a column to the table without any associated header information.
|
protected IFitsHeader[] |
columnKeyStems() |
static AsciiTable |
encapsulate(Object o) |
void |
info(PrintStream stream)
Print out some information about this HDU.
|
static boolean |
isData(Object o) |
static boolean |
isHeader(Header header)
Check that this is a valid ascii table header.
|
boolean |
isNull(int row,
int col) |
static Data |
manufactureData(Header hdr)
Create a Data object to correspond to the header description.
|
static Header |
manufactureHeader(Data d) |
void |
setNull(int row,
int col,
boolean flag)
Mark an entry as null.
|
void |
setNullString(int col,
String newNull)
Set the null string for a column.
|
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, setColumnName, setCurrentColumn, setCurrentColumn, setElement, setRow
addValue, addValue, addValue, addValue, addValue, addValue, addValue, addValue, 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, write
public AsciiTableHDU(Header h, AsciiTable d)
h
- the template specifying the ASCII table.d
- the FITS data structure containing the table data.public static AsciiTable encapsulate(Object o) throws FitsException
o
- the array of object to create the ASCII tableFitsException
- if the table could not be created.public static boolean isData(Object o)
o
- object representing the datapublic static boolean isHeader(Header header)
header
- to validate.true
if this is an ascii table header.public static Data manufactureData(Header hdr) throws FitsException
hdr
- the header to create the data forFitsException
- if the Data object could not be created from this HDU's
Headerpublic static Header manufactureHeader(Data d) throws FitsException
d
- data to create a header forFitsException
- if the header could not b e createdpublic int addColumn(Object newCol) throws FitsException
TableHDU
addColumn
in class TableHDU<AsciiTable>
newCol
- 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).FitsException
- if the operation failedprotected IFitsHeader[] columnKeyStems()
columnKeyStems
in class TableHDU<AsciiTable>
public void info(PrintStream stream)
BasicHDU
info
in class BasicHDU<AsciiTable>
stream
- the printstream to write the info onpublic boolean isNull(int row, int col)
row
- row index of the elementcol
- column index of the elementtrue
if an element is nullpublic void setNull(int row, int col, boolean flag)
row
- row index of the elementcol
- column index of the elementflag
- set to null or notpublic void setNullString(int col, String newNull)
col
- the column indexnewNull
- the String representing nullCopyright © 1996–2016 nom-tam-fits. All rights reserved.