Changeset 16423 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Feb 13, 2008, 2:13:09 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r16352 r16423 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.7 7$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-02- 07 04:03:23$6 * @version $Revision: 1.78 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-02-14 00:13:09 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 715 715 716 716 int numCols = ro1->image->numCols, numRows = ro1->image->numRows; // Image dimensions 717 int x0 = ro1->col0, y0 = ro1->row0; // Image offset 717 718 718 719 psImage *convImage1 = out1->image; // Convolved image … … 771 772 yMax = PS_MIN(region->y1, yMax); 772 773 } 774 775 // Size to use when calculating normalised coordinates (different from actual size when convolving 776 // subimage) 777 int xNormSize = (kernels->numCols > 0 ? kernels->numCols : numCols); 778 int yNormSize = (kernels->numRows > 0 ? kernels->numRows : numRows); 773 779 774 780 psMaskType maskSource; // Mask these pixels when convolving … … 798 804 for (int j = yMin; j < yMax; j += fullSize) { 799 805 int ySubMax = PS_MIN(j + fullSize, yMax); // Range for subregion of interest 800 float yNorm = 2.0 * (float)(j + size + 1 - numRows/2.0) / (float)numRows; // Normalised coordinate 806 float yNorm = 2.0 * (float)(j + y0 + size + 1 - yNormSize/2.0) / 807 (float)yNormSize; // Normalised coordinate 801 808 for (int i = xMin; i < xMax; i += fullSize) { 802 809 int xSubMax = PS_MIN(i + fullSize, xMax); // Range for subregion of interest 803 float xNorm = 2.0 * (float)(i + size + 1 - numCols/2.0) / (float)numCols; // Normalised coordinate 810 float xNorm = 2.0 * (float)(i + x0 + size + 1 - xNormSize/2.0) / 811 (float)xNormSize; // Normalised coordinate 804 812 805 813 // Only generate polynomial values every kernel footprint, since we have already assumed
Note:
See TracChangeset
for help on using the changeset viewer.
