Changeset 5516 for trunk/psModules/test/imsubtract/tst_pmSubtractSky.c
- Timestamp:
- Nov 15, 2005, 10:09:03 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/imsubtract/tst_pmSubtractSky.c
r5169 r5516 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1.1 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-09-28 20:42:52 $ 9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-11-15 20:09:03 $ 11 * 12 * XXX: I added the CELL.TRIMSEC region code but there are not tests for it. 11 13 * 12 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 13 15 */ 14 15 16 17 16 #include "psTest.h" 18 17 #include "pslib.h" … … 67 66 myReadout = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 68 67 binFactor, myStats, 10.0); 69 for (i=0;i<numRows;i++) { 70 for (j=0;j<numCols;j++) { 71 if (ERROR_TOLERANCE < fabs(myReadout->image->data.F32[i][j])) { 72 printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j, myReadout->image->data.F32[i][j]); 73 testStatus = 1; 68 if (myReadout == NULL) { 69 printf("TEST ERROR: pmSubtractSky() returned NULL.\n"); 70 testStatus = 1; 71 } else { 72 for (i=0;i<numRows;i++) { 73 for (j=0;j<numCols;j++) { 74 if (ERROR_TOLERANCE < fabs(myReadout->image->data.F32[i][j])) { 75 printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j, myReadout->image->data.F32[i][j]); 76 testStatus = 1; 77 } 74 78 } 75 79 } … … 117 121 myReadout = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 118 122 binFactor, myStats, 2.0); 119 for (i=0;i<numRows;i++) { 120 for (j=0;j<numCols;j++) { 121 if (errorTolerance < fabs(myReadout->image->data.F32[i][j] - trueImage->data.F32[i][j])) { 122 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, 123 myReadout->image->data.F32[i][j], trueImage->data.F32[i][j]); 124 testStatus = 1; 123 if (myReadout == NULL) { 124 printf("TEST ERROR: pmSubtractSky() returned NULL.\n"); 125 testStatus = 1; 126 } else { 127 for (i=0;i<numRows;i++) { 128 for (j=0;j<numCols;j++) { 129 if (errorTolerance < fabs(myReadout->image->data.F32[i][j] - trueImage->data.F32[i][j])) { 130 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, 131 myReadout->image->data.F32[i][j], trueImage->data.F32[i][j]); 132 testStatus = 1; 133 } 125 134 } 126 135 }
Note:
See TracChangeset
for help on using the changeset viewer.
