IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

re-organization of the named mask bit handling: pmConfigMaskSetBits now assigns the bits to names and make the recipe consistent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r18364 r18554  
    123123    psTrace ("psModules.detrend", 3, "suspect: %f +/- %f\n", median, stdev);
    124124
     125    // XXX this loop could result in pixels with suspect = 0.0 but no valid input pixels (all
     126    // masked).  need to track the number of good as well as suspect pixels?
    125127    for (int y = 0; y < image->numRows; y++) {
    126128        for (int x = 0; x < image->numCols; x++) {
    127             if (fabs((image->data.F32[y][x] - median) / stdev) >= rej &&
    128                 (!mask || !(mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal))) {
    129                 suspect->data.F32[y][x] += 1.0;
    130             }
     129            if (fabs((image->data.F32[y][x] - median) / stdev) < rej) continue;
     130            if (mask && (mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal)) continue;
     131            suspect->data.F32[y][x] += 1.0;
    131132        }
    132133    }
     
    140141}
    141142
     143// the maskVal supplied here is the value SET for this mask (ie, it is not used to avoid pixels)
    142144bool pmMaskIdentifyBadPixels(pmReadout *output, psMaskType maskVal, float thresh, pmMaskIdentifyMode mode)
    143145{
Note: See TracChangeset for help on using the changeset viewer.