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_pmSubtractBias.c

    r3582 r4770  
    1414 *  @author GLG, MHPCC
    1515 *
    16  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-03-31 02:01:57 $
     16 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-08-16 01:10:36 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242int main(int argc, char* argv[])
    4343{
     44    psLogSetFormat("HLNM");
    4445    return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
    4546}
     
    4849#define NUM_COLS 8
    4950/******************************************************************************
    50 doSubtractBiasFullFrame(): a sample psReadout as well as a bias image are
    51 created and the bias image is subtracted from the psReadout.
     51doSubtractBiasFullFrame(): a sample pmReadout as well as a bias image are
     52created and the bias image is subtracted from the pmReadout.
    5253 *****************************************************************************/
    5354int doSubtractBiasFullFrame(int numCols, int numRows)
     
    6061    psImage *tmpImage1 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    6162    psImage *tmpImage2 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    62     //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImage1);
    63     //    psReadout *myBias = psReadoutAlloc(numCols, numRows, tmpImage2);
    64     psReadout *myReadout = psReadoutAlloc();
    65     psReadout *myBias = psReadoutAlloc();
     63    //    pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImage1);
     64    //    pmReadout *myBias = pmReadoutAlloc(numCols, numRows, tmpImage2);
     65    pmReadout *myReadout = pmReadoutAlloc(NULL);
     66    pmReadout *myBias = pmReadoutAlloc(NULL);
    6667    myReadout->image = tmpImage1;
    6768    myBias->image = tmpImage2;
     
    110111
    111112/******************************************************************************
    112 doSubtractFullOverscans(): a sample psReadout as well as several overscan
     113doSubtractFullOverscans(): a sample pmReadout as well as several overscan
    113114images of the same size are created.  The overscan images are then subtracted
    114 from the psReadout.
     115from the pmReadout.
    115116 *****************************************************************************/
    116117int doSubtractFullOverscans(int numCols, int numRows)
     
    125126    psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    126127    psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    127     //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImage1);
    128     psReadout *myReadout = psReadoutAlloc();
     128    //    pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImage1);
     129    pmReadout *myReadout = pmReadoutAlloc(NULL);
    129130    myReadout->image = tmpImage1;
    130131
     
    185186
    186187/******************************************************************************
    187 doSubtractFullOverscans(): a sample psReadout as well as several overscan
     188doSubtractFullOverscans(): a sample pmReadout as well as several overscan
    188189images of the same size are created.  The overscan images are collected
    189 pixel-by-pixel then subtracted column-wise from the psReadout.
     190pixel-by-pixel then subtracted column-wise from the pmReadout.
    190191 *****************************************************************************/
    191192int doSubtractFullOverscanColumns(int numCols, int numRows)
     
    200201    psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    201202    psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    202     psReadout *myReadout = psReadoutAlloc();
     203    pmReadout *myReadout = pmReadoutAlloc(NULL);
    203204    myReadout->image = tmpImage1;
    204205    psList *list;
     
    245246}
    246247/******************************************************************************
    247 doSubtractFullOverscans(): a sample psReadout as well as several overscan
     248doSubtractFullOverscans(): a sample pmReadout as well as several overscan
    248249images of the same size are created.  The overscan images are collected
    249 pixel-by-pixel then subtracted column-wise from the psReadout.
     250pixel-by-pixel then subtracted column-wise from the pmReadout.
    250251 *****************************************************************************/
    251252int doSubtractFullOverscanColumnsPoly(int numCols, int numRows)
     
    260261    psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    261262    psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    262     psReadout *myReadout = psReadoutAlloc();
     263    pmReadout *myReadout = pmReadoutAlloc(NULL);
    263264    myReadout->image = tmpImage1;
    264265    psList *list;
     
    307308}
    308309/******************************************************************************
    309 doSubtractFullOverscansSmall(): a sample psReadout as well as several overscan
     310doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan
    310311images of smaller size are created.  The overscan images are collected
    311 pixel-by-pixel then subtracted column-wise from the psReadout.
     312pixel-by-pixel then subtracted column-wise from the pmReadout.
    312313 *****************************************************************************/
    313314int doSubtractFullOverscanColumnsSmall(int numCols, int numRows)
     
    319320    int testStatus = 0;
    320321    psImage *tmpImage1 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    321     psReadout *myReadout = psReadoutAlloc();
     322    pmReadout *myReadout = pmReadoutAlloc(NULL);
    322323    myReadout->image = tmpImage1;
    323324    psImage *tmpImage2 = psImageAlloc(numCols/2, numRows/2, PS_TYPE_F32);
     
    390391
    391392/******************************************************************************
    392 doSubtractFullOverscans(): a sample psReadout as well as several overscan
     393doSubtractFullOverscans(): a sample pmReadout as well as several overscan
    393394images of the same size are created.  The overscan images are collected
    394 pixel-by-pixel then subtracted row-wise from the psReadout.
     395pixel-by-pixel then subtracted row-wise from the pmReadout.
    395396 *****************************************************************************/
    396397int doSubtractFullOverscanRows(int numCols, int numRows)
     
    405406    psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    406407    psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    407     psReadout *myReadout = psReadoutAlloc();
     408    pmReadout *myReadout = pmReadoutAlloc(NULL);
    408409    myReadout->image = tmpImage1;
    409410    psList *list;
     
    451452
    452453/******************************************************************************
    453 doSubtractFullOverscansSmall(): a sample psReadout as well as several overscan
     454doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan
    454455images of smaller size are created.  The overscan images are collected
    455 pixel-by-pixel then subtracted row-wise from the psReadout.
     456pixel-by-pixel then subtracted row-wise from the pmReadout.
    456457 *****************************************************************************/
    457458int doSubtractFullOverscanRowsSmall(int numCols, int numRows)
     
    474475    psImage *tmpImage3 = psImageAlloc(OSnumCols, OSnumRows, PS_TYPE_F32);
    475476    psImage *tmpImage4 = psImageAlloc(OSnumCols, OSnumRows, PS_TYPE_F32);
    476     psReadout *myReadout = psReadoutAlloc();
     477    pmReadout *myReadout = pmReadoutAlloc(NULL);
    477478    myReadout->image = tmpImage1;
    478479    psList *list;
     
    554555    psImage *tmpImage3Short = psImageAlloc(numCols-1, numRows-1, PS_TYPE_F32);
    555556    psImage *tmpImage4Short = psImageAlloc(numCols-1, numRows-1, PS_TYPE_F32);
    556     psReadout *myReadout = psReadoutAlloc();
     557    pmReadout *myReadout = pmReadoutAlloc(NULL);
    557558    myReadout->image = tmpImage1;
    558     psReadout *rc = NULL;
     559    pmReadout *rc = NULL;
    559560    psList *list;
    560561    psList *listShort;
    561562    psStats *stat = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    562563    psImage *tmpImage5 = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    563     psReadout *myBias = psReadoutAlloc();
     564    pmReadout *myBias = pmReadoutAlloc(NULL);
    564565    myBias->image = tmpImage5;
    565566    printPositiveTestHeader(stdout, "pmSubtractBias", "Testing input parameter error conditions");
    566567
    567568    psImage *tmpImage5ShortRows = psImageAlloc(numCols, numRows-1, PS_TYPE_F32);
    568     psReadout *myBiasShortRows = psReadoutAlloc();
     569    pmReadout *myBiasShortRows = pmReadoutAlloc(NULL);
    569570    myBiasShortRows->image = tmpImage5ShortRows;
    570571    psImage *tmpImage5ShortCols = psImageAlloc(numCols-1, numRows, PS_TYPE_F32);
    571     psReadout *myBiasShortCols = psReadoutAlloc();
     572    pmReadout *myBiasShortCols = pmReadoutAlloc(NULL);
    572573    myBiasShortCols->image = tmpImage5ShortCols;
    573574
     
    611612    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ALL, stat, 0, PM_FIT_NONE, NULL);
    612613    if (rc != myReadout) {
    613         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     614        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    614615        testStatus = false;
    615616    }
     
    619620    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ROWS, stat, 0, PM_FIT_NONE, NULL);
    620621    if (rc != myReadout) {
    621         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     622        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    622623        testStatus = false;
    623624        psFree(rc);
     
    628629    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_COLUMNS, stat, 0, PM_FIT_NONE, NULL);
    629630    if (rc != myReadout) {
    630         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     631        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    631632        testStatus = false;
    632633        psFree(rc);
     
    694695    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat, 0, PM_FIT_SPLINE, myBias);
    695696    if (rc != myReadout) {
    696         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     697        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    697698        testStatus = false;
    698699        psFree(rc);
     
    770771                               0, PM_FIT_NONE, myBiasShortRows);
    771772    if (rc != myReadout) {
    772         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     773        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    773774        testStatus = false;
    774775        psFree(rc);
     
    781782                               0, PM_FIT_NONE, myBiasShortCols);
    782783    if (rc != myReadout) {
    783         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     784        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    784785        testStatus = false;
    785786        psFree(rc);
     
    791792                               0, 54321, NULL);
    792793    if (rc != myReadout) {
    793         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     794        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    794795        testStatus = false;
    795796        psFree(rc);
     
    801802                               0, PM_FIT_NONE, NULL);
    802803    if (rc != myReadout) {
    803         printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
     804        printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n");
    804805        testStatus = false;
    805806        psFree(rc);
     
    847848
    848849/******************************************************************************
    849 doSubtractFullOverscansSmall(): a sample psReadout as well as several overscan
     850doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan
    850851images of smaller size are created.  The overscan images are collected
    851 pixel-by-pixel then subtracted column-wise from the psReadout.
     852pixel-by-pixel then subtracted column-wise from the pmReadout.
    852853 *****************************************************************************/
    853854int doSubtractFullOverscanColumnsGeneric(int imageNumCols,
     
    866867
    867868    psImage *tmpImage1 = psImageAlloc(imageNumCols, imageNumRows, PS_TYPE_F32);
    868     //    psReadout *myReadout = psReadoutAlloc(imageNumCols, imageNumRows, tmpImage1);
    869     psReadout *myReadout = psReadoutAlloc();
     869    //    pmReadout *myReadout = pmReadoutAlloc(imageNumCols, imageNumRows, tmpImage1);
     870    pmReadout *myReadout = pmReadoutAlloc(NULL);
    870871    myReadout->image = tmpImage1;
    871872    for (i=0;i<imageNumRows;i++) {
Note: See TracChangeset for help on using the changeset viewer.