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
FieldsFields inherited from class 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 booleanstatic RandomGroupsData(package private) static Object[]voidinfo(PrintStream stream) Print out some information about this HDU.static booleanCheck if this data is compatible with Random Groups structure.booleanisHeader()Check that this HDU has a valid header.static booleanstatic RandomGroupsDatamanufactureData(Header header) (package private) static Headerprotected voidsetPrimaryHDU(boolean status) Move a RandomGroupsHDU to or from the beginning of a FITS file.Methods inherited from class 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
-
Field Details
-
LOG
-
-
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
-
generateSampleRow
- 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
-
manufactureHeader
- Parameters:
d- The random groups data the header should describe.- Returns:
- Make a header point to the given object.
- Throws:
FitsException- if the operation failed
-
canBePrimary
protected boolean canBePrimary()- Overrides:
canBePrimaryin classBasicHDU<RandomGroupsData>- Returns:
- Indicate whether HDU can be primary HDU. This method must be overriden in HDU types which can appear at the beginning of a FITS file.
-
info
Description copied from class:BasicHDUPrint out some information about this HDU.- Specified by:
infoin classBasicHDU<RandomGroupsData>- Parameters:
stream- the printstream to write the info on
-
isHeader
public boolean isHeader()Check that this HDU has a valid header.- Returns:
trueif 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.- Overrides:
setPrimaryHDUin classBasicHDU<RandomGroupsData>- Parameters:
status-trueif the header should be primary- Throws:
FitsException- if the operation failed
-