IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24910


Ignore:
Timestamp:
Jul 22, 2009, 10:51:48 PM (17 years ago)
Author:
eugene
Message:

if fringe master has NAN values, mask them in the defringed image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageDetrendFringe.c

    r24838 r24910  
    192192    }
    193193    assert(fringes->readouts->n == solution->nFringeFrames);
     194
     195    psImageMaskType maskVal = options->flatMask;
    194196
    195197    bool mdok;                          // Status of MD lookup
     
    257259        }
    258260
     261        // subtract fringe and update mask if fringe value is NAN
     262        for (int iy = 0; iy < readout->image->numRows; iy++) {
     263            for (int ix = 0; ix < readout->image->numCols; ix++) {
     264                readout->mask->data.F32[iy][ix] -= sumFringe->data.F32[iy][ix];
     265                if (!isfinite(sumFringe->data.F32[iy][ix]) && readout->mask) {
     266                    readout->mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] |= maskVal;
     267                }
     268            }
     269        }
     270
    259271        // XXX: Make generic, so subregions may be subtracted as well
    260         if (!psBinaryOp(readout->image, readout->image, "-", sumFringe)) {
    261             psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to subtract fringe.\n");
    262             return false;
    263         }
     272        // if (!psBinaryOp(readout->image, readout->image, "-", sumFringe)) {
     273        //     psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to subtract fringe.\n");
     274        //     return false;
     275        // }
    264276
    265277        // measure residual fringe amplitude. results go to FRINGE.RESIDUALS
Note: See TracChangeset for help on using the changeset viewer.