Changeset 32131
- Timestamp:
- Aug 18, 2011, 6:40:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppsub_test/psModules/src/imcombine/pmSubtractionEquation.c
r30622 r32131 797 797 stamp->normSquare2 = normSquare2; 798 798 799 // psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "normValue: %f %f %f (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2); 799 //MEH 800 psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "normValue: %f %f %f (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2); 800 801 801 802 return true; … … 1382 1383 float Myy = fluxY2 / fluxC1; 1383 1384 1385 //MEH uncomment and update 1384 1386 // fprintf (stderr, "conv1, flux2: %f, Mx: %f, My: %f, Mxx: %f, Myy: %f, chisq: %f, npix: %d\n", flux2, Mx, My, Mxx, Myy, chisq, npix); 1387 fprintf (stderr, "conv1, flux2: %f, fluxC1: %f, Mxx: %f, Myy: %f, chisqR: %f, npix: %d\n", flux2, fluxC1, Mxx, Myy, chisqR, npix); 1385 1388 moment += Mxx + Myy; 1386 1389 } 1387 1390 1388 // get the moments from convolved 11391 // get the moments from convolved2 1389 1392 if (convolved2) { 1390 1393 for (int y = residual->yMin; y <= residual->yMax; y++) { … … 1546 1549 } 1547 1550 1548 // Generate the difference, residual, and convolved source images. Note th ewe1551 // Generate the difference, residual, and convolved source images. Note that we 1549 1552 // accumulate the convolution of (A-B), so we need to replace it to generate the 1550 1553 // images of the convolved source image. … … 1554 1557 residual->kernel[y][x] = difference->kernel[y][x] - convolved1->kernel[y][x]; 1555 1558 convolved1->kernel[y][x] += source->kernel[y][x] * norm; 1559 1560 //MEH 1561 //psLogMsg("psModules.imcombine", PS_LOG_INFO, "xy: %d %d, norm: %6.3f, bg: %6.3f, difference: %6.3f, target: %6.3f, source: %6.3f, residual: %6.3f, convolved1: %6.3f \n",x,y,norm,background,difference->kernel[y][x],target->kernel[y][x],source->kernel[y][x],residual->kernel[y][x],convolved1->kernel[y][x]); 1556 1562 } 1557 1563 } … … 1651 1657 psFree (modelKernel); 1652 1658 } else { 1653 sumKernel2 = 1.0; 1654 } 1659 //MEH leave at 0 or make it small e to avoid x/0? 1660 // sumKernel2 = 1.0; 1661 sumKernel2 = 0.001; 1662 } 1663 1664 //MEH if sumKernel2 not use essentially, then not need to be 2.0*? 1655 1665 1656 1666 // if we modify the chisq value by the (sumKernel1 + sumKernel2), we account for the … … 1658 1668 // penalized by increasing the score somewhat. the 0.01 value is not well-chosen. 1659 1669 float orderFactor = 0.01 * kernels->spatialOrder; 1660 float score = 2.0 * chisqRValue / (sumKernel1 + sumKernel2) + orderFactor; 1661 psLogMsg("psModules.imcombine", PS_LOG_INFO, "chisq: %6.3f, chisqD: %6.3f, moment: %6.3f, sumKernel_1: %6.3f, sumKernel_2, score: %6.3f: %6.3f\n", chisqRValue, chisqDValue, momentValue, sumKernel1, sumKernel2, score); 1670 //MEH 1671 //float score = 2.0 * chisqRValue / (sumKernel1 + sumKernel2) + orderFactor; 1672 float score = 2.0 * chisqRValue / (sqrt(sumKernel1) + sqrt(sumKernel2)) + orderFactor; 1673 psLogMsg("psModules.imcombine", PS_LOG_INFO, "chisq: %6.3f, chisqD: %6.3f, moment: %6.3f, sumKernel_1: %6.3f, sumKernel_2: %6.3f, score: %6.3f\n", chisqRValue, chisqDValue, momentValue, sumKernel1, sumKernel2, score); 1662 1674 1663 1675 // save this result if it is the first or the best (skip if bestMatch is NULL)
Note:
See TracChangeset
for help on using the changeset viewer.
