IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4581 for trunk/psLib/src/astro


Ignore:
Timestamp:
Jul 19, 2005, 3:21:13 PM (21 years ago)
Author:
drobbin
Message:

changed psPolynomial fxns to use F64 and removed psDPoly fxns

Location:
trunk/psLib/src/astro
Files:
2 edited

Legend:

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

    r4540 r4581  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-07-12 19:12:00 $
     12*  @version $Revision: 1.80 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-07-20 01:21:13 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    226226
    227227    psPlaneTransform *pt = psAlloc(sizeof(psPlaneTransform));
    228     pt->x = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);
    229     pt->y = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);
     228    pt->x = psPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);
     229    pt->y = psPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);
    230230
    231231    psMemSetDeallocator(pt, (psFreeFunc) planeTransformFree);
     
    246246    }
    247247
    248     out->x = psDPolynomial2DEval(
     248    out->x = psPolynomial2DEval(
    249249                 transform->x,
    250250                 coords->x,
     
    252252             );
    253253
    254     out->y = psDPolynomial2DEval(
     254    out->y = psPolynomial2DEval(
    255255                 transform->y,
    256256                 coords->x,
     
    275275
    276276    psPlaneDistort *pt = psAlloc(sizeof(psPlaneDistort));
    277     pt->x = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);
    278     pt->y = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);
     277    pt->x = psPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);
     278    pt->y = psPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);
    279279
    280280    psMemSetDeallocator(pt, (psFreeFunc) planeDistortFree);
     
    300300        out = (psPlane* ) psAlloc(sizeof(psPlane));
    301301    }
    302     out->x = psDPolynomial4DEval(
     302    out->x = psPolynomial4DEval(
    303303                 distort->x,
    304304                 coords->x,
     
    307307                 color
    308308             );
    309     out->y = psDPolynomial4DEval(
     309    out->y = psPolynomial4DEval(
    310310                 distort->y,
    311311                 coords->x,
     
    854854 *****************************************************************************/
    855855
    856 static psDPolynomial2D *multiplyDPoly2D(psDPolynomial2D *trans1,
    857                                         psDPolynomial2D *trans2)
     856static psPolynomial2D *multiplyDPoly2D(psPolynomial2D *trans1,
     857                                       psPolynomial2D *trans2)
    858858{
    859859    //TRACE: printf("multiplyDPoly2D(%d %d: %d %d)\n", trans1->nX, trans1->nY, trans2->nX, trans2->nY);
     
    861861    psS32 orderY = (trans1->nY + trans2->nY) - 1;
    862862
    863     psDPolynomial2D *out = psDPolynomial2DAlloc(orderX, orderY, PS_POLYNOMIAL_ORD);
     863    psPolynomial2D *out = psPolynomial2DAlloc(orderX, orderY, PS_POLYNOMIAL_ORD);
    864864    //TRACE: printf("Creating poly (%d, %d)\n", orderX, orderY);
    865865    for (psS32 i = 0 ; i < out->nX; i++) {
     
    966966    for (psS32 t2x = 0 ; t2x < trans2->x->nX ; t2x++) {
    967967        for (psS32 t2y = 0 ; t2y < trans2->x->nY ; t2y++) {
    968             psDPolynomial2D *currPoly = psDPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);
     968            psPolynomial2D *currPoly = psPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);
    969969
    970970            currPoly->coeff[0][0] = 1.0;
    971971            currPoly->mask[0][0] = 0;
    972             psDPolynomial2D *newPoly = NULL;
     972            psPolynomial2D *newPoly = NULL;
    973973
    974974            if (trans2->x->mask[t2x][t2y] == 0) {
     
    10011001    for (psS32 t2x = 0 ; t2x < trans2->y->nX ; t2x++) {
    10021002        for (psS32 t2y = 0 ; t2y < trans2->y->nY ; t2y++) {
    1003             psDPolynomial2D *currPoly = psDPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);
     1003            psPolynomial2D *currPoly = psPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);
    10041004            currPoly->coeff[0][0] = 1.0;
    10051005            currPoly->mask[0][0] = 0;
    1006             psDPolynomial2D *newPoly = NULL;
     1006            psPolynomial2D *newPoly = NULL;
    10071007
    10081008            if (trans2->y->mask[t2x][t2y] == 0) {
     
    10621062    // Create fake polynomial to use in evaluation
    10631063    //
    1064     psDPolynomial2D *fakePoly = psDPolynomial2DAlloc(order, order, PS_POLYNOMIAL_ORD);
     1064    psPolynomial2D *fakePoly = psPolynomial2DAlloc(order, order, PS_POLYNOMIAL_ORD);
    10651065    for (int i = 0; i < order; i++) {
    10661066        for (int j = 0; j < order; j++) {
     
    10981098                psF64 xOut = ((psPlane *) dest->data[g])->x;
    10991099                psF64 yOut = ((psPlane *) dest->data[g])->y;
    1100                 psF64 ijPoly = psDPolynomial2DEval(fakePoly, xIn, yIn);
     1100                psF64 ijPoly = psPolynomial2DEval(fakePoly, xIn, yIn);
    11011101                fakePoly->mask[i][j] = 1;
    11021102
     
    11041104                    for (psS32 n = 0; n < order - m; n++, mnIndex++) {
    11051105                        fakePoly->mask[m][n] = 0;
    1106                         psF64 mnPoly = psDPolynomial2DEval(fakePoly, xIn, yIn);
     1106                        psF64 mnPoly = psPolynomial2DEval(fakePoly, xIn, yIn);
    11071107                        fakePoly->mask[m][n] = 1;
    11081108
  • trunk/psLib/src/astro/psCoord.h

    r4401 r4581  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-06-27 20:38:11 $
     12*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-07-20 01:21:13 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7171typedef struct
    7272{
    73     psDPolynomial2D* x;         ///< 2D polynomial transform of X coordinates
    74     psDPolynomial2D* y;         ///< 2D polynomial transform of Y coordinates
     73    psPolynomial2D* x;         ///< 2D polynomial transform of X coordinates
     74    psPolynomial2D* y;         ///< 2D polynomial transform of Y coordinates
    7575}
    7676psPlaneTransform;
     
    9090typedef struct
    9191{
    92     psDPolynomial4D* x;         ///< 4D polynomial transform of X coordinates
    93     psDPolynomial4D* y;         ///< 4D polynomial transform of Y coordinates
     92    psPolynomial4D* x;         ///< 4D polynomial transform of X coordinates
     93    psPolynomial4D* y;         ///< 4D polynomial transform of Y coordinates
    9494}
    9595psPlaneDistort;
Note: See TracChangeset for help on using the changeset viewer.