Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 3094)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 3095)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-01-14 23:27:55 $
+*  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-26 20:24:16 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,4 +59,35 @@
 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
 /*****************************************************************************/
+static void planeFree(psPlane *p)
+{
+    psFree(p);
+}
+
+// XXX: Must test psPlaneAlloc() and planeFree().
+// XXX: Must rewrite code and tests to use these functions.
+psPlane* psPlaneAlloc(void)
+{
+    psPlane *p = psAlloc(sizeof(psPlane));
+
+    p_psMemSetDeallocator(p, (psFreeFcn) planeFree);
+    return(p);
+}
+
+
+static void sphereFree(psSphere *s)
+{
+    psFree(s);
+}
+
+// XXX: Must test psSphereAlloc() and sphereFree().
+// XXX: Must rewrite code and tests to use these functions.
+psSphere* psSphereAlloc(void)
+{
+    psSphere *s = psAlloc(sizeof(psSphere));
+
+    p_psMemSetDeallocator(s, (psFreeFcn) sphereFree);
+    return(s);
+}
+
 static void planeTransformFree(psPlaneTransform *pt)
 {
@@ -159,4 +190,47 @@
 }
 
+// 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.
+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);
+}
+
+
 /******************************************************************************
 alpha is LONGITUDE
@@ -299,4 +373,30 @@
 }
 
+void projectionFree(psProjection *p)
+{
+    psFree(p);
+}
+
+// XXX: Must test psProjectionAlloc() and projectionFree().
+// XXX: Must rewrite code and tests to use these functions.
+psProjection* psProjectionAlloc(
+    psF64 R,
+    psF64 D,
+    psF64 Xs,
+    psF64 Ys,
+    psProjectionType type)
+{
+    psProjection *p = psAlloc(sizeof(psProjection));
+    p->D = D;
+    p->R = R;
+    p->Xs = Xs;
+    p->Ys = Ys;
+    p->type = type;
+
+    p_psMemSetDeallocator(p, (psFreeFcn) planeFree);
+    return(p);
+}
+
+
 /******************************************************************************
 XXX: Waiting for the definition of the PS_PROJ_PAR projection.
@@ -323,9 +423,9 @@
                 psF32 cosThetaSinPhi;
          
-                sinTheta = (sin(coord->d) * sin(projection->D)) + 
-                           (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));
-                cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 
-                                 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));
-                cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);
+        sinTheta = (sin(coord->d) * sin(projection->D)) + 
+             (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));
+        cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 
+                   (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));
+        cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);
          
                 tmp->x =  -cosThetaSinPhi / sinTheta;
Index: /trunk/psLib/src/astro/psCoord.h
===================================================================
--- /trunk/psLib/src/astro/psCoord.h	(revision 3094)
+++ /trunk/psLib/src/astro/psCoord.h	(revision 3095)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-08 18:23:54 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-26 20:24:16 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -167,4 +167,19 @@
 } psSphereOffsetUnit;
 
+/** Allocates a psPlane
+ *
+ *  @return psPlane*     resulting plane structure.
+ */
+
+psPlane* psPlaneAlloc(void);
+
+/** Allocates a psSphere
+ *
+ *  @return psSphere*     resulting sphere structure.
+ */
+
+psSphere* psSphereAlloc(void);
+
+
 /** Allocates a psPlaneTransform transform.
  *
@@ -212,4 +227,30 @@
 );
 
+// 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
  *
@@ -262,4 +303,16 @@
  */
 psSphereTransform* psSphereTransformGalaticToICRS(void);
+
+/** Allocates memory for a psProjection structure
+ *
+ *  @return psProjection*    psProjection structure
+ */
+psProjection* psProjectionAlloc(
+    psF64 R,                   ///< Right-ascension of projection center.
+    psF64 D,                   ///< Declination of projection center.
+    psF64 Xs,                  ///< Scale in x-dimension
+    psF64 Ys,                  ///< Scale in y-dimension
+    psProjectionType type
+);
 
 /** Projects a spherical coordinate to a linear coordinate system
Index: /trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.c	(revision 3094)
+++ /trunk/psLib/src/astronomy/psCoord.c	(revision 3095)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-01-14 23:27:55 $
+*  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-26 20:24:16 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,4 +59,35 @@
 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
 /*****************************************************************************/
