public class StandardFitsTableSerializer extends 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 |
---|---|
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.
|
CardImage[] |
getHeader()
Returns header cards suitable for the HDU which will contain the table.
|
protected CardImage[] |
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(DataOutput strm)
Writes the HDU data for the table to an output stream.
|
long |
writeDataOnly(DataOutput strm)
Writes the table data content without any trailing padding.
|
public StandardFitsTableSerializer(FitsTableSerializerConfig config, StarTable table) throws IOException
config
- configurationtable
- table to serializeIOException
- if it won't be possible to write the given tablepublic FitsTableSerializerConfig getConfig()
public CardImage[] getHeader()
FitsTableSerializer
getHeader
in interface FitsTableSerializer
public void writeData(DataOutput strm) throws IOException
FitsTableSerializer
writeData
in interface FitsTableSerializer
strm
- destination streamIOException
public long writeDataOnly(DataOutput strm) throws IOException
strm
- destination streamIOException
public char getFormatChar(int icol)
FitsTableSerializer
(char)0
will be
returned.getFormatChar
in interface FitsTableSerializer
icol
- column to queryicol
,
or 0 for a column being skippedpublic int[] getDimensions(int icol)
FitsTableSerializer
null
only if that column
is not being output. Otherwise it will be a zero-element array
for a scalar, 1-element array for a vector, etc.getDimensions
in interface FitsTableSerializer
icol
- column to queryicol
or null
for a column being skippedpublic String getBadValue(int icol)
FitsTableSerializer
getBadValue
in interface FitsTableSerializer
icol
- column to querypublic long getRowCount()
FitsTableSerializer
getRowCount
in interface FitsTableSerializer
protected CardImage[] getHealpixHeaders(HealpixTableInfo hpxInfo) throws TableFormatException
hpxInfo
- non-null healpix descriptionTableFormatException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.