Changeset 14867 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Sep 17, 2007, 10:58:53 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r14824 r14867 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.6 0$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-09-1 2 20:21:41$6 * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-09-17 20:58:53 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 360 360 static void convolveFFT(psImage *target,// Place the result in here 361 361 const psImage *image, // Image to convolve 362 const psImage *mask, // Mask image 362 363 const psKernel *kernel, // Kernel by which to convolve 363 364 psRegion region,// Region of interest … … 371 372 // Casting away const so psImageSubset can add the child 372 373 psImage *subImage = psImageSubset((psImage*)image, border); // Subimage to convolve 373 psImage *convolved = psImageConvolveFFT(subImage, kernel, 0.0); // Convolution 374 psImage *subMask = psImageSubset((psImage*)mask, border); // Subimage mask 375 psImage *convolved = psImageConvolveFFT(subImage, subMask, PM_SUBTRACTION_MASK_REF, 376 kernel, 0.0); // Convolution 374 377 psFree(subImage); 375 378 376 379 // Now, we have to chop off the borders, and stick it in where it belongs 377 psImage *subConv = psImageSubset(convolved, psRegionSet(size, -size, 378 size, -size)); // Cut off the edges 380 psImage *subConv = psImageSubset(convolved, psRegionSet(size, -size, size, -size)); // Cut off the edges 379 381 psImage *subTarget = psImageSubset(target, region); // Target for this subregion 380 382 if (background != 0.0) { … … 443 445 PS_ASSERT_KERNEL_NON_NULL(kernel, NULL); 444 446 445 psImage *conv = psImageConvolveFFT(image->image, kernel, 0.0); // Convolved image447 psImage *conv = psImageConvolveFFT(image->image, NULL, 0, kernel, 0.0); // Convolved image 446 448 int x0 = - image->xMin, y0 = - image->yMin; // Position of centre of convolved image 447 449 psKernel *convolved = psKernelAllocFromImage(conv, x0, y0); // Kernel version … … 1116 1118 // Use Fast Fourier Transform to do the convolution 1117 1119 // This provides a big speed-up for large kernels 1118 convolveFFT(convImage, inImage, kernelImage, psRegionSet(i, xSubMax, j, ySubMax),1120 convolveFFT(convImage, inImage, subMask, kernelImage, psRegionSet(i, xSubMax, j, ySubMax), 1119 1121 background, size); 1120 1122 if (inWeight) { 1121 convolveFFT(convWeight, inWeight, kernelWeight, psRegionSet(i, xSubMax, j, ySubMax),1122 0.0, size);1123 convolveFFT(convWeight, inWeight, subMask, kernelWeight, 1124 psRegionSet(i, xSubMax, j, ySubMax), 0.0, size); 1123 1125 } 1124 1126 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
