IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12701


Ignore:
Timestamp:
Mar 30, 2007, 5:00:41 PM (19 years ago)
Author:
magnier
Message:

add PHU entry from source if available

File:
1 edited

Legend:

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

    r12696 r12701  
    10961096    pmHDU *targetHDU = pmHDUFromChip(target); // The HDU for the target
    10971097    targetHDU->header = psMetadataCopy(targetHDU->header, sourceHDU->header);
    1098     pmHDU *phu = pmHDUGetHighest(target->parent, target, NULL);
    1099     if (!phu) {
     1098    pmHDU *targetPHU = pmHDUGetHighest(target->parent, target, NULL);
     1099    pmHDU *sourcePHU = pmHDUGetHighest(source->parent, source, NULL);
     1100
     1101    if (!targetPHU) {
    11001102        psError(PS_ERR_UNKNOWN, true, "Unable to find HDU after mosaicking.\n");
    11011103        return false;
    11021104    }
    1103     if (!phu->header) {
    1104         phu->header = psMetadataAlloc();
    1105     }
    1106     if (!pmConfigConformHeader(phu->header, phu->format)) {
     1105    if (!targetPHU->header) {
     1106        // if we don't yet have a header, copy this one.
     1107        // XXX do we need to create an empty one if the levels do not match??
     1108        if (true) {
     1109            targetPHU->header = psMetadataCopy(targetPHU->header, sourcePHU->header);
     1110        } else {
     1111            targetPHU->header = psMetadataAlloc();
     1112        }
     1113    }
     1114
     1115    if (!pmConfigConformHeader(targetPHU->header, targetPHU->format)) {
    11071116        psError(PS_ERR_UNKNOWN, false, "Unable to conform header after mosaicking.\n");
    11081117        return false;
Note: See TracChangeset for help on using the changeset viewer.