Changeset 2832 for trunk/psModules/test/tst_pmReadoutCombine.c
- Timestamp:
- Dec 27, 2004, 1:16:51 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmReadoutCombine.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmReadoutCombine.c
r2829 r2832 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-12-27 2 0:14:29$7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-12-27 23:16:51 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 11 * 12 * XXX: Untested: 13 * S16, S32 types 14 * Multiple input readouts with varying sizes and offsets. 15 * params->fracLow and params->fracHigh 16 * params->nKeep 17 * (gain > 0.0) && (readnoise >= 0.0) (applyZeroScale == true) 18 * (gain > 0.0) && (readnoise >= 0.0) (applyZeroScale == false) 19 * 11 20 */ 12 21 … … 23 32 24 33 #define NUM_READOUTS 10 25 #define INPUT_NUM_ROWS 1026 #define INPUT_NUM_COLS 1034 #define INPUT_NUM_ROWS 20 35 #define INPUT_NUM_COLS 20 27 36 #define VEC_ZERO 1.0 28 37 #define VEC_SCALE 2.0 … … 50 59 } 51 60 52 int doit() 61 /****************************************************************************** 62 simpleCombineNoOverlap(): this routine creates a list of NUM_READOUTS input 63 readouts and calls pmReadoutCombine(). 64 *****************************************************************************/ 65 66 int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows) 53 67 { 54 68 int i; … … 94 108 baseRows[r] = 0; 95 109 baseCols[r] = 0; 96 numRows[r] = INPUT_NUM_ROWS;97 numCols[r] = INPUT_NUM_COLS;110 numRows[r] = numInputRows; 111 numCols[r] = numInputCols; 98 112 99 113 psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32); … … 146 160 int testStatus = 0; 147 161 148 testStatus |= doit(); 162 testStatus |= simpleCombineNoOverlap(1, 1); 163 testStatus |= simpleCombineNoOverlap(INPUT_NUM_COLS, 1); 164 testStatus |= simpleCombineNoOverlap(1, INPUT_NUM_ROWS); 165 testStatus |= simpleCombineNoOverlap(INPUT_NUM_COLS, INPUT_NUM_ROWS); 149 166 150 167 return(testStatus); … … 345 362 346 363 printf("----------------------------------------------------------------------------\n"); 364 printf("Calling pmReadoutCombine() row0/col0 too large. Should generate error, return NULL.\n"); 365 output = psImageAlloc(1, 1, PS_TYPE_F32); 366 *(psS32*)&output->row0 = 10000; 367 *(psS32*)&output->col0 = 10000; 368 rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0); 369 if (rc != NULL) { 370 printf("ERROR: pmReadoutCombine() did not return NULL\n"); 371 testStatus = false; 372 } 373 psFree(output); 374 output = NULL; 375 376 printf("----------------------------------------------------------------------------\n"); 347 377 printf("Calling pmReadoutCombine() with NULL input list. Should generate error, return NULL.\n"); 348 378 rc = pmReadoutCombine(output, NULL, params, zero, scale, true, 0.0, 0.0);
Note:
See TracChangeset
for help on using the changeset viewer.
