IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2012, 4:32:00 PM (14 years ago)
Author:
bills
Message:

if the cell continuity correction was applied add the pattern image rather
than subtracting it. The sign is reversed from the old pattern cell correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppBackground/src/ppBackgroundRestore.c

    r28300 r34298  
    5959        psImage *patternImage = patternRO->image; // Image with pattern
    6060        psImage *patternMask = patternRO->mask;   // Mask for pattern
     61        // The sign is flipped for the continuity correction.
     62        bool mdok;
     63        bool isContinuity = psMetadataLookupBool(&mdok, pattern->hdu->header, "PTRN_CON");
     64       
    6165        for (int y = 0; y < numRows; y++) {
    6266            for (int x = 0; x < numCols; x++) {
    63                 image->data.F32[y][x] -= patternImage->data.F32[y][x];
     67                if (isContinuity) {
     68                    image->data.F32[y][x] += patternImage->data.F32[y][x];
     69                } else {
     70                    image->data.F32[y][x] -= patternImage->data.F32[y][x];
     71                }
    6472                mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= patternMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x];
    6573            }
Note: See TracChangeset for help on using the changeset viewer.