Changeset 7436
- Timestamp:
- Jun 8, 2006, 10:55:52 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFindPeaks.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFindPeaks.c
r6950 r7436 8 8 float SIGMA; 9 9 float threshold; 10 float value; 10 11 11 12 // smooth the image and weight map … … 15 16 NSIGMA = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 16 17 18 // XXX we are somewhat doing the wrong thing here with the mask. 19 // it would be better to smooth the image using the mask information 17 20 psImage *smooth_im = psImageCopy (NULL, readout->image, PS_TYPE_F32); 18 21 psImageSmooth (smooth_im, SIGMA, NSIGMA); … … 23 26 psLogMsg ("psphot", 4, "smooth weight: %f sec\n", psTimerMark ("psphot")); 24 27 28 psImage *mask = readout->mask; 29 25 30 // psphotSaveImage (NULL, smooth_im, "imsmooth.fits"); 26 31 // psphotSaveImage (NULL, smooth_wt, "wtsmooth.fits"); … … 29 34 for (int j = 0; j < smooth_im->numRows; j++) { 30 35 for (int i = 0; i < smooth_im->numCols; i++) { 36 value = smooth_im->data.F32[j][i]; 37 smooth_im->data.F32[j][i] = 0.0; 38 if (mask->data.U8[j][i]) continue; 31 39 if (smooth_wt->data.F32[j][i] <= 0) continue; 32 smooth_im->data.F32[j][i] = PS_SQR( smooth_im->data.F32[j][i]) / smooth_wt->data.F32[j][i];40 smooth_im->data.F32[j][i] = PS_SQR(value) / smooth_wt->data.F32[j][i]; 33 41 } 34 42 }
Note:
See TracChangeset
for help on using the changeset viewer.
