Package nom.tam.fits
Class UndefinedHDU
- java.lang.Object
-
- nom.tam.fits.BasicHDU<UndefinedData>
-
- nom.tam.fits.UndefinedHDU
-
- All Implemented Interfaces:
FitsElement
public class UndefinedHDU extends BasicHDU<UndefinedData>
Holder for unknown data types.
-
-
Field Summary
-
Fields inherited from class nom.tam.fits.BasicHDU
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORT, isPrimary, myData, myHeader
-
-
Constructor Summary
Constructors Constructor Description UndefinedHDU(Header h, UndefinedData d)
Build an image HDU using the supplied data.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UndefinedData
encapsulate(java.lang.Object o)
void
info(java.io.PrintStream stream)
Print out some information about this HDU.static boolean
isData(java.lang.Object o)
Check if we can use the following object as in an Undefined FITS block.static boolean
isHeader(Header hdr)
Check if we can find the length of the data for this header.static Data
manufactureData(Header hdr)
static Header
manufactureHeader(Data d)
-
Methods inherited from class nom.tam.fits.BasicHDU
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
-
-
-
-
Constructor Detail
-
UndefinedHDU
public UndefinedHDU(Header h, UndefinedData d) throws FitsException
Build an image HDU using the supplied data.- Parameters:
h
- the header for this HDUd
- the data used to build the image.- Throws:
FitsException
- if there was a problem with the data.
-
-
Method Detail
-
encapsulate
public static UndefinedData encapsulate(java.lang.Object o) throws FitsException
- Parameters:
o
- the object to encapsulate- Returns:
- Encapsulate an object as an ImageHDU.
- Throws:
FitsException
- if the operation failed
-
isData
public static boolean isData(java.lang.Object o)
Check if we can use the following object as in an Undefined FITS block. We allow this so long as computeLSize can get a size. Note that computeLSize may be wrong!- Parameters:
o
- The Object being tested.- Returns:
- true if o can be an Undefined FITS block.
-
isHeader
public static boolean isHeader(Header hdr)
Check if we can find the length of the data for this header.- Parameters:
hdr
- header to check.- Returns:
true
if this HDU has a valid header.
-
manufactureData
public static Data manufactureData(Header hdr) throws FitsException
- Throws:
FitsException
-
manufactureHeader
public static Header manufactureHeader(Data d) throws FitsException
- Parameters:
d
- The image to be described.- Returns:
- Create a header that describes the given image data.
- Throws:
FitsException
- if the object does not contain valid image data.
-
info
public void info(java.io.PrintStream stream)
Description copied from class:BasicHDU
Print out some information about this HDU.- Specified by:
info
in classBasicHDU<UndefinedData>
- Parameters:
stream
- the printstream to write the info on
-
-