IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2004, 1:16:51 PM (22 years ago)
Author:
gusciora
Message:

Added an errors argument to the psVectorStats() call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/tst_pmReadoutCombine.c

    r2829 r2832  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-12-27 20:14:29 $
     7 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-12-27 23:16:51 $
    99 *
    1010 *  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 *
    1120 */
    1221
     
    2332
    2433#define NUM_READOUTS  10
    25 #define INPUT_NUM_ROWS 10
    26 #define INPUT_NUM_COLS 10
     34#define INPUT_NUM_ROWS 20
     35#define INPUT_NUM_COLS 20
    2736#define VEC_ZERO 1.0
    2837#define VEC_SCALE 2.0
     
    5059}
    5160
    52 int doit()
     61/******************************************************************************
     62simpleCombineNoOverlap(): this routine creates a list of NUM_READOUTS input
     63readouts and calls pmReadoutCombine().
     64 *****************************************************************************/
     65
     66int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows)
    5367{
    5468    int i;
     
    94108        baseRows[r] = 0;
    95109        baseCols[r] = 0;
    96         numRows[r] = INPUT_NUM_ROWS;
    97         numCols[r] = INPUT_NUM_COLS;
     110        numRows[r] = numInputRows;
     111        numCols[r] = numInputCols;
    98112
    99113        psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32);
     
    146160    int testStatus = 0;
    147161
    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);
    149166
    150167    return(testStatus);
     
    345362
    346363    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");
    347377    printf("Calling pmReadoutCombine() with NULL input list.  Should generate error, return NULL.\n");
    348378    rc = pmReadoutCombine(output, NULL, params, zero, scale, true, 0.0, 0.0);
Note: See TracChangeset for help on using the changeset viewer.