IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2006, 1:24:21 PM (20 years ago)
Author:
drobbin
Message:

Fixed Time conversions and ToMJD & ToJD fxns to use TAI type. Updated transforms tests.

File:
1 edited

Legend:

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

    r6253 r6268  
    66*  @author GLG, MHPCC
    77*
    8 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-01-30 22:56:01 $
     8*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-01-31 23:24:21 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    377377    psPixels *input = NULL;
    378378    psPixels *output = NULL;
    379     psPlaneTransform *trans = psPlaneTransformAlloc(2, 0);
     379    psPlaneTransform *trans = psPlaneTransformAlloc(1, 3);
    380380
    381381    //Return NULL for NULL input pixels
     
    396396    }
    397397
    398     input = psPixelsAlloc(1);
    399     /*    for (int i = 0; i < 2; i++) {
    400             input->data[i].x = i*1.0;
    401             input->data[i].y = i*1.0;
    402         }
    403     */
     398    input = psPixelsAlloc(2);
    404399    input->data[0].x = 1.0;
    405400    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;
    409     trans->x->nY = 0;
    410     trans->y->nX = 0;
    411     trans->y->nY = 2;
     401    input->data[1].x = 1.0;
     402    input->data[1].y = 6.0;
    412403    trans->x->coeff[0][0] = 0;
    413404    trans->x->coeff[1][0] = 1.0;
     
    418409    //Verify that the output pixels are what we expected
    419410    output = psPixelsTransform(output, input, trans);
    420     printf("\n output returned with %ld pixels\n\n", output->n);
    421411    int nExpected = 9;
    422412    if (output->n != nExpected) {
    423413        psError(PS_ERR_BAD_PARAMETER_SIZE, false,
    424414                "psPixelsTransform failed to return the expected number of pixels.\n");
     415        printf("\n output returned with %ld pixels\n\n", output->n);
    425416        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);
     417            printf("  (%6.2lf, %6.2lf) pixel %d\n", output->data[i].x, output->data[i].y, i+1);
    427418        }
    428419        return 3;
Note: See TracChangeset for help on using the changeset viewer.