nom.tam.fits
Class RandomGroupsHDU

java.lang.Object
  extended by nom.tam.fits.BasicHDU
      extended by nom.tam.fits.RandomGroupsHDU
All Implemented Interfaces:
FitsElement

public class RandomGroupsHDU
extends BasicHDU

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
RandomGroupsHDU(Header h, Data d)
          Create an HDU from the given header and data
 
Method Summary
protected  boolean canBePrimary()
          Indicate that a RandomGroupsHDU can come at the beginning of a FITS file.
static Data encapsulate(java.lang.Object o)
           
 void info()
          Display structural information about the current HDU.
static boolean isData(java.lang.Object oo)
          Check if this data is compatible with Random Groups structure.
 boolean isHeader()
          Check that this HDU has a valid header.
static boolean isHeader(Header hdr)
          Is this a random groups header?
 Data manufactureData()
          Create a FITS Data object corresponding to this HDU header.
static Data manufactureData(Header hdr)
          Create FITS data object corresponding to a given 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, 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, read, readData, rewrite, rewriteable, skipData, skipData, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomGroupsHDU

public RandomGroupsHDU(Header h,
                       Data d)
Create an HDU from the given header and data

Method Detail

canBePrimary

protected boolean canBePrimary()
Indicate that a RandomGroupsHDU can come at the beginning of a FITS file.


setPrimaryHDU

protected void setPrimaryHDU(boolean status)
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.


isHeader

public static boolean isHeader(Header hdr)
Is this a random groups header?

Parameters:
myHeader - The header to be tested.

isHeader

public boolean isHeader()
Check that this HDU has a valid header.

Returns:
true if this HDU has a valid header.

isData

public static boolean isData(java.lang.Object oo)
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.


manufactureData

public Data manufactureData()
                     throws FitsException
Create a FITS Data object corresponding to this HDU header.

Returns:
An unfilled Data object which can be used to read in the data for this HDU.
Throws:
FitsException - if the Data object could not be created from this HDU's Header

manufactureData

public static Data manufactureData(Header hdr)
                            throws FitsException
Create FITS data object corresponding to a given header.

Throws:
FitsException

encapsulate

public static Data encapsulate(java.lang.Object o)
                        throws FitsException
Throws:
FitsException

info

public void info()
Display structural information about the current HDU.

Specified by:
info in class BasicHDU