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

    r17288 r18555  
    2525    }
    2626
    27     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    28     psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     27    // bit-masks to test for good/bad pixels
     28    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT");
    2929    assert (maskVal);
    3030
    31     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    32     psMaskType mark = psMetadataLookupU8(&status, recipe, "MASK.MARK"); // Mask value for bad pixels
    33     assert (mark);
     31    // bit-mask to mark pixels not used in analysis
     32    psMaskType markVal = psMetadataLookupU8(&status, recipe, "MARK.PSPHOT");
     33    assert (markVal);
     34
     35    // maskVal is used to test for rejected pixels, and must include markVal
     36    maskVal |= markVal;
    3437
    3538    // S/N limit to perform full non-linear fits
     
    6568    psf->growth = pmGrowthCurveAlloc (PSF_FIT_PAD, 100.0, REF_RADIUS);
    6669
    67     if (!pmGrowthCurveGenerate (readout, psf, IGNORE_GROWTH, maskVal, mark)) {
     70    if (!pmGrowthCurveGenerate (readout, psf, IGNORE_GROWTH, maskVal, markVal)) {
    6871        psError(PSPHOT_ERR_APERTURE, false, "Fitting aperture corrections");
    6972        psFree(psf->growth); psf->growth = NULL;
     
    9295        // get growth-corrected, apTrend-uncorrected magnitudes in scaled apertures
    9396        // will fail if below S/N threshold or model is missing
    94         if (!pmSourceMagnitudes (source, psf, photMode, maskVal, mark)) {
     97        if (!pmSourceMagnitudes (source, psf, photMode, maskVal)) {
    9598            Nskip ++;
    9699            psTrace ("psphot", 3, "skip : bad source mag");
Note: See TracChangeset for help on using the changeset viewer.