IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 26, 2010, 9:18:39 AM (16 years ago)
Author:
Serge CHASTEL
Message:

Merging trunk in branch

Location:
branches/sc_branches/trunkTest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/sc_branches/trunkTest

  • branches/sc_branches/trunkTest/ppSub/src/ppSubBackground.c

    r26982 r29060  
    6767    for (int y = 0; y < numRows; y++) {
    6868        for (int x = 0; x < numCols; x++) {
     69            // special case 1: NAN the masked pixels
    6970            if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskBad) {
    70                 image->data.F32[y][x] = 0.0;
    71             } else {
    72                 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value
    73                 if (!isfinite(value)) {
    74                     image->data.F32[y][x] = NAN;
    75                     mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad;
    76                 } else {
    77                     image->data.F32[y][x] -= value;
    78                 }
    79             }
     71                image->data.F32[y][x] = NAN;
     72                continue;
     73            }
     74            // special case 1: NAN & mask pixels without a valid background model
     75            float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value
     76            if (!isfinite(value)) {
     77              image->data.F32[y][x] = NAN;
     78              mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskBad;
     79              continue;
     80            }
     81            image->data.F32[y][x] -= value;
    8082        }
    8183    }
Note: See TracChangeset for help on using the changeset viewer.