00001 /** @file psFitsTable.h 00002 * 00003 * @brief Contains Fits 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_FITSTABLE_H 00016 #define PS_FITSTABLE_H 00017 00018 #include "psFits.h" 00019 00020 #include "psType.h" 00021 #include "psArray.h" 00022 #include "psVector.h" 00023 #include "psMetadata.h" 00024 #include "psImage.h" 00025 00026 /// @addtogroup FileIO 00027 /// @{ 00028 00029 /** Reads a table row. The current HDU type must be either 00030 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00031 * 00032 * @return psMetadata* The table row's data. The keys are the column names. 00033 */ 00034 psMetadata* psFitsReadTableRow( 00035 const psFits* fits, ///< the psFits object 00036 int row ///< row number to read 00037 ); 00038 00039 /** Reads a table column. The current HDU type must be either 00040 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00041 * 00042 * @return psArray* Array of data items for the specified column or NULL 00043 * if an error occurred. 00044 */ 00045 psArray* psFitsReadTableColumn( 00046 const psFits* fits, ///< the psFits object 00047 const char* colname ///< the column name 00048 ); 00049 00050 /** Reads a table column of numbers. The current HDU type must be either 00051 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00052 * 00053 * @return psVector* Vector of data for the specified column or NULL 00054 * if an error occurred. 00055 */ 00056 psVector* psFitsReadTableColumnNum( 00057 const psFits* fits, ///< the psFits object 00058 const char* colname ///< the column name 00059 ); 00060 00061 00062 /** Reads a whole FITS table. The current HDU type must be either 00063 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00064 * 00065 * @return psArray* Array of psMetadata items, which contains the output 00066 * data items of each row. 00067 * 00068 * @see psFitsReadTableRow 00069 */ 00070 psArray* psFitsReadTable( 00071 psFits* fits ///< the psFits object 00072 ); 00073 00074 /** Writes a whole FITS table. The current HDU type must be either 00075 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00076 * 00077 * @return bool TRUE if the write was successful, otherwise FALSE 00078 * 00079 * @see psFitsReadTableRow 00080 */ 00081 bool psFitsWriteTable( 00082 psFits* fits, ///< the psFits object 00083 const psMetadata* header, ///< header items for the new HDU. Can be NULL. 00084 const psArray* table 00085 ///< Array of psMetadata items, which contains the output data items of each row. 00086 ); 00087 00088 /** Updates a FITS table. The current HDU type must be either 00089 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 00090 * 00091 * @return bool TRUE if the write was successful, otherwise FALSE 00092 * 00093 * @see psFitsWriteTable 00094 */ 00095 bool psFitsUpdateTable( 00096 psFits* fits, ///< the psFits object 00097 const psMetadata* data, 00098 ///< Array of psMetadata items, which contains the output data items of each row. 00099 int row ///< the row number to update. 00100 ); 00101 00102 /// @} 00103 00104 #endif // #ifndef PS_FITS_H
1.4.2