Changeset 30219
- Timestamp:
- Jan 7, 2011, 1:53:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotEfficiency.c
r29936 r30219 31 31 assert(covarFactor); 32 32 33 // apply the amplitude of kernel^2 to the covarFactor (why?) 34 // XXX this is simply undoing the scale scalculate in psImageCovarianceCalculateFactor 35 // if this is the right solution, make this extra calculation optional (and explain...) 33 36 psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing 34 *covarFactor = psImageCovarianceCalculateFactor(kernel, ro->covariance); 37 double sum2 = 0.0; // Sum of kernel squared 38 for (int y = kernel->yMin; y <= kernel->yMax; y++) { 39 for (int x = kernel->xMin; x <= kernel->xMax; x++) { 40 sum2 += PS_SQR(kernel->kernel[y][x]); 41 } 42 } 43 *covarFactor = sum2 * psImageCovarianceCalculateFactor(kernel, ro->covariance); 35 44 psFree(kernel); 36 45 … … 70 79 float fluxLim = 2.0 * *norm * peakLim; // Limiting flux in original 71 80 *magLim = -2.5 * log10f(fluxLim); 81 psTrace("psphot.fake", 1, "Covar Factor: %f\n", *covarFactor); 72 82 psTrace("psphot.fake", 1, "Limiting peak: %f\n", peakLim); 73 83 psTrace("psphot.fake", 1, "Limiting flux: %f\n", fluxLim);
Note:
See TracChangeset
for help on using the changeset viewer.
