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/psphotChoosePSF.c

    r18323 r18555  
    88    psTimerStart ("psphot");
    99
    10     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    11     psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     10    // bit-masks to test for good/bad pixels
     11    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT");
    1212    assert (maskVal);
    1313
    14     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    15     psMaskType mark = psMetadataLookupU8(&status, recipe, "MASK.MARK"); // Mask value for bad pixels
    16     assert (mark);
     14    // bit-mask to mark pixels not used in analysis
     15    psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT");
     16    assert (markVal);
     17
     18    // maskVal is used to test for rejected pixels, and must include markVal
     19    maskVal |= markVal;
    1720
    1821    // examine PSF sources in S/N order (brightest first)
     
    147150    for (int i = 0; i < modelNames->n; i++) {
    148151        char *modelName = modelNames->data[i];
    149         pmPSFtry *try = pmPSFtryModel (stars, modelName, options, maskVal, mark); // Attempt at fit
     152        pmPSFtry *try = pmPSFtryModel (stars, modelName, options, maskVal, markVal); // Attempt at fit
    150153        if (!try) {
    151154            // No big deal --- we'll try another model
     
    321324            // use pmModelSub because modelFlux has not been generated
    322325            assert (source->maskObj);
    323             psImageKeepCircle (source->maskObj, x, y, options->radius, "OR", PM_MASK_MARK);
     326            psImageKeepCircle (source->maskObj, x, y, options->radius, "OR", markVal);
    324327            pmModelSub (source->pixels, source->maskObj, source->modelPSF, PM_MODEL_OP_FULL, maskVal);
    325             psImageKeepCircle (source->maskObj, x, y, options->radius, "AND", PS_NOT_U8(PM_MASK_MARK));
     328            psImageKeepCircle (source->maskObj, x, y, options->radius, "AND", PS_NOT_U8(markVal));
    326329        }
    327330
Note: See TracChangeset for help on using the changeset viewer.