Changeset 2777 for trunk/psModules/test/tst_pmSubtractSky.c
- Timestamp:
- Dec 21, 2004, 10:41:29 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmSubtractSky.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmSubtractSky.c
r2761 r2777 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-12-2 0 21:39:14$9 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-12-21 20:41:29 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 19 19 #define POLY_X_ORDER 3 20 20 #define POLY_Y_ORDER 3 21 #define TOL1.021 #define ERROR_TOLERANCE 1.0 22 22 #define OBJECT_INTENSITY 2000.0 23 23 static int test00(void); … … 26 26 {NULL} 27 27 }; 28 //XXX: Test a few input parameter error conditions. 28 29 29 30 float func(int i, int j) … … 37 38 } 38 39 40 /****************************************************************************** 41 *****************************************************************************/ 39 42 int doSubtractSkySimple(int numCols, int numRows, int binFactor) 40 43 { … … 57 60 for (i=0;i<numRows;i++) { 58 61 for (j=0;j<numCols;j++) { 59 if ( TOL< fabs(myReadout->image->data.F32[i][j])) {62 if (ERROR_TOLERANCE < fabs(myReadout->image->data.F32[i][j])) { 60 63 printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j, myReadout->image->data.F32[i][j]); 61 64 testStatus = 1; … … 69 72 } 70 73 74 /****************************************************************************** 75 *****************************************************************************/ 71 76 int doSubtractSkyWithObjects(int numCols, int numRows, int binFactor) 72 77 { … … 79 84 psPolynomial2D *myPoly = psPolynomial2DAlloc(POLY_X_ORDER, POLY_Y_ORDER, PS_POLYNOMIAL_ORD); 80 85 psImage *trueImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 81 psF32 errorTolerance = TOL* ((psF32) binFactor);86 psF32 errorTolerance = ERROR_TOLERANCE * ((psF32) binFactor); 82 87 83 88 for (i=0;i<numRows;i++) { … … 123 128 124 129 // Bin Factor == 1 125 /*126 */127 130 printf("doSubtractSkySimple(1, 1, 1)\n"); 128 131 testStatus |= doSubtractSkySimple(1, 1, 1);
Note:
See TracChangeset
for help on using the changeset viewer.
