IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4811


Ignore:
Timestamp:
Aug 17, 2005, 12:49:18 PM (21 years ago)
Author:
gusciora
Message:

Fixed problem with the pmReadout->row0 col0 inititalization.

Location:
trunk/psModules/test
Files:
2 edited

Legend:

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

    r4770 r4811  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-08-16 01:10:36 $
     7 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-08-17 22:49:18 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2626static int test01(void);
    2727testDescription 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},
    3030                              {NULL}
    3131                          };
     
    6464readouts and calls pmReadoutCombine().
    6565 *****************************************************************************/
    66 
    6766int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows)
    6867{
     
    9998    params->nKeep = 0;
    10099
     100    //
     101    // Create a psList of psReadouts.  The pixels in readout r will all have the
     102    // value r.
     103    //
    101104    for (r=0;r<NUM_READOUTS;r++) {
    102105        baseRowsReadout[r] = r + 40;
     
    118121        *(int *) (& (tmpImage->row0)) = baseRows[r];
    119122        *(int *) (& (tmpImage->col0)) = baseCols[r];
    120         /*
    121                 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],
    122                                                        baseRowsReadout[r],
    123                                                        tmpImage);
    124         */
    125123        pmReadout *tmpReadout = pmReadoutAlloc(NULL);
     124        tmpReadout->row0 = 0;
     125        tmpReadout->col0 = 0;
    126126        tmpReadout->image = tmpImage;
    127127
     
    142142    output = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
    143143    psF32 NR = (psF32) NUM_READOUTS;
    144     //    psF32 expectedPixel = ((((NR-1.0) * (NR/2.0)) / NR) + VEC_ZERO) * VEC_SCALE;
    145144    psF32 expectedPixel = ((NR/2.0) * (VEC_ZERO + (VEC_ZERO + VEC_SCALE * (NR - 1)))) / NR;
    146145
    147     VerifyTheOutput(output, expectedPixel);
     146    int testStatus = VerifyTheOutput(output, expectedPixel);
    148147
    149148    psFree(params->stats);
     
    162161
    163162    printFooter(stdout, "pmReadoutCombine", "simpleCombineNoOverlap", true);
    164     return(0);
     163    return(testStatus);
    165164}
    166165
     
    177176}
    178177
     178/******************************************************************************
     179test01(): we simply call pmReadoutCombine() with a variety of erroneous input
     180parameter combinations and verify that it behaves properly.
     181 *****************************************************************************/
    179182int test01()
    180183{
     184    int testStatus = true;
    181185    int i;
    182186    int r;
     
    203207    psVector *scaleBig = psVectorAlloc(NUM_READOUTS*2, PS_TYPE_F32);
    204208    psVector *scaleF64 = psVectorAlloc(NUM_READOUTS, PS_TYPE_F64);
    205     int testStatus = true;
    206209    for (i=0;i<NUM_READOUTS;i++) {
    207210        zero->data.F32[i] = 3.0;
     
    236239        *(int *) (& (tmpImage->row0)) = baseRows[r];
    237240        *(int *) (& (tmpImage->col0)) = baseCols[r];
    238         /*
    239                 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],
    240                                                        baseRowsReadout[r],
    241                                                        tmpImage);
    242         */
    243241        pmReadout *tmpReadout = pmReadoutAlloc(NULL);
     242        tmpReadout->row0 = 0;
     243        tmpReadout->col0 = 0;
    244244        tmpReadout->image = tmpImage;
    245245        minOutRow = PS_MIN(minOutRow, (baseRowsReadout[r] + baseRows[r]));
     
    449449
    450450    printFooter(stdout, "pmReadoutCombine", "Testing bad input parameter conditions", true);
    451     return(!testStatus);
     451    return(testStatus);
    452452}
  • trunk/psModules/test/verified/tst_pmReadoutCombine.stderr

    r3623 r4811  
    11/***************************** TESTPOINT ******************************************\
    22*             TestFile: tst_pmReadoutCombine.c                                     *
    3 *            TestPoint: Test Point Driver{pmSubtractBias}                          *
     3*            TestPoint: Test Point Driver{pmSubtractBias(): Basic readout combines with no image overla *
    44*             TestType: Positive                                                   *
    55\**********************************************************************************/
    66
    77
    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)
    99
    1010/***************************** TESTPOINT ******************************************\
     
    1414\**********************************************************************************/
    1515
    16 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     16<HOST>|E|pmReadoutCombine (FILE:LINENO)
    1717    zero vector has incorrect size (5).  Returning NULL.
    18 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     18<HOST>|E|pmReadoutCombine (FILE:LINENO)
    1919    Unallowable operation: psVector zero has incorrect type.
    20 <DATE><TIME>|<HOST>|W|pmReadoutCombine
     20<HOST>|W|pmReadoutCombine
    2121    WARNING: the zero vector too many elements (11)
    22 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     22<HOST>|E|pmReadoutCombine (FILE:LINENO)
    2323    scale vector has incorrect size (5).  Returning NULL.
    24 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     24<HOST>|E|pmReadoutCombine (FILE:LINENO)
    2525    Unallowable operation: psVector scale has incorrect type.
    26 <DATE><TIME>|<HOST>|W|pmReadoutCombine
     26<HOST>|W|pmReadoutCombine
    2727    WARNING: the scale vector has too many elements (20)
    28 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     28<HOST>|E|pmReadoutCombine (FILE:LINENO)
    2929    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)
    3131    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)
    3333    Unallowable operation: inputs is NULL.
    34 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     34<HOST>|E|pmReadoutCombine (FILE:LINENO)
    3535    Unallowable operation: params is NULL.
    36 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     36<HOST>|E|pmReadoutCombine (FILE:LINENO)
    3737    Multiple statistical options have been requested.  Returning NULL.
    38 <DATE><TIME>|<HOST>|E|pmReadoutCombine (FILE:LINENO)
     38<HOST>|E|pmReadoutCombine (FILE:LINENO)
    3939    Unallowable operation: params->stats is NULL.
    4040
Note: See TracChangeset for help on using the changeset viewer.