public class StandardFitsTableSerializer extends java.lang.Object implements FitsTableSerializer
When writing tables that are marked up using the headers defined in
HealpixTableInfo
,
this serializer will attempt to insert FITS headers corresponding
to the HEALPix-FITS convention.
Constructor and Description |
---|
StandardFitsTableSerializer(FitsTableSerializerConfig config,
StarTable table)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBadValue(int icol)
Returns the bad value (text of the TNULLnn card), if any, used
for a given column.
|
FitsTableSerializerConfig |
getConfig()
Returns the configuration information for this serializer.
|
int[] |
getDimensions(int icol)
Returns the dimensions of the items which will be output for a
given column.
|
char |
getFormatChar(int icol)
Returns the FITS TFORM letter which describes the type of data
output for a given column.
|
nom.tam.fits.Header |
getHeader()
Returns a header suitable for the HDU which will contain the table.
|
protected nom.tam.fits.HeaderCard[] |
getHealpixHeaders(HealpixTableInfo hpxInfo)
Returns FITS headers specific for a table containing a HEALPix map.
|
long |
getRowCount()
Returns the number of rows which will be output.
|
void |
writeData(java.io.DataOutput strm)
Writes the HDU data for the table to an output stream.
|
long |
writeDataOnly(java.io.DataOutput strm)
Writes the table data content without any trailing padding.
|
public StandardFitsTableSerializer(FitsTableSerializerConfig config, StarTable table) throws java.io.IOException
config
- configurationtable
- table to serializejava.io.IOException
- if it won't be possible to write the given tablepublic FitsTableSerializerConfig getConfig()
public nom.tam.fits.Header getHeader() throws nom.tam.fits.HeaderCardException
FitsTableSerializer
getHeader
in interface FitsTableSerializer
nom.tam.fits.HeaderCardException
public void writeData(java.io.DataOutput strm) throws java.io.IOException
FitsTableSerializer
writeData
in interface FitsTableSerializer
strm
- destination streamjava.io.IOException
public long writeDataOnly(java.io.DataOutput strm) throws java.io.IOException
strm
- destination streamjava.io.IOException
public char getFormatChar(int icol)
FitsTableSerializer
getFormatChar
in interface FitsTableSerializer
icol
- column to querypublic int[] getDimensions(int icol)
FitsTableSerializer
getDimensions
in interface FitsTableSerializer
icol
- column to querypublic java.lang.String getBadValue(int icol)
FitsTableSerializer
getBadValue
in interface FitsTableSerializer
icol
- column to querypublic long getRowCount()
FitsTableSerializer
getRowCount
in interface FitsTableSerializer
protected nom.tam.fits.HeaderCard[] getHealpixHeaders(HealpixTableInfo hpxInfo) throws TableFormatException, nom.tam.fits.HeaderCardException
hpxInfo
- non-null healpix descriptionTableFormatException
- if HEALPix headers could not be generatednom.tam.fits.HeaderCardException