Index: trunk/psLib/src/math/psMinimize.c
===================================================================
--- trunk/psLib/src/math/psMinimize.c	(revision 4753)
+++ trunk/psLib/src/math/psMinimize.c	(revision 4760)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.129 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-10 22:41:17 $
+ *  @version $Revision: 1.130 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-11 23:04:32 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -698,131 +698,4 @@
 
 
-
-/******************************************************************************
-XXX: We assume unnormalized gaussians.
- *****************************************************************************/
-psVector *psMinimizeLMChi2Gauss1D(psImage *deriv,
-                                  const psVector *params,
-                                  const psArray *coords)
-{
-    PS_ASSERT_PTR_NON_NULL(coords, NULL);
-    PS_ASSERT_PTR_NON_NULL(params, NULL);
-
-    psTrace(".psLib.dataManip.psMinimize", 4,
-            "---- psMinimizeLMChi2Gauss1D() begin ----\n");
-    psF32 x;
-    psS32 i;
-    psF32 mean = params->data.F32[0];
-    psF32 stdev = params->data.F32[1];
-    psVector *out = psVectorAlloc(coords->n, PS_TYPE_F32);
-
-    psTrace(".psLib.dataManip.psMinimize", 6,
-            "(mean, stdev) is (%f, %f)\n", mean, stdev);
-
-    if (deriv == NULL) {
-        deriv = psImageAlloc(params->n, coords->n, PS_TYPE_F32);
-    } else {
-        PS_ASSERT_IMAGE_SIZE(deriv, params->n, coords->n, NULL);
-        PS_ASSERT_IMAGE_TYPE(deriv, PS_TYPE_F32, NULL);
-    }
-
-    for (i=0;i<coords->n;i++) {
-        x = ((psVector *) (coords->data[i]))->data.F32[0];
-        out->data.F32[i] = psGaussian(x, mean, stdev, false);
-    }
-
-    for (i=0;i<coords->n;i++) {
-        x = ((psVector *) (coords->data[i]))->data.F32[0];
-        psF32 tmp = (x - mean) * psGaussian(x, mean, stdev, false);
-        deriv->data.F32[i][0] = tmp / (stdev * stdev);
-        tmp = (x - mean) * (x - mean) *
-              psGaussian(x, mean, stdev, 0);
-        deriv->data.F32[i][1] = tmp / (stdev * stdev * stdev);
-    }
-
-    psTrace(".psLib.dataManip.psMinimize", 4,
-            "---- psMinimizeLMChi2Gauss1D() end ----\n");
-    return(out);
-}
-
-/*
-XXX: from bug 230:
- 
-We first perform a rotation:
-u = - (x-x0)*cos(theta) + (y-y0)*sin(theta)
-v = (x-x0)*cos(theta) + (y-y0)*sin(theta)
- 
-Here u is the major axis, and v is the minor axis, x0,y0 is the centre, and
-theta is the position angle.
- 
-Then the flux is
- 
-flux = norm * exp(-( u*u/2.0/sigmau/sigmau + v*v/2.0/sigmav/sigmav)
-)/2.0/pi/sigmau/sigmav
- 
-Here sigmau and sigmav are the widths of the major and minor axes.
- 
-The "norm" parameter in the equation above corresponds to the normalisation.
- 
-Suggest order:
- 
-norm
-x0
-y0
-sigma_u
-sigma_v
-theta
-*/
-
-psVector *psMinimizeLMChi2Gauss2D(psImage *deriv,
-                                  const psVector *params,
-                                  const psArray *coords)
-{
-    PS_ASSERT_PTR_NON_NULL(coords, NULL);
-    PS_ASSERT_PTR_NON_NULL(params, NULL);
-
-    psF64 normalization = params->data.F32[0];
-    psF64 x0 = params->data.F32[1];
-    psF64 y0 = params->data.F32[2];
-    psF64 sigmaX = params->data.F32[3];
-    psF64 sigmaY = params->data.F32[4];
-    psF64 theta = params->data.F32[5];
-    psVector *out = psVectorAlloc(coords->n, PS_TYPE_F32);
-
-    if (deriv == NULL) {
-        deriv = psImageAlloc(params->n, coords->n, PS_TYPE_F32);
-    } else {
-        PS_ASSERT_IMAGE_SIZE(deriv, 6, coords->n, NULL);
-        PS_ASSERT_IMAGE_TYPE(deriv, PS_TYPE_F32, NULL);
-    }
-
-    psTrace(".psLib.dataManip.psMinimize", 4,
-            "---- psMinimizeLMChi2Gauss2D() begin ----\n");
-
-    for (psS32 i=0;i<coords->n;i++) {
-        psF64 x = ((psVector *) coords->data[i])->data.F32[0];
-        psF64 y = ((psVector *) coords->data[i])->data.F32[0];
-
-        psF64 u = - (x-x0)*cos(theta) + (y-y0)*sin(theta);
-        psF64 v = (x-x0)*cos(theta) + (y-y0)*sin(theta);
-
-        psF64 flux = normalization * exp(-( u*u/(2.0 * sigmaX * sigmaX) +
-                                            v*v/(2.0 * sigmaY * sigmaY)))/
-                     (2.0 * M_PI * sigmaX * sigmaY);
-        out->data.F32[i] = flux;
-
-        // XXX: Calculate these correctly.
-        deriv->data.F32[i][0] = 0.0;
-        deriv->data.F32[i][1] = 0.0;
-        deriv->data.F32[i][2] = 0.0;
-        deriv->data.F32[i][3] = 0.0;
-        deriv->data.F32[i][4] = 0.0;
-        deriv->data.F32[i][5] = 0.0;
-    }
-
-    psTrace(".psLib.dataManip.psMinimize", 4,
-            "---- psMinimizeLMChi2Gauss2D() end ----\n");
-    return(out);
-}
 
 //XXX: What's this for?
@@ -2188,28 +2061,4 @@
 
 /******************************************************************************
-XXX: We assume unnormalized gaussians.
-XXX: Currently, yErr is ignored.
- *****************************************************************************/
-psVector *psMinimizePowellChi2Gauss1D(const psVector *params,
-                                      const psArray *coords)
-{
-    PS_ASSERT_PTR_NON_NULL(coords, NULL);
-    PS_ASSERT_PTR_NON_NULL(params, NULL);
-
-    psF32 x;
-    psS32 i;
-    psF32 mean = params->data.F32[0];
-    psF32 stdev = params->data.F32[1];
-    psVector *out = psVectorAlloc(coords->n, PS_TYPE_F32);
-
-    for (i=0;i<coords->n;i++) {
-        x = ((psVector *) (coords->data[i]))->data.F32[0];
-        out->data.F32[i] = psGaussian(x, mean, stdev, false);
-    }
-
-    return(out);
-}
-
-/******************************************************************************
 This routine is to be used with the psMinimizeChi2Powell() function below.
 and the psMinimizePowell() function above.
