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

    r17396 r18555  
    1212    pmSourceFitMode fitMode;
    1313
    14     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    15     psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
    16     psMaskType mark    = psMetadataLookupU8(&status, recipe, "MASK.MARK"); // Mask value for bad pixels
     14    // bit-masks to test for good/bad pixels
     15    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT");
    1716    assert (maskVal);
    18     assert (mark);
     17
     18    // bit-mask to mark pixels not used in analysis
     19    psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT");
     20    assert (markVal);
     21
     22    // maskVal is used to test for rejected pixels, and must include markVal
     23    maskVal |= markVal;
    1924
    2025    // run model fitting tests on a single source?
     
    130135
    131136    // find the local sky
    132     status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
     137    status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, markVal);
    133138    if (!status) psAbort("pmSourceLocalSky error");
    134139
     
    195200
    196201    // define the pixels used for the fit
    197     psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", mark);
     202    psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", markVal);
    198203    psphotSaveImage (NULL, source->maskObj, "mask1.fits");
    199204
     
    213218        assert (status);
    214219
    215         model = psphotPSFConvModel (readout, source, modelType, maskVal, psfSize);
     220        model = psphotPSFConvModel (readout, source, modelType, maskVal, markVal, psfSize);
    216221        params = model->params->data.F32;
    217222    } else {
Note: See TracChangeset for help on using the changeset viewer.