+static void planeFree(psPlane *p)
+{
+    psFree(p);
+}
+
+// XXX: Must test psPlaneAlloc() and planeFree().
+// XXX: Must rewrite code and tests to use these functions.
+psPlane* psPlaneAlloc(void)
+{
+    psPlane *p = psAlloc(sizeof(psPlane));
+
+    p_psMemSetDeallocator(p, (psFreeFcn) planeFree);
+    return(p);
+}
+
+
+static void sphereFree(psSphere *s)
+{
+    psFree(s);
+}
+
+// XXX: Must test psSphereAlloc() and sphereFree().
+// XXX: Must rewrite code and tests to use these functions.
+psSphere* psSphereAlloc(void)
+{
+    psSphere *s = psAlloc(sizeof(psSphere));
+
+    p_psMemSetDeallocator(s, (psFreeFcn) sphereFree);
+    return(s);
+}
+
 static void planeTransformFree(psPlaneTransform *pt)
 {
@@ -159,4 +190,47 @@
 }
 
+// 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.
+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);
+}
+
+
 /******************************************************************************
 alpha is LONGITUDE
@@ -299,4 +373,30 @@
 }
 
+void projectionFree(psProjection *p)
+{
+    psFree(p);
+}
+
+// XXX: Must test psProjectionAlloc() and projectionFree().
+// XXX: Must rewrite code and tests to use these functions.
+psProjection* psProjectionAlloc(
+    psF64 R,
+    psF64 D,
+    psF64 Xs,
+    psF64 Ys,
+    psProjectionType type)
+{
+    psProjection *p = psAlloc(sizeof(psProjection));
+    p->D = D;
+    p->R = R;
+    p->Xs = Xs;
+    p->Ys = Ys;
+    p->type = type;
+
+    p_psMemSetDeallocator(p, (psFreeFcn) planeFree);
+    return(p);
+}
+
+
 /******************************************************************************
 XXX: Waiting for the definition of the PS_PROJ_PAR projection.
@@ -323,9 +423,9 @@
                 psF32 cosThetaSinPhi;
          
-                sinTheta = (sin(coord->d) * sin(projection->D)) + 
-                           (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));
-                cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 
-                                 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));
-                cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);
+        sinTheta = (sin(coord->d) * sin(projection->D)) + 
+             (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));
+        cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 
+                   (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));
+        cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);
          
                 tmp->x =  -cosThetaSinPhi / sinTheta;
Index: /trunk/psLib/src/astronomy/psCoord.h
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.h	(revision 3094)
+++ /trunk/psLib/src/astronomy/psCoord.h	(revision 3095)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-08 18:23:54 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-26 20:24:16 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -167,4 +167,19 @@
 } psSphereOffsetUnit;
 
+/** Allocates a psPlane
+ *
+ *  @return psPlane*     resulting plane structure.
+ */
+
+psPlane* psPlaneAlloc(void);
+
+/** Allocates a psSphere
+ *
+ *  @return psSphere*     resulting sphere structure.
+ */
+
+psSphere* psSphereAlloc(void);
+
+
 /** Allocates a psPlaneTransform transform.
  *
@@ -212,4 +227,30 @@
 );
 
+// 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
  *
@@ -262,4 +303,16 @@
  */
 psSphereTransform* psSphereTransformGalaticToICRS(void);
+
+/** Allocates memory for a psProjection structure
+ *
+ *  @return psProjection*    psProjection structure
+ */
+psProjection* psProjectionAlloc(
+    psF64 R,                   ///< Right-ascension of projection center.
+    psF64 D,                   ///< Declination of projection center.
+    psF64 Xs,                  ///< Scale in x-dimension
+    psF64 Ys,                  ///< Scale in y-dimension
+    psProjectionType type
+);
 
 /** Projects a spherical coordinate to a linear coordinate system
Index: /trunk/psLib/src/dataManip/psStats.c
===================================================================
--- /trunk/psLib/src/dataManip/psStats.c	(revision 3094)
+++ /trunk/psLib/src/dataManip/psStats.c	(revision 3095)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.110 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-14 23:27:56 $
+ *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-26 20:24:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1119,5 +1119,5 @@
 These macros and functions define the following functions:
  
-    p_psNormalizeVectorRange(myData, low, high)
+<    p_psNormalizeVectorRange(myData, low, high)
  
 That assumes that the low/high arguments are PS_TYPE_F64; the vector myData
Index: /trunk/psLib/src/math/psStats.c
===================================================================
--- /trunk/psLib/src/math/psStats.c	(revision 3094)
+++ /trunk/psLib/src/math/psStats.c	(revision 3095)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.110 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-14 23:27:56 $
+ *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-26 20:24:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1119,5 +1119,5 @@
 These macros and functions define the following functions:
  
-    p_psNormalizeVectorRange(myData, low, high)
+<    p_psNormalizeVectorRange(myData, low, high)
  
 That assumes that the low/high arguments are PS_TYPE_F64; the vector myData
