IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2007, 5:01:45 PM (19 years ago)
Author:
Paul Price
Message:

Cleaning up some code, using PS_ASSERT_FITS_NON_NULL instead of custom code in each function. Adding function to determine if the FITS file pointer is on a PHU that should truly be a FITS image (but it's compressed so it's a FITS table, which can't be the PHU). Putting hooks to this function into the header and image read functions, so that they read what the user Really Wants. This behaviour (which some may not want if they want the unadulterated FITS file) can be turned off by setting psFits.compression=false (default is true). This works for reading uncompressed data, data we've compressed ourselves, and data compressed with fpack-0.93. It doesn't yet work with data compressed with cfitsio's imcopy program (due to multiple EXTNAME keywords; about to put in a fix for this).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_070920/psLib/src/fits/psFitsHeader.h

    r14985 r15168  
    44 * @author Robert DeSonia, MHPCC
    55 *
    6  * @version $Revision: 1.10.14.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-09-22 03:08:05 $
     6 * @version $Revision: 1.10.14.2 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2007-10-03 03:01:45 $
    88 *
    99 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "psMetadata.h"
    2020
    21 /// Determines whether the current HDU is an empty PHU
    22 bool psFitsEmptyPHU(const psFits *fits, ///< FITS file pointer
    23                     const psMetadata *header ///< Header
     21
     22/// Determine whether the current HDU is an empty PHU with a single compressed image following.
     23///
     24/// In that case, what should be treated as an image PHU is technically an empty PHU with a binary table
     25/// extension.  We test the current position, number of extensions, the FITS headers and presence of a
     26/// following compressed image to determine if this is the case.  If so, the FITS file pointer is left
     27/// pointing at the compressed image.
     28bool psFitsCheckSingleCompressedImagePHU(const psFits *fits, ///< FITS file pointer
     29                                         const psMetadata *header ///< Header, or NULL
    2430    );
    25 
    2631
    2732/** Reads the header of the current HDU.
Note: See TracChangeset for help on using the changeset viewer.