IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 4, 2005, 5:33:32 AM (21 years ago)
Author:
eugene
Message:

simultaneous PSF fitting, better background, basic deblending

File:
1 edited

Legend:

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

    r5622 r5672  
    8484    // XXX EAM does the mask need to grow?
    8585    float SATURATION = psMetadataLookupF32 (&status, config, "SATURATION");
    86     for (int i = 0; i < image->numRows; i++) {
     86    for (int i = 0; status && (i < image->numRows); i++) {
    8787        for (int j = 0; j < image->numCols; j++) {
    8888            if (image->data.F32[i][j] >= SATURATION) {
    8989                mask->data.U8[i][j] |= PSPHOT_MASK_SATURATED;
     90            }
     91        }
     92    }
     93
     94    // mask the pixels below min threshold
     95    float MIN_VALID = psMetadataLookupF32 (&status, config, "MIN_VALID_PIXEL");
     96    for (int i = 0; status && (i < image->numRows); i++) {
     97        for (int j = 0; j < image->numCols; j++) {
     98            if (image->data.F32[i][j] < MIN_VALID) {
     99                mask->data.U8[i][j] |= PSPHOT_MASK_INVALID;
    90100            }
    91101        }
Note: See TracChangeset for help on using the changeset viewer.