IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 19, 2005, 1:58:47 PM (20 years ago)
Author:
gusciora
Message:

Implemented the chi-squared algorithm for calculated Chebyshev poly
coefficients.

File:
1 edited

Legend:

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

    r5682 r5813  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.96 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-12-05 21:33:29 $
     12*  @version $Revision: 1.97 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-12-19 23:58:47 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6161should rename this.
    6262 
    63 XXX: Use the ADD version which is based on determinants.
    64  
    6563XXX: This code no longer makes sense.  The merge must be reviewed.
    6664 *****************************************************************************/
     
    8583
    8684    if (0) {
    87         //This is sample code from IfA.  It didn't work initially, and I did not
    88         //spend any time debugging it.
    89         psF64 a = transform->x->coeff[1][0];
    90         psF64 b = transform->x->coeff[0][1];
    91         psF64 c = transform->y->coeff[1][0];
    92         psF64 d = transform->y->coeff[0][1];
    93         psF64 e = transform->x->coeff[0][0];
    94         psF64 f = transform->y->coeff[0][0];
    95 
    96         psF64 invDet = 1.0 / (a * d - b * c); // Inverse of the determinant
    97 
    98         // Not entirely sure why this works, but it appears to do so
    99         out->x->coeff[1][0] = invDet * a;
    100         out->x->coeff[0][1] = - invDet * b;
    101         out->y->coeff[1][0] = - invDet * c;
    102         out->y->coeff[0][1] = invDet * d;
    103 
    104         out->x->coeff[0][0] = - invDet * (d * e + c * f);
    105         out->y->coeff[0][0] = - invDet * (b * e + a * f);
    106     }
    107 
    108     if (1) {
    109         // XXX: There is no reason to execute this code and the following code.
     85        // XXX: Get rid of this code.
    11086        psF64 A = transform->x->coeff[1][0];
    11187        psF64 B = transform->x->coeff[0][1];
     
    129105    }
    130106
    131 
    132     // XXX: There is no reason to execute this code and the previous codes.
    133     // unless the cross terms are available, set these matrix elements to 0
    134107    psF64 r12 = 0.0;
    135108    if (transform->x->nY == 1) {
Note: See TracChangeset for help on using the changeset viewer.