Changeset 29126
- Timestamp:
- Sep 7, 2010, 9:31:59 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823/psModules/src/imcombine
- Files:
-
- 3 edited
-
pmSubtractionEquation.c (modified) (2 diffs)
-
pmSubtractionStamps.c (modified) (5 diffs)
-
pmSubtractionVisual.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionEquation.c
r29004 r29126 1286 1286 float dmin = 0.0; 1287 1287 1288 // XXX update these with a bit more rigour 1288 1289 for (int y = - footprint; y <= footprint; y++) { 1289 1290 for (int x = - footprint; x <= footprint; x++) { 1290 float dflux = 0.5*(target->kernel[y][x] + source->kernel[y][x] * norm);1291 if (dflux < 0.02*sum) continue;1291 // float dflux = 0.5*(target->kernel[y][x] + source->kernel[y][x] * norm); 1292 // if (dflux < 0.02*sum) continue; 1292 1293 dflux1 += residual->kernel[y][x]; 1293 1294 dflux2 += PS_SQR(residual->kernel[y][x]); 1294 dmax = PS_MAX(residual->kernel[y][x], dmax); 1295 dmin = PS_MIN(residual->kernel[y][x], dmin); 1295 // dmax = PS_MAX(residual->kernel[y][x], dmax); 1296 // dmin = PS_MIN(residual->kernel[y][x], dmin); 1297 dmax += fabs(residual->kernel[y][x]); 1298 1299 if (hypot(x,y) > 2.0) { 1300 dmin += fabs(residual->kernel[y][x]); 1301 } 1296 1302 npix ++; 1297 1303 } … … 1303 1309 if (!isfinite(peak)) return false; 1304 1310 1305 // fprintf (stderr, "sum: %f, peak: %f, sigma: %f, fsigma: %f, fmax: %f, fmin: %f\n", sum, peak, sigma, sigma/sum, dmax/peak, dmin/peak);1311 fprintf (stderr, "sum: %f, peak: %f, sigma: %f, fsigma: %f, fmax: %f, fmin: %f\n", sum, peak, sigma, sigma/sum, dmax/sum, dmin/sum); 1306 1312 psVectorAppend(fSigRes, sigma/sum); 1307 psVectorAppend(fMaxRes, dmax/ peak);1308 psVectorAppend(fMinRes, dmin/ peak);1313 psVectorAppend(fMaxRes, dmax/sum); 1314 psVectorAppend(fMinRes, dmin/sum); 1309 1315 return true; 1310 1316 } -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionStamps.c
r29124 r29126 96 96 97 97 // fprintf (stderr, "xMin, xMax: %d, %d -> ", xMin, xMax); 98 float xRaw = xMin; 99 float yRaw = yMin; 98 100 99 101 // Ensure we're not going to go outside the bounds of the image … … 103 105 yMax = PS_MIN(numRows - border - 1, yMax); 104 106 105 if (xMax < xMin) return false; 106 if (yMax < yMin) return false; 107 if (xMax < xMin) { 108 fprintf (stderr, "%f,%f : x-border\n", xRaw, yRaw); 109 return false; 110 } 111 if (yMax < yMin) { 112 fprintf (stderr, "%f,%f : y-border\n", xRaw, yRaw); 113 return false; 114 } 107 115 108 116 psAssert (xMin <= xMax, "x mismatch?"); … … 118 126 if (subMask && subMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & 119 127 (PM_SUBTRACTION_MASK_BORDER | PM_SUBTRACTION_MASK_REJ)) { 128 fprintf (stderr, "%f,%f : masked\n", xRaw, yRaw); 120 129 return false; 121 130 } … … 133 142 } 134 143 144 if (!found) { 145 fprintf (stderr, "%f,%f : fails flux test\n", xRaw, yRaw); 146 } 135 147 return found; 136 148 } … … 431 443 // Take stamps off the top of the (sorted) list 432 444 for (int j = xList->n - 1; j >= 0 && !goodStamp; j--) { 445 fprintf (stderr, "%d : xList: %ld elements\n", i, xList->n); 433 446 // Chop off the top of the list 434 447 xList->n = j; -
branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionVisual.c
r29004 r29126 286 286 return false; 287 287 } 288 289 // XXX clear the overlay(s) (red at least!) 288 290 289 291 // get the kernel sizes
Note:
See TracChangeset
for help on using the changeset viewer.
