IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 23, 2007, 6:01:33 PM (19 years ago)
Author:
Paul Price
Message:

Need to add NAXIS1,NAXIS2 to the header after chip mosaic, so that CMF files know the proper extent of the chip.

File:
1 edited

Legend:

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

    r13339 r13499  
    1616#include "pmConfig.h"
    1717#include "pmAstrometryWCS.h"
     18#include "pmFPAExtent.h"
    1819
    1920#include "pmFPAMosaic.h"
     
    10861087    pmHDU *sourcePHU = pmHDUGetHighest(source->parent, source, NULL);
    10871088
     1089    // Need to update NAXIS1, NAXIS2 in the target header, so that when we write a CMF, it has the correct
     1090    // extent.  I'm not convinced that this is the best way to do this, but it should be, at worst, harmless,
     1091    // since NAXIS[12] will get overwritten for an image with the proper dimensions.
     1092    psRegion *naxis = pmChipExtent(target);
     1093    psMetadataAddS32(targetHDU->header, PS_LIST_TAIL, "NAXIS1", PS_META_REPLACE, "Size in x",
     1094                     naxis->x1 - naxis->x0);
     1095    psMetadataAddS32(targetHDU->header, PS_LIST_TAIL, "NAXIS2", PS_META_REPLACE, "Size in y",
     1096                     naxis->y1 - naxis->y0);
     1097    psFree(naxis);
     1098
     1099
    10881100    if (!targetPHU) {
    10891101        psError(PS_ERR_UNKNOWN, true, "Unable to find HDU after mosaicking.\n");
Note: See TracChangeset for help on using the changeset viewer.