IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 30, 2006, 12:56:01 PM (20 years ago)
Author:
drobbin
Message:

Added test for PlaneTransformDeriv in Coord02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astro/tst_psCoord.c

    r6251 r6253  
    66*  @author GLG, MHPCC
    77*
    8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-01-30 20:28:34 $
     8*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-01-30 22:56:01 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    396396    }
    397397
    398     input = psPixelsAlloc(5);
     398    input = psPixelsAlloc(1);
    399399    /*    for (int i = 0; i < 2; i++) {
    400400            input->data[i].x = i*1.0;
     
    403403    */
    404404    input->data[0].x = 1.0;
    405     input->data[0].y = 2.0;
    406     input->data[1].x = 1.0;
    407     input->data[1].y = 3.0;
    408     trans->x->nX = 1;
     405    input->data[0].y = 1.0;
     406    //    input->data[1].x = 1.0;
     407    //    input->data[1].y = 6.0;
     408    trans->x->nX = 2;
    409409    trans->x->nY = 0;
    410     trans->y->nX = 1;
    411     trans->y->nY = 0;
     410    trans->y->nX = 0;
     411    trans->y->nY = 2;
    412412    trans->x->coeff[0][0] = 0;
    413     trans->x->coeff[1][0] = 1;
     413    trans->x->coeff[1][0] = 1.0;
    414414    trans->y->coeff[0][0] = 0;
    415     trans->y->coeff[1][0] = 2;
     415    trans->y->coeff[0][0] = 0;
     416    trans->y->coeff[0][2] = 0.5;
    416417
    417418    //Verify that the output pixels are what we expected
    418419    output = psPixelsTransform(output, input, trans);
    419     printf("\n output return %ld pixels\n\n", output->n);
    420     int nExpected = 1;
     420    printf("\n output returned with %ld pixels\n\n", output->n);
     421    int nExpected = 9;
    421422    if (output->n != nExpected) {
    422423        psError(PS_ERR_BAD_PARAMETER_SIZE, false,
    423424                "psPixelsTransform failed to return the expected number of pixels.\n");
     425        for (int i = 0; i < output->n; i++) {
     426            printf("  (%6.2lf, %6.2lf) pixel %d\n", output->data[i].x, output->data[i].y, i);
     427        }
    424428        return 3;
    425429    }
    426430
     431    psFree(trans);
    427432    psFree(input);
    428433    psFree(output);
    429     psFree(trans);
    430434
    431435    return 0;
Note: See TracChangeset for help on using the changeset viewer.