Changeset 18163 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Jun 17, 2008, 12:16:38 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r18043 r18163 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.9 3$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-06-1 0 02:43:01$6 * @version $Revision: 1.94 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-06-17 22:16:38 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 627 627 } 628 628 629 630 float pmSubtractionVarianceFactor(const pmSubtractionKernels *kernels, float x, float y, bool wantDual) 631 { 632 PM_ASSERT_SUBTRACTION_KERNELS_NON_NULL(kernels, NAN); 633 PM_ASSERT_SUBTRACTION_KERNELS_SOLUTION(kernels, NAN); 634 PS_ASSERT_FLOAT_WITHIN_RANGE(x, -1.0, 1.0, NAN); 635 PS_ASSERT_FLOAT_WITHIN_RANGE(y, -1.0, 1.0, NAN); 636 637 // Precalulate polynomial values 638 psImage *polyValues = p_pmSubtractionPolynomial(NULL, kernels->spatialOrder, x, y); 639 640 psKernel *kernel = solvedKernel(NULL, kernels, polyValues, wantDual); // The appropriate kernel 641 psFree(polyValues); 642 643 double sumKernel2 = 0.0; // Sum of the kernel squared 644 for (int y = kernel->yMin; y <= kernel->yMax; y++) { 645 for (int x = kernel->xMin; x <= kernel->xMax; x++) { 646 sumKernel2 += PS_SQR(kernel->kernel[y][x]); 647 } 648 } 649 650 psFree(kernel); 651 652 return sumKernel2; 653 } 654 629 655 #if 0 630 656 psArray *pmSubtractionKernelSolutions(const pmSubtractionKernels *kernels, float x, float y, bool wantDual)
Note:
See TracChangeset
for help on using the changeset viewer.
