IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22729


Ignore:
Timestamp:
Mar 2, 2009, 10:14:15 AM (17 years ago)
Author:
Paul Price
Message:

Since we're now writing a covariance matrix to the end of the variance image, they have no longer been identified as 'SingleCompressedImagePHU' because there's more than one extension. Realised that this is not what this function is supposed to check, but merely whether the PHU is a dummy.

Location:
trunk/psLib/src/fits
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsHeader.c

    r22432 r22729  
    149149
    150150
    151 bool psFitsCheckSingleCompressedImagePHU(const psFits *fits, psMetadata *header)
     151bool psFitsCheckCompressedImagePHU(const psFits *fits, psMetadata *header)
    152152{
    153153    PS_ASSERT_FITS_NON_NULL(fits, false);
     
    163163    }
    164164
    165     if (psFitsGetSize(fits) != 2) {
    166         // No second extension, or multiple extensions
     165    if (psFitsGetSize(fits) == 1) {
     166        // No extension present
    167167        return false;
    168168    }
     
    416416    // Explore the potential case that this is an empty PHU, and the first extension contains the sole image,
    417417    // which is compressed.
    418     if (psFitsCheckSingleCompressedImagePHU(fits, header)) {
     418    if (psFitsCheckCompressedImagePHU(fits, header)) {
    419419        // This is really what we want, not the empty PHU
    420420        psTrace("psLib.fits", 1,
  • trunk/psLib/src/fits/psFitsHeader.h

    r15179 r22729  
    2020
    2121
    22 /// Determine whether the current HDU is an empty PHU with a single compressed image following.
     22/// Determine whether the current HDU is an empty PHU with a compressed image following.
    2323///
    2424/// In that case, what should be treated as an image PHU is technically an empty PHU with a binary table
     
    2626/// following compressed image to determine if this is the case.  If so, the FITS file pointer is left
    2727/// pointing at the compressed image.
    28 bool psFitsCheckSingleCompressedImagePHU(const psFits *fits, ///< FITS file pointer
    29                                          const psMetadata *header ///< Header, or NULL
     28bool psFitsCheckCompressedImagePHU(const psFits *fits, ///< FITS file pointer
     29                                   const psMetadata *header ///< Header, or NULL
    3030    );
    3131
  • trunk/psLib/src/fits/psFitsImage.c

    r21535 r22729  
    219219    PS_ASSERT_FITS_NON_NULL(fits, NULL);
    220220
    221     if (psFitsCheckSingleCompressedImagePHU(fits, NULL)) {
     221    if (psFitsCheckCompressedImagePHU(fits, NULL)) {
    222222        // This is really what we want, not the empty PHU
    223223        psTrace("psLib.fits", 1,
     
    432432    PS_ASSERT_INT_NONNEGATIVE(z, NULL);
    433433
    434     if (psFitsCheckSingleCompressedImagePHU(fits, NULL)) {
     434    if (psFitsCheckCompressedImagePHU(fits, NULL)) {
    435435        // This is really what we want, not the empty PHU
    436436        psTrace("psLib.fits", 1,
     
    479479    }
    480480
    481     if (psFitsCheckSingleCompressedImagePHU(fits, NULL)) {
     481    if (psFitsCheckCompressedImagePHU(fits, NULL)) {
    482482        // This is really what we want, not the empty PHU
    483483        psTrace("psLib.fits", 1,
     
    873873    // code replication, and should be sufficient for our needs.
    874874
    875     if (psFitsCheckSingleCompressedImagePHU(fits, NULL)) {
     875    if (psFitsCheckCompressedImagePHU(fits, NULL)) {
    876876        // This is really what we want, not the empty PHU
    877877        psTrace("psLib.fits", 1,
Note: See TracChangeset for help on using the changeset viewer.