|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnom.tam.fits.BasicHDU
public abstract class BasicHDU
This abstract class is the parent of all HDU types. It provides basic functionality for an HDU.
| Field Summary | |
|---|---|
static int |
BITPIX_BYTE
|
static int |
BITPIX_DOUBLE
|
static int |
BITPIX_FLOAT
|
static int |
BITPIX_INT
|
static int |
BITPIX_LONG
|
static int |
BITPIX_SHORT
|
protected boolean |
isPrimary
Is this the first HDU in a FITS file? |
protected Data |
myData
The associated data unit. |
protected Header |
myHeader
The associated header. |
| Constructor Summary | |
|---|---|
BasicHDU()
|
|
| Method Summary | |
|---|---|
void |
addValue(java.lang.String key,
boolean val,
java.lang.String comment)
Add information to the header |
void |
addValue(java.lang.String key,
double val,
java.lang.String comment)
|
void |
addValue(java.lang.String key,
int val,
java.lang.String comment)
|
void |
addValue(java.lang.String key,
java.lang.String val,
java.lang.String comment)
|
java.lang.String |
getAuthor()
Return the name of the person who compiled the information in the data associated with this header. |
int[] |
getAxes()
|
int |
getBitPix()
|
int |
getBlankValue()
|
double |
getBScale()
|
java.lang.String |
getBUnit()
|
double |
getBZero()
|
java.util.Date |
getCreationDate()
Get the FITS file creation date as a Date object. |
Data |
getData()
Get the associated Data object |
static BasicHDU |
getDummyHDU()
|
double |
getEpoch()
Deprecated. Replaced by getEquinox |
double |
getEquinox()
Get the equinox in years for the celestial coordinate system in which positions given in either the header or data are expressed. |
long |
getFileOffset()
Get the starting offset of the HDU |
int |
getGroupCount()
|
Header |
getHeader()
Get the associated header |
java.lang.String |
getInstrument()
Get the name of the instrument which was used to acquire the data in this FITS file. |
java.lang.Object |
getKernel()
Get the non-FITS data object |
double |
getMaximumValue()
Return the minimum valid value in the array. |
double |
getMinimumValue()
Return the minimum valid value in the array. |
java.lang.String |
getObject()
Get the name of the observed object in this FITS file. |
java.util.Date |
getObservationDate()
Get the FITS file observation date as a Date object. |
java.lang.String |
getObserver()
Get the name of the person who acquired the data in this FITS file. |
java.lang.String |
getOrigin()
Get the name of the organization which created this FITS file. |
int |
getParameterCount()
|
java.lang.String |
getReference()
Return the citation of a reference where the data associated with this header are published. |
long |
getSize()
Get the total size in bytes of the HDU. |
java.lang.String |
getTelescope()
Get the name of the telescope which was used to acquire the data in this FITS file. |
java.lang.String |
getTrimmedString(java.lang.String keyword)
Get the String value associated with keyword. |
abstract void |
info()
Print out some information about this HDU. |
static boolean |
isHeader(Header header)
Check that this is a valid header for the HDU. |
void |
read(ArrayDataInput stream)
Read the contents of the element from an input source. |
void |
readData(ArrayDataInput stream)
Read in the Data object for this HDU. |
void |
rewrite()
Rewrite the HDU |
boolean |
rewriteable()
Is the HDU rewriteable |
void |
skipData(ArrayDataInput stream)
Skip the Data object for this HDU. |
static void |
skipData(ArrayDataInput stream,
Header hdr)
Skip the Data object immediately after the given Header object on the given stream object. |
void |
write(ArrayDataOutput stream)
Write the contents of the element to a data sink. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BITPIX_BYTE
public static final int BITPIX_SHORT
public static final int BITPIX_INT
public static final int BITPIX_LONG
public static final int BITPIX_FLOAT
public static final int BITPIX_DOUBLE
protected Header myHeader
protected Data myData
protected boolean isPrimary
| Constructor Detail |
|---|
public BasicHDU()
| Method Detail |
|---|
public static void skipData(ArrayDataInput stream,
Header hdr)
throws java.io.IOException
stream - the stream which contains the data.Header - template indicating length of Data section
java.io.IOException - if the Data object could not be skipped.
public void skipData(ArrayDataInput stream)
throws java.io.IOException
stream - the stream which contains the data.
java.io.IOException - if the Data object could not be skipped.
public void readData(ArrayDataInput stream)
throws FitsException
stream - the stream from which the data is read.
FitsException - if the Data object could not be created
from this HDU's Headerpublic Header getHeader()
public long getFileOffset()
getFileOffset in interface FitsElementpublic Data getData()
public java.lang.Object getKernel()
public long getSize()
getSize in interface FitsElementpublic static boolean isHeader(Header header)
header - to validate.
true if this is a valid header.public abstract void info()
public void read(ArrayDataInput stream)
throws FitsException,
java.io.IOException
FitsElement
read in interface FitsElementstream - The input source.
FitsException
java.io.IOException
public void write(ArrayDataOutput stream)
throws FitsException
FitsElement
write in interface FitsElementstream - The data sink.
FitsExceptionpublic boolean rewriteable()
rewriteable in interface FitsElement
public void rewrite()
throws FitsException,
java.io.IOException
rewrite in interface FitsElementFitsException
java.io.IOExceptionpublic java.lang.String getTrimmedString(java.lang.String keyword)
keyword.
hdr - the header piece of an HDUkeyword - the FITS keyword
null or a String with leading/trailing
blanks stripped.
public int getBitPix()
throws FitsException
FitsException
public int[] getAxes()
throws FitsException
FitsExceptionpublic int getParameterCount()
public int getGroupCount()
public double getBScale()
public double getBZero()
public java.lang.String getBUnit()
public int getBlankValue()
throws FitsException
FitsExceptionpublic java.util.Date getCreationDate()
Date object.
null or a Date objectpublic java.util.Date getObservationDate()
Date object.
null or a Date objectpublic java.lang.String getOrigin()
null or a String objectpublic java.lang.String getTelescope()
null or a String objectpublic java.lang.String getInstrument()
null or a String objectpublic java.lang.String getObserver()
null or a String objectpublic java.lang.String getObject()
null or a String objectpublic double getEquinox()
null or a String objectpublic double getEpoch()
null or a String objectgetEquinox()public java.lang.String getAuthor()
null or a String objectpublic java.lang.String getReference()
null or a String objectpublic double getMaximumValue()
public double getMinimumValue()
public void addValue(java.lang.String key,
boolean val,
java.lang.String comment)
throws HeaderCardException
HeaderCardException
public void addValue(java.lang.String key,
int val,
java.lang.String comment)
throws HeaderCardException
HeaderCardException
public void addValue(java.lang.String key,
double val,
java.lang.String comment)
throws HeaderCardException
HeaderCardException
public void addValue(java.lang.String key,
java.lang.String val,
java.lang.String comment)
throws HeaderCardException
HeaderCardExceptionpublic static BasicHDU getDummyHDU()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||