Changeset 20463
- Timestamp:
- Oct 29, 2008, 10:46:15 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSignificanceImage.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSignificanceImage.c
r20453 r20463 12 12 // smooth the image and weight map 13 13 psTimerStart ("psphot.smooth"); 14 psImageConvolveSetThreads(true); 14 15 15 16 // XXX we can a) choose fft to convolve if needed and b) multithread fftw … … 44 45 // smooth the image, applying the mask as we go 45 46 psImage *smooth_im = psImageCopy(NULL, readout->image, PS_TYPE_F32); 46 psImageSmoothMask (smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss);47 psImageSmoothMask_Threaded(smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss); 47 48 psLogMsg("psphot", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("psphot.smooth")); 48 49 … … 55 56 // effective per-pixel variance is maintained. 56 57 psImage *smooth_wt = psImageCopy(NULL, readout->weight, PS_TYPE_F32); 57 psImageSmoothMask (smooth_wt, smooth_wt, readout->mask, maskVal, SIGMA_SMTH * M_SQRT1_2,58 psImageSmoothMask_Threaded(smooth_wt, smooth_wt, readout->mask, maskVal, SIGMA_SMTH * M_SQRT1_2, 58 59 NSIGMA_SMTH, minGauss); 59 60 psLogMsg("psphot", PS_LOG_MINUTIA, "smooth weight: %f sec\n", psTimerMark("psphot.smooth")); … … 130 131 } 131 132 133 # if (0) 134 { 135 // threadingdemo 136 // smooth the image, applying the mask as we go 137 psImage *smooth_im = psImageCopy(NULL, readout->image, PS_TYPE_F32); 138 psImageSmoothMask(smooth_im, smooth_im, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss); 139 140 psLogMsg("psphot", PS_LOG_INFO, "smooth image: %f sec\n", psTimerMark("psphot.smooth")); 141 142 psImageConvolveSetThreads(true); 143 144 psTimerStart ("psphot.smooth"); 145 146 // XXX a quick test of the threaded version of the function: 147 psImage *smooth_test = psImageCopy(NULL, readout->image, PS_TYPE_F32); 148 psImageSmoothMask_Threaded(smooth_test, smooth_test, readout->mask, maskVal, SIGMA_SMTH, NSIGMA_SMTH, minGauss); 149 150 psLogMsg("psphot", PS_LOG_INFO, "smooth_threaded image: %f sec\n", psTimerMark("psphot.smooth")); 151 152 psphotSaveImage (NULL, smooth_im, "smooth_im.fits"); 153 psphotSaveImage (NULL, smooth_test, "smooth_test.fits"); 154 exit (0); 155 } 156 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
