Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 3539)
+++ trunk/psLib/src/astro/psCoord.c	(revision 3540)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-22 01:35:49 $
+*  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-29 19:41:56 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -191,49 +191,4 @@
     return (out);
 }
-
-// XXX: Must code this.
-psPlaneTransform *psPlaneTransformInvert(
-    psPlaneTransform *out,
-    const psPlaneTransform *in,
-    psRegion *region,
-    int nSamples)
-{
-    PS_PTR_CHECK_NULL(in, NULL);
-    PS_PTR_CHECK_NULL(region, NULL);
-
-    return(NULL);
-}
-
-
-// XXX: Must code this.
-psPlaneTransform *psPlaneTransformCombine(
-    psPlaneTransform *out,
-    const psPlaneTransform *trans1,
-    const psPlaneTransform *trans2)
-{
-    PS_PTR_CHECK_NULL(trans1, NULL);
-    PS_PTR_CHECK_NULL(trans2, NULL);
-
-    return(NULL);
-}
-
-
-// XXX: Must code this.
-// XXX: What about nRejIter?  Iterations?
-
-bool psPlaneTranformFit(
-    psPlaneTransform *trans,
-    const psArray *source,
-    const psArray *dest,
-    int nRejIter,
-    float sigmaClip)
-{
-    PS_PTR_CHECK_NULL(trans, NULL);
-    PS_PTR_CHECK_NULL(source, NULL);
-    PS_PTR_CHECK_NULL(dest, NULL);
-
-    return(NULL);
-}
-
 
 /******************************************************************************
Index: trunk/psLib/src/astro/psCoord.h
===================================================================
--- trunk/psLib/src/astro/psCoord.h	(revision 3539)
+++ trunk/psLib/src/astro/psCoord.h	(revision 3540)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-18 21:34:43 $
+*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-29 19:41:56 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -227,30 +227,4 @@
 );
 
-// XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformInvert(
-    psPlaneTransform *out,
-    const psPlaneTransform *in,
-    psRegion *region,
-    int nSamples
-);
-
-// XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformCombine(
-    psPlaneTransform *out,
-    const psPlaneTransform *trans1,
-    const psPlaneTransform *trans2
-);
-
-// XXX: Doxygenate.
-bool psPlaneTranformFit(
-    psPlaneTransform *trans,
-    const psArray *source,
-    const psArray *dest,
-    int nRejIter,
-    float sigmaClip
-);
-
-
-
 /** Allocator for psSphereTransform
  *
Index: trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- trunk/psLib/src/astronomy/psAstrometry.c	(revision 3539)
+++ trunk/psLib/src/astronomy/psAstrometry.c	(revision 3540)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-24 22:36:16 $
+ *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-29 19:41:56 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -913,152 +913,4 @@
 
 
-
-
-
-/*****************************************************************************
-psPlaneTransformInvertHEY(out, in, region, nSamples): this is an earlier
-version of this function which doesnot separate the code for building and
-solving the matrixequations.
- 
-XXX: Delete this codeonce you know the other version works.
- *****************************************************************************/
-psPlaneTransform *psPlaneTransformInvertHEY(psPlaneTransform *out,
-        const psPlaneTransform *in,
-        psRegion *region,
-        int nSamples)
-{
-    PS_PTR_CHECK_NULL(in, NULL);
-    if (isProjectionLinear((psPlaneTransform *) in)) {
-        return(invertPlaneTransform((psPlaneTransform *) in));
-    }
-    psPlaneTransform *myPT = NULL;
-    psPlane *inCoord = psPlaneAlloc();
-    psPlane *outCoord = psPlaneAlloc();
-
-    PS_PTR_CHECK_NULL(region, NULL);
-    PS_INT_COMPARE(0, nSamples, NULL);
-
-    // XXX: Is this correct?
-    psS32 order = PS_MAX(in->x->nX, in->x->nY);
-
-    //
-    // Allocate a new psPlaneTransform if "out" is NULL, or has the wrong size.
-    //
-    if (out == NULL) {
-        myPT = psPlaneTransformAlloc(order, order);
-    } else {
-        if (!((out->x->nX == order) &&
-                (out->x->nY == order) &&
-                (out->y->nX == order) &&
-                (out->y->nY == order))) {
-            psFree(out);
-            myPT = psPlaneTransformAlloc(order, order);
-        } else {
-            myPT = out;
-        }
-    }
-    // XXX: Initialize myPT?
-
-    //
-    // Create fake polynomial to use in evaluation
-    //
-    psDPolynomial2D *fakePoly = psDPolynomial2DAlloc(order, order, PS_POLYNOMIAL_ORD);
-    for (int i = 0; i < order; i++) {
-        for (int j = 0; j < order; j++) {
-            fakePoly->coeff[i][j] = 1.0; // Set all coeffecients to 1
-            fakePoly->mask[i][j] = 1; // Mask all coefficients; unmask to evaluate
-        }
-    }
-
-    //
-    // Create a grid of xin,yin --> xout,yout
-    //
-    psVector *xIn = psVectorAlloc(nSamples * nSamples, PS_TYPE_F32);
-    psVector *yIn = psVectorAlloc(nSamples * nSamples, PS_TYPE_F32);
-    psVector *xOut = psVectorAlloc(nSamples * nSamples, PS_TYPE_F32);
-    psVector *yOut = psVectorAlloc(nSamples * nSamples, PS_TYPE_F32);
-
-    //
-    // Initialize the grid of points
-    //
-    for (int yint = 0; yint < nSamples; yint++) {
-        inCoord->y = region->y0 + ((psF32) yint) * ((region->y1 - region->y0) / ((psF32) nSamples));
-        for (int xint = 0; xint < nSamples; xint++) {
-            inCoord->x = region->x0 + ((psF32) xint) * ((region->x1 - region->x0) / ((psF32) nSamples));
-
-            (void)psPlaneTransformApply(outCoord, in, inCoord);
-            xOut->data.F32[yint*nSamples + xint] = inCoord->x;
-            yOut->data.F32[yint*nSamples + xint] = inCoord->y;
-            xIn->data.F32[yint*nSamples + xint] = outCoord->x;
-            yIn->data.F32[yint*nSamples + xint] = outCoord->y;
-        }
-    }
-
-    //
-    // Initialise the matrix and vectors
-    //
-    psS32 nCoeff = order * (order + 1) / 2; // Number of polynomial coefficients
-    psImage *matrix = psImageAlloc(nCoeff, nCoeff, PS_TYPE_F64); // Matrix for solution
-    psVector *xVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in x
-    psVector *yVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in y
-    for (psS32 i = 0; i < nCoeff; i++) {
-        for (psS32 j = 0; j < nCoeff; j++) {
-            matrix->data.F64[i][j] = 0.0;
-        }
-        xVector->data.F64[i] = 0.0;
-        yVector->data.F64[i] = 0.0;
-    }
-
-    //
-    // Iterate over the grid points
-    //
-    for (psS32 g = 0; g < nSamples*nSamples; g++) {
-        // Iterate over the polynomial coefficients, accumulating the matrix and vectors
-
-        for (psS32 i = 0, ijIndex = 0; i < order; i++) {
-            for (psS32 j = 0; j < order - i; j++, ijIndex++) {
-
-                fakePoly->mask[i][j] = 0;
-                psF64 ijPoly = psDPolynomial2DEval(fakePoly, (psF64) xIn->data.F32[g], (psF64) yIn->data.F32[g]);
-                fakePoly->mask[i][j] = 1;
-
-                for (psS32 m = 0, mnIndex = 0; m < order; m++) {
-                    for (psS32 n = 0; n < order - m; n++, mnIndex++) {
-                        fakePoly->mask[m][n] = 0;
-                        psF64 mnPoly = psDPolynomial2DEval(fakePoly, (psF64) xIn->data.F32[g], (psF64) yIn->data.F32[g]);
-                        fakePoly->mask[m][n] = 1;
-
-                        matrix->data.F64[ijIndex][mnIndex] += ijPoly * mnPoly;
-                    }
-                }
-
-                xVector->data.F64[ijIndex] += ijPoly * (psF64)xOut->data.F32[g];
-                yVector->data.F64[ijIndex] += ijPoly * (psF64)yOut->data.F32[g];
-            }
-        }
-    }
-
-    //
-    // Solution via LU Decomposition
-    //
-    psVector *permutation = psVectorAlloc(nCoeff, PS_TYPE_F64); // Permutation vector for LU Decomposition
-    psImage *luMatrix = psMatrixLUD(NULL, &permutation, matrix); // LU decomposed matrix
-    psVector *xSolution = psMatrixLUSolve(NULL, luMatrix, xVector, permutation); // Solution in x
-    psVector *ySolution = psMatrixLUSolve(NULL, luMatrix, yVector, permutation); // Solution in y
-
-    //
-    // Stuff coefficients into transformation
-    //
-    for (psS32 i = 0, ijIndex = 0; i < order; i++) {
-        for (psS32 j = 0; j < order - i; j++, ijIndex++) {
-            myPT->x->coeff[i][j] = xSolution->data.F64[ijIndex];
-            myPT->y->coeff[i][j] = ySolution->data.F64[ijIndex];
-        }
-    }
-
-    return(myPT);
-}
-
-
 /*****************************************************************************
 multiplyCoeffs(trans1, trans2): Takes two 2-D polynomials as input and
@@ -1100,10 +952,10 @@
 
 /*****************************************************************************
-psPlaneTransformCombineTmp(out, trans1, trans2)
+psPlaneTransformCombine(out, trans1, trans2)
  
 XXX: Much room for optimization.  Currently, we call the polyMultiply
 routine far too many times.
  *****************************************************************************/
