IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 7, 2005, 10:00:34 AM (22 years ago)
Author:
gusciora
Message:

Fixed a few error conditions.

File:
1 edited

Legend:

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

    r2915 r2928  
    1313 *  @author GLG, MHPCC
    1414 *
    15  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2005-01-05 23:25:25 $
     15 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2005-01-07 20:00:34 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    654654    }
    655655
    656     printf("------------------------------------------------------------------\n");
    657     printf("Calling pmSubtractBias() with NULL overscan list and PM_OVERSCAN_NONE.  Should generate warning.\n");
    658     rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat,
    659                         0, PM_FIT_NONE, myBias);
    660 
    661     for (i=0;i<numRows;i++) {
    662         for (j=0;j<numCols;j++) {
    663             psF32 expect = ((float) (i + j)) - 1.0;
    664             psF32 actual = rc->image->data.F32[i][j];
    665             if (FLT_EPSILON < fabs(expect - actual)) {
    666                 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
    667                 testStatus = 1;
    668             }
    669 
    670             // Restore myReadout for next test.
    671             myReadout->image->data.F32[i][j] = (float) (i + j);
    672         }
    673     }
     656    /* XXX: This does not seem to be a requirement.
     657        printf("------------------------------------------------------------------\n");
     658        printf("Calling pmSubtractBias() with NULL overscan list and PM_OVERSCAN_NONE.  Should generate warning.\n");
     659        rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat,
     660                            0, PM_FIT_NONE, myBias);
     661     
     662        for (i=0;i<numRows;i++) {
     663            for (j=0;j<numCols;j++) {
     664                psF32 expect = ((float) (i + j)) - 1.0;
     665                psF32 actual = rc->image->data.F32[i][j];
     666                if (FLT_EPSILON < fabs(expect - actual)) {
     667                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
     668                    testStatus = 1;
     669                }
     670     
     671                // Restore myReadout for next test.
     672                myReadout->image->data.F32[i][j] = (float) (i + j);
     673            }
     674        }
     675    */
    674676
    675677    printf("------------------------------------------------------------------\n");
     
    767769
    768770    printf("------------------------------------------------------------------\n");
    769     printf("Calling pmSubtractBias() undersize bias image (short rows).  Should generate Warning.\n");
     771    printf("Calling pmSubtractBias() undersize bias image (short rows).  Should generate Error.\n");
    770772    myReadout = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, NULL,
    771773                               0, PM_FIT_NONE, myBiasShortRows);
     
    778780
    779781    printf("------------------------------------------------------------------\n");
    780     printf("Calling pmSubtractBias() undersize bias image (short columns).  Should generate Warning.\n");
     782    printf("Calling pmSubtractBias() undersize bias image (short columns).  Should generate Error.\n");
    781783    myReadout = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, NULL,
    782784                               0, PM_FIT_NONE, myBiasShortCols);
Note: See TracChangeset for help on using the changeset viewer.