IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19565


Ignore:
Timestamp:
Sep 15, 2008, 3:28:49 PM (18 years ago)
Author:
Paul Price
Message:

Wrong sense of mask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r19548 r19565  
    844844    float totExposure = 0.0;            // Total exposure time
    845845    for (int i = 0; i < num; i++) {
    846         if (!inputMask->data.U8[i]) {
     846        if (inputMask->data.U8[i]) {
    847847            continue;
    848848        }
     
    854854            // Copy astrometry over
    855855            wcsDone = true;
    856             if (inRO) {
    857                 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU
    858                 pmHDU *outHDU = pmHDUFromCell(outRO->parent); // Output HDU
    859                 pmChip *outChip = outRO->parent->parent; // Output chip
    860                 pmFPA *outFPA = outChip->parent; // Output FPA
    861                 if (!outHDU || !inHDU) {
    862                     psWarning("Unable to find HDU at FPA level to copy astrometry.");
     856            pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU
     857            pmHDU *outHDU = pmHDUFromCell(outRO->parent); // Output HDU
     858            pmChip *outChip = outRO->parent->parent; // Output chip
     859            pmFPA *outFPA = outChip->parent; // Output FPA
     860            if (!outHDU || !inHDU) {
     861                psWarning("Unable to find HDU at FPA level to copy astrometry.");
     862            } else {
     863                if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {
     864                    psErrorClear();
     865                    psWarning("Unable to read WCS astrometry from input FPA.");
     866                    wcsDone = false;
    863867                } else {
    864                     if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {
     868                    if (!outHDU->header) {
     869                        outHDU->header = psMetadataAlloc();
     870                    }
     871                    if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {
    865872                        psErrorClear();
    866                         psWarning("Unable to read WCS astrometry from input FPA.");
     873                        psWarning("Unable to write WCS astrometry to output FPA.");
    867874                        wcsDone = false;
    868                     } else {
    869                         if (!outHDU->header) {
    870                             outHDU->header = psMetadataAlloc();
    871                         }
    872                         if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {
    873                             psErrorClear();
    874                             psWarning("Unable to write WCS astrometry to output FPA.");
    875                             wcsDone = false;
    876                         }
    877875                    }
    878876                }
Note: See TracChangeset for help on using the changeset viewer.