Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psFitsHeader.h

Go to the documentation of this file.
00001 /** @file  psFitsHeader.h
00002  *
00003  *  @brief Contains Fits header I/O routines
00004  *
00005  *  @ingroup FileIO
00006  *
00007  *  @author Robert DeSonia, MHPCC
00008  *
00009  *  @version $Revision: 1.1 $ $Name: rel9_0 $
00010  *  @date $Date: 2005/11/14 22:18:30 $
00011  *
00012  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00013  */
00014 
00015 #ifndef PS_FITSHEADER_H
00016 #define PS_FITSHEADER_H
00017 
00018 #include "psFits.h"
00019 #include "psMetadata.h"
00020 
00021 /// @addtogroup FileIO
00022 /// @{
00023 
00024 /** Reads the header of the current HDU.
00025  *
00026  *  @return psMetadata*   the header data
00027  */
00028 psMetadata* psFitsReadHeader(
00029     psMetadata* out,
00030     ///< The psMetadata to add the header data.  If null, a new psMetadata is created.
00031     const psFits* fits                 ///< the psFits object
00032 );
00033 
00034 /** Reads the header of all HDUs.  The current HDU is not changed.
00035  *
00036  *  @return psMetadata*      the header data set as a number of metadata entries
00037  */
00038 psMetadata* psFitsReadHeaderSet(
00039     psMetadata* out,
00040     ///< The psMetadata to add the header data via psMetadata items.  If null, a
00041     ///< new psMetadata is created.  The keys of the psMetadata are the extension names
00042     ///< of the cooresponding HDUs.
00043 
00044     const psFits* fits                       ///< the psFits object
00045 );
00046 
00047 /** Writes the values of the metadata to the current HDU header.
00048  *
00049  *  @return bool        if TRUE, the write was successful, otherwise FALSE.
00050  */
00051 bool psFitsWriteHeader(
00052     const psMetadata* output,          ///< the psMetadata data in which to write
00053     psFits* fits                       ///< the psFits object
00054 );
00055 
00056 /** Updates the given header to be compatible with the supplied image, updating
00057  *  BITPIX, NAXIS1, and NAXIS2.  The extension name is (re)set to the given
00058  *  extname.
00059  *
00060  *  @return psMetadata*     updated header.
00061  */
00062 psMetadata* psFitsHeaderFromImage(
00063     psMetadata* header,                ///< the header to update
00064     psImage* image,                    ///< the image to use to determine update values
00065     const char* extname                ///< the extension name
00066 );
00067 
00068 /** Updates the given header to be compatible with the given table, i.e. psArray
00069  *  of psMetadata. The extension name is (re)set to the given extname.
00070  */
00071 psMetadata* psFitsHeaderFromTable(
00072     psMetadata* header,                ///< the header to update
00073     psArray* table,                    ///< the table to use to update header
00074     const char* extname                ///< the extension name
00075 );
00076 
00077 /// @}
00078 
00079 #endif // #ifndef PS_FITS_H

Generated on Tue Dec 6 17:18:42 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.2