public class FitsStarTable extends RandomStarTable
This implementation uses the table handling in the nom.tam.fits package. I think that performance could be considerably improved by rewriting the table access from scratch. The reason for this is largely that the nom.tam.fits classes do a lot of wrapping of values in (perhaps multi-dimensional) arrays, which is not for our purposes necessary. Such a re-implementation would take a bit of effort unfortunately.
This class should only be used for TABLE extension (that is ASCII table)
HDUs.
The BintableStarTable
class is much more efficient for BINTTABLE
extensions (binary table) HDUs.
Constructor and Description |
---|
FitsStarTable(nom.tam.fits.TableHDU thdu)
Constructs a FitsStarTable object from a FITS TableHDU object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCell(long lrow,
int icol)
The AbstractStarTable implementation of this method throws an
UnsupportedOperationException, since unless otherwise
provided there is no random access.
|
java.util.List<ValueInfo> |
getColumnAuxDataInfos()
Goes through the table columns (ColumnInfo objects)
and picks out all the AuxData items which exist, generalising
where necessary and returning a union of them in
alphabetical order by name.
|
int |
getColumnCount()
Returns the number of columns in this table.
|
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column.
|
java.lang.Object[] |
getRow(long lrow)
The AbstractStarTable implementation of this method
constructs a row by repeated invocation of
AbstractStarTable.getCell(long, int) . |
long |
getRowCount()
The number of rows in this table.
|
getRowSequence, isRandom
checkedLongToInt, getName, getParameterByName, getParameters, getURL, setName, setParameter, setParameters, setURL
public FitsStarTable(nom.tam.fits.TableHDU thdu) throws java.io.IOException
thdu
- a TableHDU object containing datajava.io.IOException
public long getRowCount()
RandomStarTable
getRowCount
in interface StarTable
getRowCount
in class RandomStarTable
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class AbstractStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class AbstractStarTable
icol
- the column for which header information is requiredpublic java.util.List<ValueInfo> getColumnAuxDataInfos()
AbstractStarTable
getColumnAuxDataInfos
in interface StarTable
getColumnAuxDataInfos
in class AbstractStarTable
ColumnInfo.getAuxData()
public java.lang.Object getCell(long lrow, int icol) throws java.io.IOException
AbstractStarTable
getCell
in interface StarTable
getCell
in class AbstractStarTable
lrow
- the index of the cell's rowicol
- the index of the cell's columnjava.io.IOException
- if there is an error reading the datapublic java.lang.Object[] getRow(long lrow) throws java.io.IOException
AbstractStarTable
AbstractStarTable.getCell(long, int)
.getRow
in interface StarTable
getRow
in class AbstractStarTable
lrow
- the index of the row to retrievejava.io.IOException
- if there is an error reading the data