IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36717


Ignore:
Timestamp:
May 1, 2014, 4:02:29 PM (12 years ago)
Author:
mhuber
Message:

adhoc extra blank masking of final stack border, default is 0 pixels

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/gpc1/ppStack.config

    r36710 r36717  
    173173    COMBINE.DISCARD F32     0.2             # Discard fraction for Olympic weighted mean
    174174    IMAGE.REJ       F32     0.1             # Rejected pixel fraction threshold for rejecting entire image
    175     NMINPIX         S32     10              # Minimum input per pixel -- testing
     175    NMINPIX         S32     30              # Minimum input per pixel
    176176    MASK.VAL        STR     SUSPECT,MASK.VALUE,CONV.BAD,GHOST # Mask value of input bad pixels
     177    MASK.BLANKBORDER S32    20              # Mask blank border in final stack output
    177178END
    178179
  • trunk/ippconfig/recipes/ppStack.config

    r36710 r36717  
    1313MASK.BAD        STR     BLANK           # Mask value to give bad pixels
    1414MASK.POOR       STR     CONV.POOR       # Mask value to give poor pixels
     15MASK.BLANKBORDER S32    0               # Mask blank border in final stack output (may want to set KERNEL.SIZE)
    1516
    1617# we are in some danger of inconsistency in the definition of a 'bad' vs a 'suspect' pixel
     
    3233TARGET.FRAC     F32     0.1             # Minimum flux fraction for target PSF
    3334TARGET.MINMAG   F32     3.0             # Minimum magnitude difference to tolerate in stamp
    34 NMINPIX         S32     1               # Minimum input per pixel -- testing
     35NMINPIX         S32     1               # Minimum input per pixel
    3536
    3637BACKGROUND.MODEL    BOOL   FALSE        # Construct a stacked version of the warp stage background
  • trunk/ppStack/src/ppStackCombineFinal.c

    r33093 r36717  
    33// This is the doomsday switch.
    44// #define TESTING                         // Enable test output
     5
     6//MEH -- adhoc addition to blank mask border of final stack since rejection different/none on order of KERNEL.SIZE with overlap in CombineInitial
     7static void stackBorderMask(psImage *image, // Image to mark as blank
     8                            psImage *mask, // Mask to mark as blank (or NULL)
     9                            psImage *variance, // Weight map to mark as blank (or NULL)
     10                            int numCols, int numRows, // Size of image
     11                            int size, // Size to mark blank
     12                            psImageMaskType blank // Blank mask value
     13    )
     14{
     15    for (int y = size; y < numRows - size; y++) {
     16        for (int x = 0; x < size; x++) {
     17            image->data.F32[y][x] = NAN;
     18            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
     19            variance->data.F32[y][x] = NAN;
     20        }
     21        for (int x = numCols - size; x < numCols; x++) {
     22            image->data.F32[y][x] = NAN;
     23            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
     24            variance->data.F32[y][x] = NAN;
     25        }
     26    }
     27    for (int y = 0; y < size; y++) {
     28        for (int x = 0; x < numCols; x++) {
     29            image->data.F32[y][x] = NAN;
     30            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
     31            variance->data.F32[y][x] = NAN;
     32        }
     33    }
     34    for (int y = numRows - size; y < numRows; y++) {
     35        for (int x = 0; x < numCols; x++) {
     36            image->data.F32[y][x] = NAN;
     37            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
     38            variance->data.F32[y][x] = NAN;
     39        }
     40    }
     41    return;
     42}
     43
    544
    645bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options,
     
    2059    psAssert(recipe, "We've thrown an error on this before.");
    2160    float poorFrac = psMetadataLookupF32(NULL, recipe, "POOR.FRACTION"); // Fraction for "poor"
     61
     62    int sizeBlank = psMetadataLookupS32(NULL, recipe, "MASK.BLANKBORDER"); // Pixels to mask BLANK from edge
     63    psImageMaskType maskBlank = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels
    2264
    2365    // Grow the list of rejected pixels, if desired
     
    109151#endif
    110152
     153    //MEH blank mask/manual reject border on final stack --
     154    if (sizeBlank > 0) {
     155        stackBorderMask(outRO->image,outRO->mask,outRO->variance,numCols,numRows,sizeBlank,maskBlank);
     156        stackBorderMask(expRO->image,expRO->mask,expRO->variance,numCols,numRows,sizeBlank,0);
     157    }
     158
    111159    if (options->stats) {
    112160        // only add the timer if it has not been set (convolved stack)
Note: See TracChangeset for help on using the changeset viewer.