Changeset 24620
- Timestamp:
- Jun 26, 2009, 6:57:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionEquation.c
r24297 r24620 15 15 #include "pmSubtractionVisual.h" 16 16 17 // #define TESTING // TESTING output for debugging; may not work with threads!17 // #define TESTING // TESTING output for debugging; may not work with threads! 18 18 19 19 #define USE_VARIANCE // Include variance in equation? … … 789 789 for (int i = 0; i < stamps->num; i++) { 790 790 pmSubtractionStamp *stamp = stamps->stamps->data[i]; // Stamp of interest 791 791 792 if (stamp->status == PM_SUBTRACTION_STAMP_USED) { 793 794 #ifdef TESTING 795 // XXX double-check for NAN in data: 796 for (int iy = 0; iy < stamp->matrix1->numRows; iy++) { 797 for (int ix = 0; ix < stamp->matrix1->numCols; ix++) { 798 if (!isfinite(stamp->matrix1->data.F64[iy][ix])) { 799 fprintf (stderr, "WARNING: NAN in matrix1\n"); 800 } 801 } 802 } 803 for (int ix = 0; ix < stamp->vector1->n; ix++) { 804 if (!isfinite(stamp->vector1->data.F64[ix])) { 805 fprintf (stderr, "WARNING: NAN in vector1\n"); 806 } 807 } 808 #endif 809 792 810 (void)psBinaryOp(sumMatrix, sumMatrix, "+", stamp->matrix1); 793 811 (void)psBinaryOp(sumVector, sumVector, "+", stamp->vector1); … … 798 816 } 799 817 } 818 819 #ifdef TESTING 820 for (int ix = 0; ix < sumVector->n; ix++) { 821 if (!isfinite(sumVector->data.F64[ix])) { 822 fprintf (stderr, "WARNING: NAN in vector1\n"); 823 } 824 } 825 #endif 826 800 827 calculatePenalty(sumVector, kernels); 801 828 802 829 #ifdef TESTING 830 for (int ix = 0; ix < sumVector->n; ix++) { 831 if (!isfinite(sumVector->data.F64[ix])) { 832 fprintf (stderr, "WARNING: NAN in vector1\n"); 833 } 834 } 803 835 { 804 836 psImage *inverse = psMatrixInvert(NULL, sumMatrix, NULL); … … 832 864 } 833 865 kernels->solution1 = psMatrixLUSolution(kernels->solution1, luMatrix, sumVector, permutation); 866 867 // XXX double-check for NAN in data: 868 for (int ix = 0; ix < kernels->solution1->n; ix++) { 869 if (!isfinite(kernels->solution1->data.F64[ix])) { 870 fprintf (stderr, "WARNING: NAN in vector1\n"); 871 } 872 } 873 834 874 835 875 psFree(sumVector);
Note:
See TracChangeset
for help on using the changeset viewer.
