Changeset 35633
- Timestamp:
- Jun 5, 2013, 11:26:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/psphot/src/psphotKronIterate.c
r34560 r35633 166 166 } 167 167 168 fprintf (stderr, "--- starting KRON ---\n"); 169 168 170 // We measure the Kron Radius on a smoothed copy of the readout image 169 171 psImage *smoothedImage = NULL; 170 172 if (KRON_SMOOTH) { 173 psTimerStart ("psphot.kron.smooth"); 174 171 175 // Build the smoothed source image 172 176 // Replace the subtracted sources 173 177 psphotReplaceAllSourcesReadout(config, view, filerule, index, recipe, false); 178 psLogMsg ("psphot.kron", PS_LOG_INFO, "replaced %ld raw sources %f sec\n", sources->n, psTimerMark ("psphot.kron.smooth")); 179 180 // smoothedImage = psImageCopy(NULL, readout->image, PS_TYPE_F32); 181 // psImageSmooth(smoothedImage, KRON_SMOOTH_SIGMA, KRON_SMOOTH_NSIGMA); 182 174 183 // Copy the image and smooth 175 184 psTimerStart ("psphot.kron.smooth"); 176 smoothedImage = psImageCopy(NULL, readout->image, PS_TYPE_F32); 177 psImageSmooth(smoothedImage, KRON_SMOOTH_SIGMA, KRON_SMOOTH_NSIGMA); 185 bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve 186 smoothedImage = psImageSmoothNoMask_Threaded (NULL, readout->image, KRON_SMOOTH_SIGMA, KRON_SMOOTH_NSIGMA, 0.25); 187 psImageConvolveSetThreads(oldThreads); 178 188 psLogMsg ("psphot.kron", PS_LOG_INFO, "smoothed image %f sec\n", psTimerMark ("psphot.kron.smooth")); 179 189 180 190 // remove the sources 191 psTimerStart ("psphot.kron.smooth"); 181 192 psphotRemoveAllSourcesReadout( config, view, filerule, index, recipe, false ); 193 psLogMsg ("psphot.kron", PS_LOG_INFO, "removed %ld raw sources %f sec\n", sources->n, psTimerMark ("psphot.kron.smooth")); 194 182 195 // Now subtract smooth versions of the sources from the smoothed image 183 196 psTimerStart ("psphot.kron.smooth.sources");
Note:
See TracChangeset
for help on using the changeset viewer.
