IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21010


Ignore:
Timestamp:
Dec 15, 2008, 4:38:23 PM (17 years ago)
Author:
Paul Price
Message:

Get WCS into both image and source list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubReadout.c

    r20993 r21010  
    456456    outRO->data_exists = outCell->data_exists = outCell->parent->data_exists = true;
    457457
     458    // Copy astrometry over
     459    // It should get into the output images and photometry
     460    pmFPA *refFPA = refRO->parent->parent->parent; // Reference FPA
     461    pmHDU *refHDU = refFPA->hdu;        // Reference HDU
     462    if (!outHDU || !refHDU) {
     463        psWarning("Unable to find HDU at FPA level to copy astrometry.");
     464    } else if (!pmAstromReadWCS(outFPA, outCell->parent, refHDU->header, 1.0)) {
     465        psWarning("Unable to read WCS astrometry from reference FPA.");
     466        psErrorClear();
     467    } else if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) {
     468        psWarning("Unable to write WCS astrometry to output FPA.");
     469        psErrorClear();
     470    }
     471
    458472#if 0
    459473    pmReadoutMaskApply(outRO, maskBad);
     
    538552        // The PSF should already be stored for the readout
    539553        pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT");
    540         pmFPACopy(photFile->fpa, outRO->parent->parent->parent);
     554        pmFPACopy(photFile->fpa, outFPA);
    541555
    542556        pmReadout *psfRO = pmFPAfileThisReadout(config->files, view, "PSPHOT.PSF.LOAD");
     
    663677    }
    664678
    665     // Copy astrometry over
    666     pmFPA *refFPA = refRO->parent->parent->parent; // Reference FPA
    667     pmHDU *refHDU = refFPA->hdu;        // Reference HDU
    668     if (!outHDU || !refHDU) {
    669         psWarning("Unable to find HDU at FPA level to copy astrometry.");
    670     } else {
    671         if (!pmAstromReadWCS(outFPA, outCell->parent, refHDU->header, 1.0)) {
    672             psWarning("Unable to read WCS astrometry from reference FPA.");
    673             psErrorClear();
    674         } else if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) {
    675             psWarning("Unable to write WCS astrometry to output FPA.");
    676             psErrorClear();
    677         }
     679    if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) {
     680        psWarning("Unable to write WCS astrometry to output FPA.");
     681        psErrorClear();
    678682    }
    679683
Note: See TracChangeset for help on using the changeset viewer.