IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11434


Ignore:
Timestamp:
Jan 30, 2007, 9:51:54 AM (19 years ago)
Author:
Paul Price
Message:

Ensure that HDUs when written are recognisable as what they are supposed to be (call pmConfigConformHeader).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmHDU.c

    r10081 r11434  
    88
    99#include <pslib.h>
     10#include "pmConfig.h"
    1011#include "pmFPA.h"
    1112
     
    179180    }
    180181
     182    // Make sure it's recognisable as what it's supposed to be
     183    if (!hdu->header) {
     184        hdu->header = psMetadataAlloc();
     185    }
     186    if (!pmConfigConformHeader(hdu->header, hdu->format)) {
     187        psError(PS_ERR_UNKNOWN, false, "Unable to conform header to format.\n");
     188        return false;
     189    }
     190
    181191    // Only a header
    182192    if (!images && !psFitsWriteBlank(fits, hdu->header, extname)) {
    183193        psError(PS_ERR_IO, false, "Unable to write header for extension %s\n", extname);
     194        return false;
    184195    }
    185196
Note: See TracChangeset for help on using the changeset viewer.