IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 15, 2005, 3:10:36 PM (21 years ago)
Author:
gusciora
Message:

There are a lot of changes here required by the new SDRS. Most changes
involve the new definitions of the psAstrometry types. Not all tests work
correctly.

File:
1 edited

Legend:

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

    r3595 r4770  
    77 *  @author GLG, MHPCC
    88 *
    9  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-03-31 20:41:35 $
     9 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-08-16 01:10:36 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3939int main(int argc, char* argv[])
    4040{
     41    psLogSetFormat("HLNM");
    4142    return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
    4243    //    test00();
     
    5152    int testStatus = 0;
    5253    psImage *tmpImageF32 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    53     //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImageF32);
    54     psReadout *myReadout = psReadoutAlloc();
     54    //    pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImageF32);
     55    pmReadout *myReadout = pmReadoutAlloc(NULL);
    5556    myReadout->image = tmpImageF32;
    5657    psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     
    8990    int testStatus = 0;
    9091    psImage *tmpImageF32 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    91     //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImageF32);
    92     psReadout *myReadout = psReadoutAlloc();
     92    //    pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImageF32);
     93    pmReadout *myReadout = pmReadoutAlloc(NULL);
    9394    myReadout->image = tmpImageF32;
    9495    psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
     
    193194    psImage *tmpImageF32 = psImageAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, PS_TYPE_F32);
    194195    psImage *tmpImageF64 = psImageAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, PS_TYPE_F64);
    195     //    psReadout *myReadout = psReadoutAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, tmpImageF32);
    196     psReadout *myReadout = psReadoutAlloc();
    197     myReadout->image = tmpImageF32;
    198     psReadout *rc = NULL;
     196    //    pmReadout *myReadout = pmReadoutAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, tmpImageF32);
     197    pmReadout *myReadout = pmReadoutAlloc(NULL);
     198    myReadout->image = tmpImageF32;
     199    pmReadout *rc = NULL;
    199200    psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    200201    psPolynomial2D *myPoly = psPolynomial2DAlloc(POLY_X_ORDER, POLY_Y_ORDER, PS_POLYNOMIAL_ORD);
     
    208209
    209210    printf("----------------------------------------------------------------\n");
    210     printf("Calling pmSubtractSky() with NULL psReadout.  Should error.\n\n");
     211    printf("Calling pmSubtractSky() with NULL pmReadout.  Should error.\n\n");
    211212    rc = pmSubtractSky(NULL, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
    212213    if (rc != NULL) {
    213         printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
    214         testStatus = false;
    215     }
    216 
    217     printf("----------------------------------------------------------------\n");
    218     printf("Calling pmSubtractSky() with NULL psReadout->image.  Should error.\n\n");
     214        printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n");
     215        testStatus = false;
     216    }
     217
     218    printf("----------------------------------------------------------------\n");
     219    printf("Calling pmSubtractSky() with NULL pmReadout->image.  Should error.\n\n");
    219220    myReadout->image = NULL;
    220221    rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
    221222    if (rc != NULL) {
    222         printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
    223         testStatus = false;
    224     }
    225     myReadout->image = tmpImageF32;
    226 
    227     printf("----------------------------------------------------------------\n");
    228     printf("Calling pmSubtractSky() with PS_TYPE_F64 psReadout->image.  Should error.\n\n");
     223        printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n");
     224        testStatus = false;
     225    }
     226    myReadout->image = tmpImageF32;
     227
     228    printf("----------------------------------------------------------------\n");
     229    printf("Calling pmSubtractSky() with PS_TYPE_F64 pmReadout->image.  Should error.\n\n");
    229230    myReadout->image = tmpImageF64;
    230231    rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
    231232    if (rc != NULL) {
    232         printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
     233        printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n");
    233234        testStatus = false;
    234235    }
     
    239240    rc = pmSubtractSky(myReadout, NULL, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
    240241    if (rc != myReadout) {
    241         printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
     242        printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n");
    242243        testStatus = false;
    243244    }
     
    247248    rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_NONE, 1, myStats, 2.0);
    248249    if (rc != myReadout) {
    249         printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
     250        printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n");
    250251        testStatus = false;
    251252    }
     
    255256    rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_SPLINE, 1, myStats, 2.0);
    256257    if (rc != myReadout) {
    257         printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
     258        printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n");
    258259        testStatus = false;
    259260    }
     
    347348    rc = pmSubtractSky(myReadout, (void *) myPoly, 54321, 1, myStats, -1.0);
    348349    if (rc != myReadout) {
    349         printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
     350        printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n");
    350351        testStatus = false;
    351352    }
Note: See TracChangeset for help on using the changeset viewer.