IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28903


Ignore:
Timestamp:
Aug 12, 2010, 8:21:54 AM (16 years ago)
Author:
eugene
Message:

nan the masked pixels in the output images (something wrong with the masks)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/ppSub/src/ppSubReadoutSubtract.c

    r28006 r28903  
    5151    outRO->variance = (psImage*)psBinaryOp(outRO->variance, minuend->variance, "+", subtrahend->variance);
    5252
     53    // NAN the masked pixels in the diff image (pixels masked in A are not yet NAN'ed in B)
     54    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config) | pmConfigMaskGet("BLANK", config); // Bits to mask in inputs
     55    for (int iy = 0; iy < outRO->image->numRows; iy++) {
     56        for (int ix = 0; ix < outRO->image->numCols; ix++) {
     57            if ((outRO->mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal) == 0) continue;
     58            outRO->image->data.F32[iy][ix] = NAN;
     59        }
     60    }
     61
    5362    // Measure the variance scales
    5463    psStats *varStats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for variance images
    5564    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS);           // Random number generator
    56     psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config) |
    57         pmConfigMaskGet("BLANK", config); // Bits to mask in inputs
    5865    psImageBackground(varStats, NULL, minuend->variance, minuend->mask, maskVal, rng);
    5966    float minuendVar = varStats->robustMedian; // Mean variance for minuend
Note: See TracChangeset for help on using the changeset viewer.