IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 15, 2008, 10:25:50 AM (18 years ago)
Author:
eugene
Message:

re-org and cleanup of the mask bits to make it consistent with the pmConfigMaskSetBits concepts; ensure mark and mask are correctly used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceStats.c

    r18241 r18555  
    99    psTimerStart ("psphot");
    1010
    11     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    12     psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     11    // bit-masks to test for good/bad pixels
     12    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT");
    1313    assert (maskVal);
    1414
    15     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    16     psMaskType mark = psMetadataLookupU8(&status, recipe, "MASK.MARK"); // Mask value for bad pixels
    17     assert (mark);
     15    // bit-mask to mark pixels not used in analysis
     16    psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT");
     17    assert (markVal);
     18
     19    // maskVal is used to test for rejected pixels, and must include markVal
     20    maskVal |= markVal;
    1821
    1922    // determine properties (sky, moments) of initial sources
     
    6770        // measure a local sky value
    6871        // the local sky is now ignored; kept here for reference only
    69         status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
     72        status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, markVal);
    7073        if (!status) {
    7174          psFree (source);
     
    7780        // measure the local sky variance (needed if noise is not sqrt(signal))
    7881        // XXX EAM : this should use ROBUST not SAMPLE median, but it is broken
    79         status = pmSourceLocalSkyVariance (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
     82        status = pmSourceLocalSkyVariance (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, markVal);
    8083        if (!status) {
    8184          psFree (source);
Note: See TracChangeset for help on using the changeset viewer.