Changeset 28667 for trunk/psphot/src/psphotSignificanceImage.c
- Timestamp:
- Jul 13, 2010, 2:34:04 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSignificanceImage.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSignificanceImage.c
r26894 r28667 76 76 // Calculate correction factor for the covariance produced by the (potentially multiple) smoothing 77 77 psKernel *kernel = psImageSmoothKernel(SIGMA_SMTH, NSIGMA_SMTH); // Kernel used for smoothing 78 float factor = 1.0 / psImageCovarianceCalculateFactor(kernel, readout->covariance); 78 double sum2 = 0.0; // Sum of kernel squared 79 for (int y = kernel->yMin; y <= kernel->yMax; y++) { 80 for (int x = kernel->xMin; x <= kernel->xMax; x++) { 81 sum2 += PS_SQR(kernel->kernel[y][x]); 82 } 83 } 84 float factor = 1.0 / (sum2 * psImageCovarianceCalculateFactor(kernel, readout->covariance)); 79 85 psFree(kernel); 80 86
Note:
See TracChangeset
for help on using the changeset viewer.
