Changeset 4811
- Timestamp:
- Aug 17, 2005, 12:49:18 PM (21 years ago)
- Location:
- trunk/psModules/test
- Files:
-
- 2 edited
-
tst_pmReadoutCombine.c (modified) (11 diffs)
-
verified/tst_pmReadoutCombine.stderr (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmReadoutCombine.c
r4770 r4811 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-08-1 6 01:10:36$7 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-08-17 22:49:18 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 static int test01(void); 27 27 testDescription tests[] = { 28 {test00, 000, "pmSubtractBias ", 0, false},29 {test01, 000, "pmSubtractBias(): input parameter error conditions", 0, false},28 {test00, 000, "pmSubtractBias(): Basic readout combines with no image overlap", true, false}, 29 {test01, 000, "pmSubtractBias(): input parameter error conditions", true, false}, 30 30 {NULL} 31 31 }; … … 64 64 readouts and calls pmReadoutCombine(). 65 65 *****************************************************************************/ 66 67 66 int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows) 68 67 { … … 99 98 params->nKeep = 0; 100 99 100 // 101 // Create a psList of psReadouts. The pixels in readout r will all have the 102 // value r. 103 // 101 104 for (r=0;r<NUM_READOUTS;r++) { 102 105 baseRowsReadout[r] = r + 40; … … 118 121 *(int *) (& (tmpImage->row0)) = baseRows[r]; 119 122 *(int *) (& (tmpImage->col0)) = baseCols[r]; 120 /*121 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],122 baseRowsReadout[r],123 tmpImage);124 */125 123 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 124 tmpReadout->row0 = 0; 125 tmpReadout->col0 = 0; 126 126 tmpReadout->image = tmpImage; 127 127 … … 142 142 output = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0); 143 143 psF32 NR = (psF32) NUM_READOUTS; 144 // psF32 expectedPixel = ((((NR-1.0) * (NR/2.0)) / NR) + VEC_ZERO) * VEC_SCALE;145 144 psF32 expectedPixel = ((NR/2.0) * (VEC_ZERO + (VEC_ZERO + VEC_SCALE * (NR - 1)))) / NR; 146 145 147 VerifyTheOutput(output, expectedPixel);146 int testStatus = VerifyTheOutput(output, expectedPixel); 148 147 149 148 psFree(params->stats); … … 162 161 163 162 printFooter(stdout, "pmReadoutCombine", "simpleCombineNoOverlap", true); 164 return( 0);163 return(testStatus); 165 164 } 166 165 … … 177 176 } 178 177 178 /****************************************************************************** 179 test01(): we simply call pmReadoutCombine() with a variety of erroneous input 180 parameter combinations and verify that it behaves properly. 181 *****************************************************************************/ 179 182 int test01() 180 183 { 184 int testStatus = true; 181 185 int i; 182 186 int r; … … 203 207 psVector *scaleBig = psVectorAlloc(NUM_READOUTS*2, PS_TYPE_F32); 204 208 psVector *scaleF64 = psVectorAlloc(NUM_READOUTS, PS_TYPE_F64); 205 int testStatus = true;206 209 for (i=0;i<NUM_READOUTS;i++) { 207 210 zero->data.F32[i] = 3.0; … … 236 239 *(int *) (& (tmpImage->row0)) = baseRows[r]; 237 240 *(int *) (& (tmpImage->col0)) = baseCols[r]; 238 /*239 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],240 baseRowsReadout[r],241 tmpImage);242 */243 241 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 242 tmpReadout->row0 = 0; 243 tmpReadout->col0 = 0; 244 244 tmpReadout->image = tmpImage; 245 245 minOutRow = PS_MIN(minOutRow, (baseRowsReadout[r] + baseRows[r])); … … 449 449 450 450 printFooter(stdout, "pmReadoutCombine", "Testing bad input parameter conditions", true); 451 return( !testStatus);451 return(testStatus); 452 452 } -
trunk/psModules/test/verified/tst_pmReadoutCombine.stderr
r3623 r4811 1 1 /***************************** TESTPOINT ******************************************\ 2 2 * TestFile: tst_pmReadoutCombine.c * 3 * TestPoint: Test Point Driver{pmSubtractBias }*3 * TestPoint: Test Point Driver{pmSubtractBias(): Basic readout combines with no image overla * 4 4 * TestType: Positive * 5 5 \**********************************************************************************/ 6 6 7 7 8 ---> TESTPOINT PASSED (Test Point Driver{pmSubtractBias } | tst_pmReadoutCombine.c)8 ---> TESTPOINT PASSED (Test Point Driver{pmSubtractBias(): Basic readout combines with no image overlap} | tst_pmReadoutCombine.c) 9 9 10 10 /***************************** TESTPOINT ******************************************\ … … 14 14 \**********************************************************************************/ 15 15 16 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)16 <HOST>|E|pmReadoutCombine (FILE:LINENO) 17 17 zero vector has incorrect size (5). Returning NULL. 18 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)18 <HOST>|E|pmReadoutCombine (FILE:LINENO) 19 19 Unallowable operation: psVector zero has incorrect type. 20 < DATE><TIME>|<HOST>|W|pmReadoutCombine20 <HOST>|W|pmReadoutCombine 21 21 WARNING: the zero vector too many elements (11) 22 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)22 <HOST>|E|pmReadoutCombine (FILE:LINENO) 23 23 scale vector has incorrect size (5). Returning NULL. 24 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)24 <HOST>|E|pmReadoutCombine (FILE:LINENO) 25 25 Unallowable operation: psVector scale has incorrect type. 26 < DATE><TIME>|<HOST>|W|pmReadoutCombine26 <HOST>|W|pmReadoutCombine 27 27 WARNING: the scale vector has too many elements (20) 28 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)28 <HOST>|E|pmReadoutCombine (FILE:LINENO) 29 29 Output image (1, 1) is too small to hold combined images. Returning NULL. 30 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)30 <HOST>|E|pmReadoutCombine (FILE:LINENO) 31 31 Output image offset is larger then input image offset. Returning NULL. 32 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)32 <HOST>|E|pmReadoutCombine (FILE:LINENO) 33 33 Unallowable operation: inputs is NULL. 34 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)34 <HOST>|E|pmReadoutCombine (FILE:LINENO) 35 35 Unallowable operation: params is NULL. 36 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)36 <HOST>|E|pmReadoutCombine (FILE:LINENO) 37 37 Multiple statistical options have been requested. Returning NULL. 38 < DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)38 <HOST>|E|pmReadoutCombine (FILE:LINENO) 39 39 Unallowable operation: params->stats is NULL. 40 40
Note:
See TracChangeset
for help on using the changeset viewer.
