Changeset 25489 for trunk/psModules/src/imcombine/pmPSFEnvelope.c
- Timestamp:
- Sep 22, 2009, 5:28:06 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r25488 r25489 170 170 float y = source->peak->yf + yOffset->data.S32[j]; // y coordinate of source 171 171 172 double flux = fakeRO->image->data.F32[(int)y][(int)x]; 172 // Perhaps I'm being paranoid, but specify a range to check 173 int uMax = PS_MIN(x + radius, numCols - 1), uMin = PS_MAX(x - radius, 0); 174 int vMax = PS_MIN(y + radius, numRows - 1), vMin = PS_MAX(y - radius, 0); 175 176 double flux = -INFINITY; // Peak flux 177 for (int v = vMin; v <= vMax; v++) { 178 for (int u = uMin; u <= uMax; u++) { 179 if (fakeRO->image->data.F32[v][u] > flux) { 180 flux = fakeRO->image->data.F32[v][u]; 181 } 182 } 183 } 184 173 185 if (!isfinite(flux) || flux < 0) { 174 186 continue; … … 240 252 int xFake = source->peak->x + xOffset->data.S32[i]; 241 253 int yFake = source->peak->y + yOffset->data.S32[i]; 242 psRegion region = psRegionSet(xFake - radius, xFake + radius,243 yFake - radius, yFake + radius); // PSF region254 psRegion region = psRegionSet(xFake - maxRadius, xFake + maxRadius, 255 yFake - maxRadius, yFake + maxRadius); // PSF region 244 256 psImage *subImage = psImageSubset(envelope, region); // Subimage of fake PSF 245 257
Note:
See TracChangeset
for help on using the changeset viewer.
