IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21183 for trunk/ppImage/src


Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

Location:
trunk/ppImage/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImage.h

    r20774 r21183  
    5858
    5959    // make values for abstract concepts of masking
    60     psMaskType maskValue;               // apply this bit-mask to choose masked bits
    61     psMaskType markValue;               // apply this bit-mask to choose masked bits
    62     psMaskType satMask;                 // Mask value to give saturated pixels
    63     psMaskType badMask;                 // Mask value to give bad pixels
    64     psMaskType flatMask;                // Mask value to give bad flat pixels
    65     psMaskType blankMask;               // Mask value to give blank pixels
     60    psImageMaskType maskValue;               // apply this bit-mask to choose masked bits
     61    psImageMaskType markValue;               // apply this bit-mask to choose masked bits
     62    psImageMaskType satMask;                 // Mask value to give saturated pixels
     63    psImageMaskType badMask;                 // Mask value to give bad pixels
     64    psImageMaskType flatMask;                // Mask value to give bad flat pixels
     65    psImageMaskType blankMask;               // Mask value to give blank pixels
    6666
    6767    // non-linear correction parameters
  • trunk/ppImage/src/ppImageCleanup.c

    r19928 r21183  
    2323    // fprintf (stderr, "Found %d leaks at %s\n", Nleaks, "ppImage");
    2424
    25     fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage");
     25    // fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage");
     26    fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppImage");
    2627
    2728    return;
  • trunk/ppImage/src/ppImageLoop.c

    r20771 r21183  
    126126        }
    127127
    128         // measure various statistics for this image
     128        // measure various pixel-based statistics for this image
    129129        if (!ppImagePixelStats(config, stats, options, view)) {
    130             ESCAPE("Unable to measures stats for image");
     130            ESCAPE("Unable to measures pixel stats for image");
    131131        }
    132132        if (!ppImageMosaicChip(config, options, view, "PPIMAGE.CHIP", "PPIMAGE.OUTPUT")) {
     
    209209    }
    210210
    211     // Write out summary statistics
     211    // Calculate summary statistics from FPA Metadata
    212212    if (!ppImageMetadataStats(config, stats, options)) {
    213         ESCAPE("Unable to write statistics file.");
     213        ESCAPE("Unable to determine FPA-level metadata statistics.");
    214214    }
    215215
     
    218218        ESCAPE("save failure for FPA");
    219219    }
    220 
    221220    psFree(view);
    222221
     
    230229        }
    231230    }
     231    psFree (stats);
    232232
    233233    return true;
  • trunk/ppImage/src/ppImageReplaceBackground.c

    r20863 r21183  
    3030    // XXX Should this be options->maskValue or options->maskValue & ~options->satMask?
    3131    //     The latter will leave saturated pixels high
    32     psMaskType maskVal = options->maskValue;
     32    psImageMaskType maskVal = options->maskValue;
    3333
    3434    // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    35     psMetadataAddU8(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal);
     35    psMetadataAddImageMask(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal);
    3636
    3737    // Since we are working on a chip-mosaicked image, there should only be a single cell and readout
     
    146146            if (!isfinite(value)) {
    147147                image->data.F32[y][x] = NAN;
    148                 mask->data.PS_TYPE_MASK_DATA[y][x] |= options->badMask;
     148                mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask;
    149149            } else {
    150150                image->data.F32[y][x] -= value;
     
    157157    for (int y = 0; y < numRows; y++) {
    158158        for (int x = 0; x < numCols; x++) {
    159             if (mask && mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal) {
     159            if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) {
    160160                image->data.F32[y][x] = 0.0;
    161161            } else {
     
    163163                if (!isfinite(value)) {
    164164                    image->data.F32[y][x] = NAN;
    165                     mask->data.PS_TYPE_MASK_DATA[y][x] |= options->badMask;
     165                    mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask;
    166166                } else {
    167167                    image->data.F32[y][x] -= value;
  • trunk/ppImage/src/ppImageSetMaskBits.c

    r18556 r21183  
    3838
    3939    // set maskValue and markValue in the psphot recipe
    40     psMetadataAddU8 (recipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->maskValue);
    41     psMetadataAddU8 (recipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->markValue);
     40    psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->maskValue);
     41    psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->markValue);
    4242
    4343    return true;
Note: See TracChangeset for help on using the changeset viewer.