IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10295


Ignore:
Timestamp:
Nov 29, 2006, 1:32:49 PM (19 years ago)
Author:
rhl
Message:

Don't find negative peaks

File:
1 edited

Legend:

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

    r10175 r10295  
    4040        for (int i = 0; i < smooth_im->numCols; i++) {
    4141            value = smooth_im->data.F32[j][i];
    42             smooth_im->data.F32[j][i] = 0.0;
    43             if (mask->data.U8[j][i]) continue;
    44             if (smooth_wt->data.F32[j][i] <= 0) continue;
    45             smooth_im->data.F32[j][i] = PS_SQR(value) / smooth_wt->data.F32[j][i];
     42            if (value < 0 || smooth_wt->data.F32[j][i] <= 0 || mask->data.U8[j][i]) {
     43                smooth_im->data.F32[j][i] = 0.0;
     44            } else {
     45                smooth_im->data.F32[j][i] = PS_SQR(value) / smooth_wt->data.F32[j][i];
     46            }
    4647        }
    4748    }
Note: See TracChangeset for help on using the changeset viewer.