IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2020, 3:29:09 PM (6 years ago)
Author:
tdeboer
Message:

added procedure to remove pixel NaNing

File:
1 edited

Legend:

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

    r31435 r41382  
    3333    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
    3434    bool addPair = psMetadataLookupBool(&mdok, recipe, "ADD.NOT.SUBTRACT"); // add instead of subtracting
     35    bool doApplyMaskNaN = psMetadataLookupBool(&mdok, recipe, "APPLY.PIXELNAN"); // NaN the pixels underneath masks
    3536
    3637    pmFPAview *view = ppSubViewReadout(); // View to readout
     
    7374    // NAN the masked pixels in the diff image (pixels masked in A are not yet NAN'ed in B)
    7475    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config) | pmConfigMaskGet("BLANK", config); // Bits to mask in inputs
    75     for (int iy = 0; iy < outRO->image->numRows; iy++) {
     76    if(doApplyMaskNaN) {
     77      for (int iy = 0; iy < outRO->image->numRows; iy++) {
    7678        for (int ix = 0; ix < outRO->image->numCols; ix++) {
    7779            if ((outRO->mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal) == 0) continue;
    7880            outRO->image->data.F32[iy][ix] = NAN;
    7981        }
     82      }
    8083    }
    8184
Note: See TracChangeset for help on using the changeset viewer.