Package uk.ac.starlink.fits
Class HealpixFitsTableWriter
java.lang.Object
uk.ac.starlink.table.StreamStarTableWriter
uk.ac.starlink.fits.AbstractFitsTableWriter
uk.ac.starlink.fits.HealpixFitsTableWriter
- All Implemented Interfaces:
uk.ac.starlink.table.MultiStarTableWriter
,uk.ac.starlink.table.StarTableWriter
TableWriter implementation that writes FITS files using the HEALPix-FITS
convention. This convention is somewhat standard for encoding
HEALPix maps in FITS files.
It is not always necessary to use this output handler, since the normal FitsTableWriter also inserts the relevant HEALPix-FITS headers if it encounters a table that looks like a HEALPix map. However, this implementation differs in a couple of ways: if it is presented with a table that does not look like a HEALPix map, it will throw a TableFormatException rather than just performing non-HEALPix output, and it will rearrange the columns so that the healpix index is in the first column and named "PIXEL" if required.
- Since:
- 6 Dec 2018
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FitsTableSerializer
createSerializer
(uk.ac.starlink.table.StarTable table) Returns a StandardFitsTableSerializer only if the table looks like a HEALpix map.boolean
looksLikeFile
(String location) Returns false.Methods inherited from class uk.ac.starlink.fits.AbstractFitsTableWriter
getAllowSignedByte, getAllowZeroLengthString, getConfig, getCurrentDate, getFormatName, getMetadataCards, getMimeType, getPadCharacter, getWide, getWriteDate, setAllowSignedByte, setAllowZeroLengthString, setFormatName, setPadCharacter, setWide, setWriteDate, writePrimaryHDU, writeStarTable, writeStarTables, writeStarTables, writeTableHDU
Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter
writeStarTable, writeStarTable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.table.StarTableWriter
writeStarTable
-
Constructor Details
-
HealpixFitsTableWriter
public HealpixFitsTableWriter()Constructor.
-
-
Method Details
-
looksLikeFile
Returns false. -
createSerializer
protected FitsTableSerializer createSerializer(uk.ac.starlink.table.StarTable table) throws uk.ac.starlink.table.TableFormatException, IOException Returns a StandardFitsTableSerializer only if the table looks like a HEALpix map. The serializer may rearrange the columns so that the pixel index column comes first. If the table doesn't look like HEALpix, a TableFormatException will be thrown.- Specified by:
createSerializer
in classAbstractFitsTableWriter
- Parameters:
table
- table to serialize- Returns:
- FITS serializer
- Throws:
IOException
- if the table can't be writtenuk.ac.starlink.table.TableFormatException
-