Package eap.fits

A 100% Java interface to FITS data files.

See:
          Description

Interface Summary
RealImageConsumer This is the similar to an ImageConsumer, except that it handles double valued pixels.
RealImageProducer This interface is analogous to ImageProducer, except that it handles pixels of type double.
 

Class Summary
FitsASCIIColumn represents a column in an ASCII table extension
FitsASCIITableData  
FitsBinaryColumn Represents a column in a BINTABLE extension
FitsBinTableData Represents BINTABLE format data.
FitsCard Represents a single header record.
FitsColumn Holds the information about a column in an ASCII or binary table.
FitsData Represents the data part of a FITS HDU.
FitsFile Represents an entire fits file.
FitsHDU Represents the basic building block of a FITS file - the "Header Data Unit".
FitsHeader Represents the header of a FITS HDU.
FitsImageData Represents the data in the primary HDU of an image extension.
FitsTableData This abstract class represents the data in either a FITS ASCII table or a FITS BINTABLE.
ImageDigitizer This class converts a stream of double-valued pixels from a RealImageProducer into a stream of integer pixels.
InputStreamFitsFile Represents a FITS file to be read from a serial data source.
RandomAccessFitsFile Represents a FitsFile which can be read from a RandomAccessFile data source.
 

Exception Summary
FitsException Thrown when there is a problem with the FITS format.
NoSuchFitsCardException Thrown when the requested header card is not present.
NoSuchFitsHDUException Thrown when the requested HDU is not present in the FITS file.
 

Package eap.fits Description

A 100% Java interface to FITS data files. FITS is the standard file format for astronomy data. It is similar in spirit to TIFF in that it is highly extensible, and it stores metadata using keyword-value pairs. For more information on FITS, see the HEASARC FITS web site.

The philosophy of this package is to represent FITS data in ways which are natural to Java. So a FITS table implements the Java Swing TableModel interface. Images fit into the old Java ImageProducer/ImageConsumer scheme, though there are future plans to also represent them as a Raster and TableModel.

The usual method for reading a FITS file is to first choose the proper FitsFile subclass for your data source. If you have an uncompressed FITS file on a local disk, then use RandomAccessFitsFile. If you are reading data over a network, or you need to pass it through a GZIPInputStream, then use InputStreamFitsFile. If you are creating a new file then you can use the FitsFile class.

Next you use one of the FitsFile getHDU methods to obtain the FitsHDU you are interested in. From the HDU you can get the FitsHeader and access the metadata stored there in FitsCard objects. You can also get the FitsData in the HDU. Usually, you cast this to a particular type: FitsBinTableData or FitsImageData.

For examples on how to use this package, see the source code for the 100% Java FITS file browser in eap.fitsbrowser.

This package does not yet implement every facet of the FITS format and there are many palns for improvements. If you have a request for an added feature, please contact the author: Edward A. Pier pier@ssvs.gsfc.nasa.gov.

Version:
1.0 2003-11-19
Author:
Edward A. Pier pier@ssvs.gsfc.nasa.gov