Package nom.tam.fits
Class RandomGroupsHDU
- All Implemented Interfaces:
FitsElement
Random groups HDUs. Note that the internal storage of random groups is a
Object[ngroup][2] array. The first element of each group is the parameter
data from that group. The second element is the data. The parameters should
be a one dimensional array of the primitive types byte, short, int, long,
float or double. The second element is a n-dimensional array of the same
type. When analyzing group data structure only the first group is examined,
but for a valid FITS file all groups must have the same structure.
-
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
ConstructorsConstructorDescriptionRandomGroupsHDU
(Header header, RandomGroupsData data) Create an HDU from the given header and data . -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static RandomGroupsData
void
info
(PrintStream stream) Print out some information about this HDU.static boolean
Check if this data is compatible with Random Groups structure.boolean
isHeader()
Check that this HDU has a valid header.static boolean
static RandomGroupsData
manufactureData
(Header header) protected void
setPrimaryHDU
(boolean status) Move a RandomGroupsHDU to or from the beginning of a FITS file.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 Details
-
RandomGroupsHDU
Create an HDU from the given header and data .- Parameters:
header
- header to usedata
- data to use
-
-
Method Details
-
encapsulate
- Throws:
FitsException
-
isData
Check if this data is compatible with Random Groups structure. Must be an Object[ngr][2] structure with both elements of each group having the same base type and the first element being a simple primitive array. We do not check anything but the first row.- Parameters:
potentialData
- data to check- Returns:
- is this data compatible with Random Groups structure
-
isHeader
- Parameters:
hdr
- The header to be tested.- Returns:
- Is this a random groups header?
-
manufactureData
- Parameters:
header
- header for the data creation- Returns:
- Create FITS data object corresponding to a given header.
- Throws:
FitsException
- if the operation failed
-
canBePrimary
protected boolean canBePrimary() -
info
Description copied from class:BasicHDU
Print out some information about this HDU.- Specified by:
info
in classBasicHDU<RandomGroupsData>
- Parameters:
stream
- the printstream to write the info on
-
isHeader
public boolean isHeader()Check that this HDU has a valid header.- Returns:
true
if this HDU has a valid header.
-
setPrimaryHDU
Move a RandomGroupsHDU to or from the beginning of a FITS file. Note that the FITS standard only supports Random Groups data at the beginning of the file, but we allow it within Image extensions.- Parameters:
status
-true
if the header should be primary- Throws:
FitsException
-