IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2005, 7:46:24 PM (21 years ago)
Author:
gusciora
Message:

Improved the psTransformFit() tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r3714 r3715  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-04-19 04:16:02 $
     12*  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-04-19 05:46:24 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9191XXX: Since thre is now a general psPlaneTransformInvert() function, we
    9292should rename this.
    93  
    94 X1, Y1 = (2, 3)
    95  
    96     X2 = 1 + 4 + 9   = 14
    97     Y2 = 4 + 10 + 18 = 32
    98  
    99 in inverse
    100  
    101 Y1 = (32 - ((5/2) * 14) - 4 + ((5)/2)) / (6 - ((15)/2));
    102 Y1 = (32 - 35 - 4 + (5/2)) / (6 - 15/2);
    103 Y1 = (-7 + (5/2)) / (12/2 - 15/2);
    104 Y1 = (-7 + (5/2)) / (-3/2);
    105 Y1 = (-14/2 + 5/2) / (-3/2);
    106 Y1 = (-9/2) / (-3/2);
    107 Y1 = (9/2) / (3/2);
    108 Y1 = 3
    109  
    110 X1 = (Y2 - ((F/C) * X2) - D + ((F*A)/C)) / (E - ((F*B)/C));
    111 X1 = (32 - ((6/3) * 14) - 4 + ((6)/3)) / (5 - ((12)/3));
    112 X1 = (32 - (2 * 14) - 4 + 2 / (5 - 4);
    113 X1 = (32 - 28 - 4 + 2) / 1;
    114 X1 = 2;
    115  
    11693 *****************************************************************************/
    11794psPlaneTransform *p_psPlaneTransformLinearInvert(psPlaneTransform *transform)
     
    128105    psF64 F = 0.0;
    129106
    130     // XXX: Test this for correctness.
    131107    A = transform->x->coeff[0][0];
    132108    if (transform->x->nX >= 2) {
     
    144120    }
    145121
    146     // XXX: Use the constructor here.
    147122    psPlaneTransform *out = psPlaneTransformAlloc(2, 2);
    148123
     
    877852                for (psS32 t2x = 0 ; t2x < trans2->nX ; t2x++) {
    878853                    for (psS32 t2y = 0 ; t2y < trans2->nY ; t2y++) {
    879                         /* VERIFY MACRO
     854                        /* Possible debug-only macro which checks these coords?
    880855                        if ((t1x+t2x) >= orderX)
    881                             printf("CRAP 1\n");
     856                            printf("BAD 1\n");
    882857                        if ((t1y+t2y) >= orderY)
    883                             printf("CRAP 2\n");
     858                            printf("BAD 2\n");
    884859                        */
    885860                        out->coeff[t1x+t2x][t1y+t2y]+= (trans1->coeff[t1x][t1y] * trans2->coeff[t2x][t2y]);
     
    10511026
    10521027    psS32 numCoords = PS_MIN(source->n, dest->n);
    1053     // This is not really necessary because of above conditionals.
    10541028    psS32 order = PS_MAX(trans->x->nX, trans->x->nY);
    10551029
Note: See TracChangeset for help on using the changeset viewer.