Package nom.tam.fits
Class RandomGroupsHDU
- java.lang.Object
-
- nom.tam.fits.BasicHDU<RandomGroupsData>
-
- nom.tam.fits.RandomGroupsHDU
-
- All Implemented Interfaces:
FitsElement
public class RandomGroupsHDU extends BasicHDU<RandomGroupsData>
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
Constructors Constructor Description RandomGroupsHDU(Header header, RandomGroupsData data)Create an HDU from the given header and data .
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanBePrimary()static RandomGroupsDataencapsulate(java.lang.Object o)voidinfo(java.io.PrintStream stream)Print out some information about this HDU.static booleanisData(java.lang.Object potentialData)Check if this data is compatible with Random Groups structure.booleanisHeader()Check that this HDU has a valid header.static booleanisHeader(Header hdr)static RandomGroupsDatamanufactureData(Header header)protected voidsetPrimaryHDU(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 Detail
-
RandomGroupsHDU
public RandomGroupsHDU(Header header, RandomGroupsData data)
Create an HDU from the given header and data .- Parameters:
header- header to usedata- data to use
-
-
Method Detail
-
encapsulate
public static RandomGroupsData encapsulate(java.lang.Object o) throws FitsException
- Throws:
FitsException
-
isData
public static boolean isData(java.lang.Object potentialData)
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
public static boolean isHeader(Header hdr)
- Parameters:
hdr- The header to be tested.- Returns:
- Is this a random groups header?
-
manufactureData
public static RandomGroupsData manufactureData(Header header) throws FitsException
- 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
public void info(java.io.PrintStream stream)
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
protected void setPrimaryHDU(boolean status) throws FitsExceptionMove 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-trueif the header should be primary- Throws:
FitsException
-
-