-psPlaneTransform *psPlaneTransformCombineTmp(psPlaneTransform *out,
+psPlaneTransform *psPlaneTransformCombine(psPlaneTransform *out,
         const psPlaneTransform *trans1,
         const psPlaneTransform *trans2)
@@ -1240,14 +1092,14 @@
 
 /*****************************************************************************
-psPlaneTranformFitTmp(trans, source, dest, nRejIter, sigmaClip)
+psPlaneTranformFit(trans, source, dest, nRejIter, sigmaClip)
  
 XXX: What about nRejIter?  Iterations?
 XXX: Use static vectors for internal data.
  *****************************************************************************/
-bool psPlaneTranformFitTmp(psPlaneTransform *trans,
-                           const psArray *source,
-                           const psArray *dest,
-                           int nRejIter,
-                           float sigmaClip)
+bool psPlaneTranformFit(psPlaneTransform *trans,
+                        const psArray *source,
+                        const psArray *dest,
+                        int nRejIter,
+                        float sigmaClip)
 {
     PS_PTR_CHECK_NULL(trans, NULL);
@@ -1360,9 +1212,9 @@
 
 /*****************************************************************************
-psPlaneTransformInvertTmp(out, in, region, nSamples)
+psPlaneTransformInvert(out, in, region, nSamples)
  
 // XXX: Use static data structures.
  *****************************************************************************/
-psPlaneTransform *psPlaneTransformInvertTmp(psPlaneTransform *out,
+psPlaneTransform *psPlaneTransformInvert(psPlaneTransform *out,
         const psPlaneTransform *in,
         psRegion *region,
@@ -1448,5 +1300,5 @@
         }
     }
-    bool rc = psPlaneTranformFitTmp(myPT, inData, outData, 10, 100.0);
+    bool rc = psPlaneTranformFit(myPT, inData, outData, 10, 100.0);
 
     psFree(inCoord);
Index: trunk/psLib/src/astronomy/psAstrometry.h
===================================================================
--- trunk/psLib/src/astronomy/psAstrometry.h	(revision 3539)
+++ trunk/psLib/src/astronomy/psAstrometry.h	(revision 3540)
@@ -8,6 +8,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-24 22:36:16 $
+*  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-29 19:41:56 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -537,5 +537,5 @@
 // XXX: These functions don't belong here.  Will migrate to psCoords.c later.
 // XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformInvertTmp(
+psPlaneTransform *psPlaneTransformInvert(
     psPlaneTransform *out,
     const psPlaneTransform *in,
@@ -545,5 +545,5 @@
 
 // XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformCombineTmp(
+psPlaneTransform *psPlaneTransformCombine(
     psPlaneTransform *out,
     const psPlaneTransform *trans1,
@@ -552,5 +552,5 @@
 
 // XXX: Doxygenate.
-bool psPlaneTranformFitTmp(
+bool psPlaneTranformFit(
     psPlaneTransform *trans,
     const psArray *source,
Index: trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- trunk/psLib/src/astronomy/psCoord.c	(revision 3539)
+++ trunk/psLib/src/astronomy/psCoord.c	(revision 3540)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-22 01:35:49 $
+*  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-29 19:41:56 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -191,49 +191,4 @@
     return (out);
 }
-
-// XXX: Must code this.
-psPlaneTransform *psPlaneTransformInvert(
-    psPlaneTransform *out,
-    const psPlaneTransform *in,
-    psRegion *region,
-    int nSamples)
-{
-    PS_PTR_CHECK_NULL(in, NULL);
-    PS_PTR_CHECK_NULL(region, NULL);
-
-    return(NULL);
-}
-
-
-// XXX: Must code this.
-psPlaneTransform *psPlaneTransformCombine(
-    psPlaneTransform *out,
-    const psPlaneTransform *trans1,
-    const psPlaneTransform *trans2)
-{
-    PS_PTR_CHECK_NULL(trans1, NULL);
-    PS_PTR_CHECK_NULL(trans2, NULL);
-
-    return(NULL);
-}
-
-
-// XXX: Must code this.
-// XXX: What about nRejIter?  Iterations?
-
-bool psPlaneTranformFit(
-    psPlaneTransform *trans,
-    const psArray *source,
-    const psArray *dest,
-    int nRejIter,
-    float sigmaClip)
-{
-    PS_PTR_CHECK_NULL(trans, NULL);
-    PS_PTR_CHECK_NULL(source, NULL);
-    PS_PTR_CHECK_NULL(dest, NULL);
-
-    return(NULL);
-}
-
 
 /******************************************************************************
Index: trunk/psLib/src/astronomy/psCoord.h
===================================================================
--- trunk/psLib/src/astronomy/psCoord.h	(revision 3539)
+++ trunk/psLib/src/astronomy/psCoord.h	(revision 3540)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-18 21:34:43 $
+*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-29 19:41:56 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -227,30 +227,4 @@
 );
 
-// XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformInvert(
-    psPlaneTransform *out,
-    const psPlaneTransform *in,
-    psRegion *region,
-    int nSamples
-);
-
-// XXX: Doxygenate.
-psPlaneTransform *psPlaneTransformCombine(
-    psPlaneTransform *out,
-    const psPlaneTransform *trans1,
-    const psPlaneTransform *trans2
-);
-
-// XXX: Doxygenate.
-bool psPlaneTranformFit(
-    psPlaneTransform *trans,
-    const psArray *source,
-    const psArray *dest,
-    int nRejIter,
-    float sigmaClip
-);
-
-
-
 /** Allocator for psSphereTransform
  *
Index: trunk/psLib/src/dataManip/psMinimize.c
===================================================================
--- trunk/psLib/src/dataManip/psMinimize.c	(revision 3539)
+++ trunk/psLib/src/dataManip/psMinimize.c	(revision 3540)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.107 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-22 21:52:49 $
+ *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-29 19:41:56 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1414,4 +1414,5 @@
 XXX: Since this is an internal function, many of the parameter checks are
      redundant.
+XXX: Don't modify the psMinimization argument.
  *****************************************************************************/
 #define PS_LINEMIN_MAX_ITERATIONS 30
Index: trunk/psLib/src/dataManip/psStats.c
===================================================================
--- trunk/psLib/src/dataManip/psStats.c	(revision 3539)
+++ trunk/psLib/src/dataManip/psStats.c	(revision 3540)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.121 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-28 22:49:33 $
+ *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-29 19:41:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
Index: trunk/psLib/src/math/psMinimize.c
===================================================================
--- trunk/psLib/src/math/psMinimize.c	(revision 3539)
+++ trunk/psLib/src/math/psMinimize.c	(revision 3540)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.107 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-22 21:52:49 $
+ *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-29 19:41:56 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1414,4 +1414,5 @@
 XXX: Since this is an internal function, many of the parameter checks are
      redundant.
+XXX: Don't modify the psMinimization argument.
  *****************************************************************************/
 #define PS_LINEMIN_MAX_ITERATIONS 30
Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 3539)
+++ trunk/psLib/src/math/psStats.c	(revision 3540)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.121 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-28 22:49:33 $
+ *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-29 19:41:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
