- 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/pmSubtractionMatch.c
r31671 r33415 29 29 static bool useFFT = true; // Do convolutions using FFT 30 30 31 //#define TESTING32 //#define TESTING_MEMORY31 #define TESTING 32 #define TESTING_MEMORY 33 33 34 34 // Output memory usage information … … 538 538 // Where does our variance map come from? 539 539 // Getting the variance exactly right is not necessary --- it's just used for weighting. 540 // MEH - helpful to have one used output to log -- at some level want log output for most every step 541 540 542 psImage *variance = NULL; // Variance image to use 541 543 if (ro1->variance && ro2->variance) { 542 544 variance = (psImage*)psBinaryOp(NULL, ro1->variance, "+", ro2->variance); 545 psLogMsg("psModules.imcombine", PS_LOG_DETAIL, "TESTING:SubMatch variance avail: var1+var2"); 543 546 } else if (ro1->variance) { 544 547 variance = psMemIncrRefCounter(ro1->variance); 548 psLogMsg("psModules.imcombine", PS_LOG_DETAIL, "TESTING:SubMatch variance avail: var1"); 545 549 } else if (ro2->variance) { 546 550 variance = psMemIncrRefCounter(ro2->variance); 551 psLogMsg("psModules.imcombine", PS_LOG_DETAIL, "TESTING:SubMatch variance avail: var2"); 547 552 } else { 548 553 variance = (psImage*)psBinaryOp(NULL, ro1->image, "+", ro2->image); 549 } 554 psLogMsg("psModules.imcombine", PS_LOG_DETAIL, "TESTING:SubMatch variance avail: none ro1+ro2"); 555 } 556 550 557 551 558 // Putting important variable declarations here, since they are freed after a "goto" if there is an error. … … 726 733 float radMoment1 = stamps->normWindow1 / 2.75; 727 734 float radMoment2 = stamps->normWindow2 / 2.75; 735 //MEH - FWHM vs radialMoment need *2? may mess up other parts 736 //float radMoment1 = stamps->normWindow1 / 2.75*2; 737 //float radMoment2 = stamps->normWindow2 / 2.75*2; 728 738 pmSubtractionParamsScale(NULL, NULL, isisWidths, radMoment1, radMoment2); 729 739 … … 810 820 } 811 821 } 812 822 //MEH probably should comment out but should be ok? 813 823 // step 0 : calculate the normalizations, pass along to the next steps via stamps->normValue 814 824 psTrace("psModules.imcombine", 3, "Calculating normalization...\n"); … … 825 835 for (int order = 0; order <= N_TEST_ORDER; order++) { 826 836 for (int j = 0; j < N_TEST_MODES; j++) { 837 //MEH: thinking pmSubtractionCalculateNormalization needs to be called here for conv source 838 // per mode 839 //psTrace("psModules.imcombine", 3, "Calculating normalization...order: %d mode: %d\n",order,j); 840 // if (!pmSubtractionCalculateNormalization(stamps, TestModes[j])) { 841 // psError(psErrorCodeLast(), false, "Unable to calculate least-squares equation."); 842 // goto MATCH_ERROR; 843 //} 844 // 827 845 if (!pmSubtractionMatchAttempt(&bestMatch, kernels, stamps, TestModes[j], order, false)) { 828 846 goto MATCH_ERROR; … … 843 861 // apply the best fit so we are ready to roll 844 862 psLogMsg("psModules.imcombine", PS_LOG_INFO, "applying order: %d, mode: %d\n", bestMatch->spatialOrder, bestMatch->mode); 863 //MEH need to call normalization one more time for final/best run - 864 // but what if dual - already checked for in pmSubtractionCalculateNormalization 865 //if (!pmSubtractionCalculateNormalization(stamps, bestMatch->mode)) { 866 // psError(psErrorCodeLast(), false, "Unable to calculate least-squares equation."); 867 // goto MATCH_ERROR; 868 //} 869 // 845 870 if (!pmSubtractionMatchAttempt(NULL, kernels, stamps, bestMatch->mode, bestMatch->spatialOrder, true)) { 846 871 goto MATCH_ERROR; … … 1091 1116 } 1092 1117 1093 if (!psThreadPoolWait(true )) {1118 if (!psThreadPoolWait(true, true)) { 1094 1119 psError(psErrorCodeLast(), false, "Error waiting for threads."); 1095 1120 psFree(models); … … 1331 1356 *stampSize = *stampSize * scale + 0.5; 1332 1357 } 1333 1358 //MEH 1359 psLogMsg("psModules.imcombine", PS_LOG_INFO, "TESTING Scaling kernel parameters fwhm1,2,refscale/min/max: %f %f %f %f %f", fwhm1,fwhm2,scaleRefOption,scaleMinOption,scaleMaxOption); 1334 1360 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Scaling kernel parameters by %f", scale); 1335 1361 if (kernelSize) psLogMsg("psModules.imcombine", PS_LOG_INFO, " modified kernel size %d", *kernelSize);
Note:
See TracChangeset
for help on using the changeset viewer.
