Changeset 33415 for branches/meh_branches/ppstack_test/psModules/src/imcombine/pmSubtractionEquation.c
- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psModules
- Property svn:mergeinfo set to
-
branches/meh_branches/ppstack_test/psModules/src/imcombine/pmSubtractionEquation.c
r30622 r33415 796 796 stamp->normSquare1 = normSquare1; 797 797 stamp->normSquare2 = normSquare2; 798 799 // psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "normValue: %f %f %f (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2);798 799 //psLogMsg ("psModules.imcombine", PS_LOG_DETAIL, "normValue: %f %f %f (%f %f)\n", normI1, normI2, stamp->norm, normSquare1, normSquare2); 800 800 801 801 return true; … … 958 958 } 959 959 960 if (!psThreadPoolWait(true )) {960 if (!psThreadPoolWait(true, true)) { 961 961 psError(psErrorCodeLast(), false, "Error waiting for threads."); 962 962 return false; … … 1037 1037 (void)psBinaryOp(sumVector, sumVector, "+", stamp->vector); 1038 1038 1039 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "green" );1039 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "green", ""); 1040 1040 numStamps++; 1041 1041 } else if (stamp->status == PM_SUBTRACTION_STAMP_REJECTED) { 1042 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "red" );1042 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "red", ""); 1043 1043 } 1044 1044 } … … 1139 1139 normSquare2 += stamp->normSquare2; 1140 1140 1141 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "green" );1141 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "green", ""); 1142 1142 numStamps++; 1143 1143 } else if (stamp->status == PM_SUBTRACTION_STAMP_REJECTED) { 1144 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "red" );1144 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "red", ""); 1145 1145 } 1146 1146 } … … 1382 1382 float Myy = fluxY2 / fluxC1; 1383 1383 1384 //MEH uncomment and update 1384 1385 // 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); 1386 //fprintf (stderr, "conv1, flux2: %f, fluxC1: %f, Mxx: %f, Myy: %f, chisqR: %f, npix: %d\n", flux2, fluxC1, Mxx, Myy, chisqR, npix); 1387 1385 1388 moment += Mxx + Myy; 1386 1389 } … … 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 //MEH 1560 //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]); 1561 1556 1562 } 1557 1563 } … … 1652 1658 } else { 1653 1659 sumKernel2 = 1.0; 1654 } 1660 //MEH 1661 sumKernel2 = 0.001; 1662 } 1663 //MEH if sumKernel2 not use essentially, then not need to be 2.0*? but level of orderFactor may need to be adjusted then 1655 1664 1656 1665 // if we modify the chisq value by the (sumKernel1 + sumKernel2), we account for the … … 1658 1667 // penalized by increasing the score somewhat. the 0.01 value is not well-chosen. 1659 1668 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); 1669 //MEH 1670 //float score = 2.0 * chisqRValue / (sumKernel1 + sumKernel2) + orderFactor; 1671 float score = 2.0 * chisqRValue / (sqrt(sumKernel1) + sqrt(sumKernel2)) + orderFactor; 1672 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 1673 1663 1674 // 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.
