Changeset 15248
- Timestamp:
- Oct 8, 2007, 4:56:23 PM (19 years ago)
- Location:
- trunk/psLib/src/fits
- Files:
-
- 2 edited
-
psFitsTable.c (modified) (5 diffs)
-
psFitsTable.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFitsTable.c
r15179 r15248 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2007-10-0 3 21:27:21$9 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-10-09 02:56:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 34 34 #define MAX_STRING_LENGTH 256 // maximum length string for FITS routines 35 35 36 long psFitsTableSize(const psFits *fits) 37 { 38 PS_ASSERT_FITS_NON_NULL(fits, 0); 39 40 int status = 0; // CFITSIO status 41 long numRows; // Number of rows 42 if (fits_get_num_rows(fits->fd, &numRows, &status)) { 43 psFitsError(status, true, "Unable to determine number of rows in table."); 44 return 0; 45 } 46 47 return numRows; 48 } 36 49 37 50 psMetadata* psFitsReadTableRow(const psFits* fits, … … 388 401 { 389 402 PS_ASSERT_FITS_NON_NULL(fits, false); 403 PS_ASSERT_FITS_WRITABLE(fits, false); 390 404 if (!psFitsMoveLast(fits)) { 391 405 psError(PS_ERR_UNKNOWN, false, "Unable to move to last extension to write table"); … … 465 479 { 466 480 PS_ASSERT_FITS_NON_NULL(fits, false); 481 PS_ASSERT_FITS_WRITABLE(fits, false); 467 482 PS_ASSERT_ARRAY_NON_NULL(table, false); 468 483 … … 719 734 { 720 735 PS_ASSERT_FITS_NON_NULL(fits, false); 736 PS_ASSERT_FITS_WRITABLE(fits, false); 721 737 PS_ASSERT_METADATA_NON_NULL(data, false); 722 738 PS_ASSERT_INT_NONNEGATIVE(row, false); -
trunk/psLib/src/fits/psFitsTable.h
r11248 r15248 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2007- 01-23 22:47:23 $7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-10-09 02:56:23 $ 9 9 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 10 10 */ … … 23 23 #include "psMetadata.h" 24 24 #include "psImage.h" 25 26 /// Return the number of rows in the current table 27 /// 28 /// The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. 29 long psFitsTableSize(const psFits *fits ///< FITS file 30 ); 25 31 26 32 /** Reads a table row. The current HDU type must be either
Note:
See TracChangeset
for help on using the changeset viewer.
