IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24155 for trunk/ppSub


Ignore:
Timestamp:
May 12, 2009, 6:17:35 PM (17 years ago)
Author:
Paul Price
Message:

Merging ppSub from branches/pap_magic/ to get important change: write WCS for inverse image.

Location:
trunk/ppSub
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub

  • trunk/ppSub/src/ppSub.h

    r23753 r24155  
    2424
    2525#define PPSUB_RECIPE "PPSUB"            /// Name of the recipe to use
     26#define WCS_TOLERANCE 0.001             // Tolerance for WCS
    2627
    2728// Output files, for activation/deactivation
  • trunk/ppSub/src/ppSubReadoutInverse.c

    r23763 r24155  
    77
    88#include "ppSub.h"
    9 
    109
    1110bool ppSubReadoutInverse(pmConfig *config)
     
    2423    invRO->data_exists = invRO->parent->data_exists = invRO->parent->parent->data_exists = true;
    2524
    26     pmConceptsCopyFPA(invRO->parent->parent->parent, outRO->parent->parent->parent, true, true);
     25    pmChip *outChip = outRO->parent->parent;       // Output chip
     26    pmFPA *outFPA = outChip->parent;               // Output FPA
     27    pmFPA *invFPA = invRO->parent->parent->parent; // Inverse FPA
     28
     29    pmConceptsCopyFPA(invFPA, outFPA, true, true);
     30
     31#if 0
     32    // Copy astrometry over
     33    pmHDU *outHDU = outFPA->hdu;          // Output HDU
     34    pmChip *invChip = invRO->parent->parent; // Inverse chip
     35    psFree(view);
     36    if (!outHDU || !inHDU) {
     37        psError(PS_ERR_UNKNOWN, false, "Unable to find HDU at FPA level to copy astrometry.");
     38        return false;
     39    }
     40    if (!pmAstromReadWCS(invFPA, invChip, outHDU->header, 1.0)) {
     41        psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry from PPSUB.OUTPUT.");
     42        return false;
     43    }
     44#endif
     45    pmHDU *invHDU = invFPA->hdu;          // Inverse HDU
     46    if (!pmAstromWriteWCS(invHDU->header, outFPA, outChip, WCS_TOLERANCE)) {
     47        psError(PS_ERR_UNKNOWN, false, "Unable to write WCS astrometry to PPSUB.INVERSE.");
     48        return false;
     49    }
    2750
    2851    return true;
  • trunk/ppSub/src/ppSubReadoutSubtract.c

    r23740 r24155  
    2020
    2121#include "ppSub.h"
    22 
    23 #define WCS_TOLERANCE 0.001             // Tolerance for WCS
    2422
    2523bool ppSubReadoutSubtract(pmConfig *config)
Note: See TracChangeset for help on using the changeset viewer.