Index: /trunk/psLib/src/Doxyfile
===================================================================
--- /trunk/psLib/src/Doxyfile	(revision 1373)
+++ /trunk/psLib/src/Doxyfile	(revision 1374)
@@ -377,5 +377,5 @@
 # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
 
-FILE_PATTERNS          = *.h *.dox
+FILE_PATTERNS          = *.c *.h *.dox
 
 # The RECURSIVE tag can be used to turn specify whether or not subdirectories
Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 1373)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 1374)
@@ -1,18 +1,18 @@
 /** @file  psCoord.c
- *
- *  @brief Contains basic coordinate transformation definitions and operations
- *
- *  This file defines the basic types for astronomical coordinate 
- *  transformation
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:08:02 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 #include "psType.h"
@@ -28,20 +28,20 @@
 
 // This is the only function in this file which I understand.
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords)
-{
-    if (out == NULL) {
-        out = (psPlane *) psAlloc(sizeof(psPlane));
-    }
-    out->x = transform->x->coeff[0][0] +
-             (transform->x->coeff[1][0] * coords->x) +
-             (transform->x->coeff[0][1] * coords->y);
-
-    out->y = transform->y->coeff[0][0] +
-             (transform->y->coeff[1][0] * coords->x) +
-             (transform->y->coeff[0][1] * coords->y);
-
-    return(out);
+psPlane *psPlaneTransformApply( psPlane *out,
+                                const psPlaneTransform *transform,
+                                const psPlane *coords )
+{
+    if ( out == NULL ) {
+            out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+        }
+    out->x = transform->x->coeff[ 0 ][ 0 ] +
+             ( transform->x->coeff[ 1 ][ 0 ] * coords->x ) +
+             ( transform->x->coeff[ 0 ][ 1 ] * coords->y );
+             
+    out->y = transform->y->coeff[ 0 ][ 0 ] +
+             ( transform->y->coeff[ 1 ][ 0 ] * coords->x ) +
+             ( transform->y->coeff[ 0 ][ 1 ] * coords->y );
+             
+    return ( out );
 }
 
@@ -49,49 +49,49 @@
 // This transformation takes into account parameters beyond an objects
 // spatial coordinates: term3 and term4.
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4)
-{
-    if (out == NULL) {
-        out = (psPlane *) psAlloc(sizeof(psPlane));
-    }
-
-    out->x = transform->x->coeff[0][0][0][0] +
-             (transform->x->coeff[1][0][0][0] * coords->x) +
-             (transform->x->coeff[0][1][0][0] * coords->y) +
-             (transform->x->coeff[0][0][1][0] * term3) +
-             (transform->x->coeff[0][0][0][1] * term4);
-
-    out->y = transform->y->coeff[0][0][0][0] +
-             (transform->y->coeff[1][0][0][0] * coords->x) +
-             (transform->y->coeff[0][1][0][0] * coords->y) +
-             (transform->y->coeff[0][0][1][0] * term3) +
-             (transform->y->coeff[0][0][0][1] * term4);
-
-    return(out);
+psPlane *psPlaneDistortApply( psPlane *out,
+                              const psPlaneDistort *transform,
+                              const psPlane *coords,
+                              float term3,
+                              float term4 )
+{
+    if ( out == NULL ) {
+            out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+        }
+        
+    out->x = transform->x->coeff[ 0 ][ 0 ][ 0 ][ 0 ] +
+             ( transform->x->coeff[ 1 ][ 0 ][ 0 ][ 0 ] * coords->x ) +
+             ( transform->x->coeff[ 0 ][ 1 ][ 0 ][ 0 ] * coords->y ) +
+             ( transform->x->coeff[ 0 ][ 0 ][ 1 ][ 0 ] * term3 ) +
+             ( transform->x->coeff[ 0 ][ 0 ][ 0 ][ 1 ] * term4 );
+             
+    out->y = transform->y->coeff[ 0 ][ 0 ][ 0 ][ 0 ] +
+             ( transform->y->coeff[ 1 ][ 0 ][ 0 ][ 0 ] * coords->x ) +
+             ( transform->y->coeff[ 0 ][ 1 ][ 0 ][ 0 ] * coords->y ) +
+             ( transform->y->coeff[ 0 ][ 0 ][ 1 ][ 0 ] * term3 ) +
+             ( transform->y->coeff[ 0 ][ 0 ][ 0 ][ 1 ] * term4 );
+             
+    return ( out );
 }
 
 
 // This function prototype has been modified since the SDRS.
-psSphereTransform *psSphereTransformAlloc(double NPlat,
+psSphereTransform *psSphereTransformAlloc( double NPlat,
         double Xo,
-        double xo)
-{
-    psSphereTransform *tmp = (psSphereTransform *) psAlloc(sizeof(psSphereTransform));
-
-    tmp->sinPhi = sin(NPlat);
-    tmp->cosPhi = cos(NPlat);
+        double xo )
+{
+    psSphereTransform * tmp = ( psSphereTransform * ) psAlloc( sizeof( psSphereTransform ) );
+    
+    tmp->sinPhi = sin( NPlat );
+    tmp->cosPhi = cos( NPlat );
     tmp->Xo = Xo;
     tmp->xo = xo;
-
-    return(tmp);
+    
+    return ( tmp );
 }
 
 // I understand this one too.
-void p_psSphereTransformFree(psSphereTransform *trans)
-{
-    psFree(trans);
+void p_psSphereTransformFree( psSphereTransform *trans )
+{
+    psFree( trans );
 }
 
@@ -103,7 +103,7 @@
 // there are no typo's.
 
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord)
+psSphere *psSphereTransformApply( psSphere *out,
+                                  const psSphereTransform *transform,
+                                  const psSphere *coord )
 {
     double sinY = 0.0;
@@ -114,131 +114,131 @@
     double y = 0.0;
     double dx = 0.0;
-
-    if (out == NULL) {
-        out = (psSphere *) psAlloc(sizeof(psSphere));
-    }
-
+    
+    if ( out == NULL ) {
+            out = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+        }
+        
     x = coord->r;
     y = coord->d;
-    dx    = x - transform->xo;
-    sinY = cos(y)*sin(dx)*transform->sinPhi + sin(y)*transform->cosPhi;
-    cosY = sqrt(1.0 - sinY*sinY);
-    sinX = (cos(y)*sin(dx)*transform->cosPhi - sin(y)*transform->sinPhi) /
-           cos(y);
-    cosX = cos(y)*cos(dx) / cos(y);
-
-    out->r = atan2(sinX, cosX) + transform->Xo;
-    out->d = atan2(sinY, cosY);
-
-    return(out);
-}
-
-psSphereTransform *psSphereTransformICRStoEcliptic(psTime time)
-{
-    struct tm *tmTime = psTimeToTM(time);
-    double year = (double) (1900 + tmTime->tm_year);
+    dx = x - transform->xo;
+    sinY = cos( y ) * sin( dx ) * transform->sinPhi + sin( y ) * transform->cosPhi;
+    cosY = sqrt( 1.0 - sinY * sinY );
+    sinX = ( cos( y ) * sin( dx ) * transform->cosPhi - sin( y ) * transform->sinPhi ) /
+           cos( y );
+    cosX = cos( y ) * cos( dx ) / cos( y );
+    
+    out->r = atan2( sinX, cosX ) + transform->Xo;
+    out->d = atan2( sinY, cosY );
+    
+    return ( out );
+}
+
+psSphereTransform *psSphereTransformICRStoEcliptic( psTime time )
+{
+    struct tm * tmTime = psTimeToTM( time );
+    double year = ( double ) ( 1900 + tmTime->tm_year );
     double T = year / 100.0;
-    double phi = -23.452294 + 0.013013*T + 0.000001639*T*T - 0.000000503*T*T*T;
+    double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T;
     double Xo = 0.0;
     double xo = 0.0;
-
-    return(psSphereTransformAlloc(phi, Xo, xo));
-}
-
-psSphereTransform *psSphereTransformEcliptictoICRS(psTime time)
-{
-    struct tm *tmTime = psTimeToTM(time);
-    double year = (double) (1900 + tmTime->tm_year);
+    
+    return ( psSphereTransformAlloc( phi, Xo, xo ) );
+}
+
+psSphereTransform *psSphereTransformEcliptictoICRS( psTime time )
+{
+    struct tm * tmTime = psTimeToTM( time );
+    double year = ( double ) ( 1900 + tmTime->tm_year );
     double T = year / 100.0;
-    double phi = +23.452294 - 0.013013*T - 0.000001639*T*T + 0.000000503*T*T*T;
+    double phi = + 23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T;
     double Xo = 0.0;
     double xo = 0.0;
-
-    return(psSphereTransformAlloc(phi, Xo, xo));
-}
-
-psSphereTransform *psSphereTransformICRStoGalatic(void)
-{
-    return(psSphereTransformAlloc(62.6, 282.25, 33.0));
-}
-
-psSphereTransform *psSphereTransformGalatictoICRS(void)
-{
-    return(psSphereTransformAlloc(-62.6, 33.0, 282.25));
+    
+    return ( psSphereTransformAlloc( phi, Xo, xo ) );
+}
+
+psSphereTransform *psSphereTransformICRStoGalatic( void )
+{
+    return ( psSphereTransformAlloc( 62.6, 282.25, 33.0 ) );
+}
+
+psSphereTransform *psSphereTransformGalatictoICRS( void )
+{
+    return ( psSphereTransformAlloc( -62.6, 33.0, 282.25 ) );
 }
 
 // XXX: Is this the correct way to calculate this?
-float cot(float x)
-{
-    return(1.0 / atan(x));
+float cot( float x )
+{
+    return ( 1.0 / atan( x ) );
 }
 
 // This is some kind of arc tan function.
-float arg(float x, float y)
-{
-    if (x > 0) {
-        return(atan(y/x));
-    } else if ((x==0) && (y==0)) {
-        return(0.5 * M_PI);
-    } else if ((x==0) && (y==0)) {
-        return(-0.5 * M_PI);
-    } else if ((x==0) && (y==0)) {
-        return(M_PI + atan(y/x));
-    } else if ((x==0) && (y==0)) {
-        return(-M_PI + atan(y/x));
-    }
-
-    psAbort(__func__, "Unacceptable range for (arg(%f, %f).\n", x, y);
-    return(0.0);
+float arg( float x, float y )
+{
+    if ( x > 0 ) {
+            return ( atan( y / x ) );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( 0.5 * M_PI );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( -0.5 * M_PI );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( M_PI + atan( y / x ) );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( -M_PI + atan( y / x ) );
+        }
+        
+    psAbort( __func__, "Unacceptable range for (arg(%f, %f).\n", x, y );
+    return ( 0.0 );
 }
 
 // XXX: Waiting for the definition of the PS_PROJ_PAR projection.
 // XXX: Waiting for the definition of the PS_PROJ_GLS projection.
-psPlane *psProject(const psSphere *coord,
-                   const psProjection *projection)
+psPlane *psProject( const psSphere *coord,
+                    const psProjection *projection )
 {
     float R = 0.0;
     float alpha = 0.0;
-    psPlane *tmp= (psPlane *) psAlloc(sizeof(psPlane));
-
-    if (projection->type == PS_PROJ_TAN) {
-        R = cot(coord->r) * (180.0 / M_PI);
-        tmp->x = R * sin(coord->d);
-        tmp->y = R * cos(coord->d);
-
-    } else if (projection->type == PS_PROJ_SIN) {
-        R = cos(coord->r) * (180.0 / M_PI);
-        tmp->x = R * sin(coord->d);
-        tmp->y = R * cos(coord->d);
-
-    } else if (projection->type == PS_PROJ_CAR) {
-        tmp->x = coord->d;
-        tmp->y = coord->r;
-
-    } else if (projection->type == PS_PROJ_MER) {
-        tmp->x = coord->d;
-        tmp->y = log(tan(45.0 + (0.5 * coord->r))) * 180.0/M_PI;
-
-    } else if (projection->type == PS_PROJ_AIT) {
-        alpha = 1.0 / ((180.0 / M_PI) *
-                       sqrt(1.0 + (cos(coord->r) * cos(0.5 * coord->d) * 0.5)));
-
-        tmp->x = 2.0 * alpha * cos(coord->r) * sin(0.5 * coord->d);
-        tmp->y = alpha * sin(coord->d);
-
-    } else if (projection->type == PS_PROJ_PAR) {
-        psAbort(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
-
-    } else if (projection->type == PS_PROJ_GLS) {
-        psAbort(__func__, "The projection type PS_PROJ_GLS is undefined.\n");
-    }
-
-    return(tmp);
+    psPlane *tmp = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+    
+    if ( projection->type == PS_PROJ_TAN ) {
+            R = cot( coord->r ) * ( 180.0 / M_PI );
+            tmp->x = R * sin( coord->d );
+            tmp->y = R * cos( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_SIN ) {
+            R = cos( coord->r ) * ( 180.0 / M_PI );
+            tmp->x = R * sin( coord->d );
+            tmp->y = R * cos( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_CAR ) {
+            tmp->x = coord->d;
+            tmp->y = coord->r;
+            
+        } else if ( projection->type == PS_PROJ_MER ) {
+            tmp->x = coord->d;
+            tmp->y = log( tan( 45.0 + ( 0.5 * coord->r ) ) ) * 180.0 / M_PI;
+            
+        } else if ( projection->type == PS_PROJ_AIT ) {
+            alpha = 1.0 / ( ( 180.0 / M_PI ) *
+                            sqrt( 1.0 + ( cos( coord->r ) * cos( 0.5 * coord->d ) * 0.5 ) ) );
+                            
+            tmp->x = 2.0 * alpha * cos( coord->r ) * sin( 0.5 * coord->d );
+            tmp->y = alpha * sin( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_PAR ) {
+            psAbort( __func__, "The projection type PS_PROJ_PAR is undefined.\n" );
+            
+        } else if ( projection->type == PS_PROJ_GLS ) {
+            psAbort( __func__, "The projection type PS_PROJ_GLS is undefined.\n" );
+        }
+        
+    return ( tmp );
 }
 
 // XXX: Waiting for the definition of the PS_PROJ_PAR projection.
 // XXX: Waiting for the definition of the PS_PROJ_GLS projection.
-psSphere *psDeproject(const psPlane *coord,
-                      const psProjection *projection)
+psSphere *psDeproject( const psPlane *coord,
+                       const psProjection *projection )
 {
     float R = 0.0;
@@ -246,50 +246,50 @@
     float chu1 = 0.0;
     float chu2 = 0.0;
-    psSphere *tmp= (psSphere *) psAlloc(sizeof(psSphere));
-
-    if (projection->type == PS_PROJ_TAN) {
-        R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = arg(-coord->y, coord->x);
-        tmp->r = atan(180.0 / (R * M_PI));
-
-    } else if (projection->type == PS_PROJ_SIN) {
-        R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = arg(-coord->y, coord->x);
-        tmp->r = acos((R * M_PI) / 180.0);
-
-    } else if (projection->type == PS_PROJ_CAR) {
-        tmp->d = coord->x;
-        tmp->r = coord->y;
-
-    } else if (projection->type == PS_PROJ_MER) {
-        tmp->d = coord->x;
-        tmp->r = (2.0 * atan(exp((coord->y * M_PI/180.0)))) - 180.0;
-
-    } else if (projection->type == PS_PROJ_AIT) {
-        chu1 = (coord->x * M_PI) / 720.0;
-        chu1*= chu1;
-        chu2 = (coord->y * M_PI) / 360.0;
-        chu2*= chu2;
-        chu = sqrt(1.0 - chu1 - chu2);
-        tmp->d = 2.0 * arg((2.0 * chu * chu) - 1.0,
-                           (coord->x * chu * M_PI)/360.0);
-        tmp->r = asin((coord->y * chu * M_PI) / 180.0);
-
-    } else if (projection->type == PS_PROJ_PAR) {
-        psAbort(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
-
-    } else if (projection->type == PS_PROJ_GLS) {
-        psAbort(__func__, "The projection type PS_PROJ_GLG is undefined.\n");
-    }
-
-    return(tmp);
+    psSphere *tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+    
+    if ( projection->type == PS_PROJ_TAN ) {
+            R = sqrt( ( coord->x * coord->x ) + ( coord->y * coord->y ) );
+            tmp->d = arg( -coord->y, coord->x );
+            tmp->r = atan( 180.0 / ( R * M_PI ) );
+            
+        } else if ( projection->type == PS_PROJ_SIN ) {
+            R = sqrt( ( coord->x * coord->x ) + ( coord->y * coord->y ) );
+            tmp->d = arg( -coord->y, coord->x );
+            tmp->r = acos( ( R * M_PI ) / 180.0 );
+            
+        } else if ( projection->type == PS_PROJ_CAR ) {
+            tmp->d = coord->x;
+            tmp->r = coord->y;
+            
+        } else if ( projection->type == PS_PROJ_MER ) {
+            tmp->d = coord->x;
+            tmp->r = ( 2.0 * atan( exp( ( coord->y * M_PI / 180.0 ) ) ) ) - 180.0;
+            
+        } else if ( projection->type == PS_PROJ_AIT ) {
+            chu1 = ( coord->x * M_PI ) / 720.0;
+            chu1 *= chu1;
+            chu2 = ( coord->y * M_PI ) / 360.0;
+            chu2 *= chu2;
+            chu = sqrt( 1.0 - chu1 - chu2 );
+            tmp->d = 2.0 * arg( ( 2.0 * chu * chu ) - 1.0,
+                                ( coord->x * chu * M_PI ) / 360.0 );
+            tmp->r = asin( ( coord->y * chu * M_PI ) / 180.0 );
+            
+        } else if ( projection->type == PS_PROJ_PAR ) {
+            psAbort( __func__, "The projection type PS_PROJ_PAR is undefined.\n" );
+            
+        } else if ( projection->type == PS_PROJ_GLS ) {
+            psAbort( __func__, "The projection type PS_PROJ_GLG is undefined.\n" );
+        }
+        
+    return ( tmp );
 }
 
 // XXX: Do I need to check for unacceptable transformation parameters?
 // Maybe, if the points are on the North/South Pole, etc?
-psSphere *psSphereGetOffset(const psSphere *restrict position1,
-                            const psSphere *restrict position2,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit)
+psSphere *psSphereGetOffset( const psSphere *restrict position1,
+                             const psSphere *restrict position2,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit )
 {
     //    psPlane *lin;
@@ -298,51 +298,51 @@
     double tmpR = 0.0;
     double tmpD = 0.0;
-
-    if (mode == PS_LINEAR) {
-        // XXX: I have no idea how to construct this.  Maybe project both
-        // sperical positions onto the plane, set the origin at one of the
-        // points on the plane, then deproject?
-
-        // XXX: Do I need to somehow scale this projection?
-        // project position1?  Will it project to (0.0, 0.0)?
-        proj.R = position1->r;
-        proj.D = position1->d;
-        proj.Xs = 1.0;
-        proj.Ys = 1.0;
-        proj.type = PS_PROJ_TAN;
-
-        //        lin = psProject(position2, proj);
-        //        tmp = psDeproject(lin, proj);
-
-        // XXX: Do we need to convert units in tmp?
-        return(tmp);
-    } else if (mode == PS_SPHERICAL) {
-        tmpR = position2->r - position1->r;
-        tmpD = position2->d - position1->d;
-
-        if (unit == PS_ARCSEC) {
-            tmpR = (tmpR * 180.0 * 60.0 * 60.0) / M_PI;
-            tmpD = (tmpR * 180.0 * 60.0 * 60.0) / M_PI;
-        } else if (unit == PS_ARCMIN) {
-            tmpR = (tmpR * 180.0 * 60.0) / M_PI;
-            tmpD = (tmpR * 180.0 * 60.0) / M_PI;
-        } else if (unit == PS_DEGREE) {
-            tmpR = (tmpR * 180.0) / M_PI;
-            tmpD = (tmpR * 180.0) / M_PI;
-        } else if (unit == PS_RADIAN) {}
-        else {
-            psAbort(__func__, "Unknown offset unit: 0x%x\n", unit);
-        }
-
-        tmp = (psSphere *) psAlloc(sizeof(psSphere));
-        tmp->r = tmpR;
-        tmp->d = tmpD;
-        tmp->rErr = 0.0;
-        tmp->dErr = 0.0;
-        // XXX: Do we need to wrap these to an acceptable range?
-        return(tmp);
-    }
-    psAbort(__func__, "Unrecognized offset mode\n");
-    return(NULL);
+    
+    if ( mode == PS_LINEAR ) {
+            // XXX: I have no idea how to construct this.  Maybe project both
+            // sperical positions onto the plane, set the origin at one of the
+            // points on the plane, then deproject?
+            
+            // XXX: Do I need to somehow scale this projection?
+            // project position1?  Will it project to (0.0, 0.0)?
+            proj.R = position1->r;
+            proj.D = position1->d;
+            proj.Xs = 1.0;
+            proj.Ys = 1.0;
+            proj.type = PS_PROJ_TAN;
+            
+            //        lin = psProject(position2, proj);
+            //        tmp = psDeproject(lin, proj);
+            
+            // XXX: Do we need to convert units in tmp?
+            return ( tmp );
+        } else if ( mode == PS_SPHERICAL ) {
+            tmpR = position2->r - position1->r;
+            tmpD = position2->d - position1->d;
+            
+            if ( unit == PS_ARCSEC ) {
+                    tmpR = ( tmpR * 180.0 * 60.0 * 60.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 * 60.0 * 60.0 ) / M_PI;
+                } else if ( unit == PS_ARCMIN ) {
+                    tmpR = ( tmpR * 180.0 * 60.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 * 60.0 ) / M_PI;
+                } else if ( unit == PS_DEGREE ) {
+                    tmpR = ( tmpR * 180.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 ) / M_PI;
+                } else if ( unit == PS_RADIAN ) {}
+            else {
+                    psAbort( __func__, "Unknown offset unit: 0x%x\n", unit );
+                }
+                
+            tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+            tmp->r = tmpR;
+            tmp->d = tmpD;
+            tmp->rErr = 0.0;
+            tmp->dErr = 0.0;
+            // XXX: Do we need to wrap these to an acceptable range?
+            return ( tmp );
+        }
+    psAbort( __func__, "Unrecognized offset mode\n" );
+    return ( NULL );
 }
 
@@ -351,8 +351,8 @@
 // Maybe, if the points are on the North/South Pole, etc?
 // XXX: I copied the algorithm from the ADD exactly.
-psSphere *psSphereSetOffset(const psSphere *restrict position,
-                            const psSphere *restrict offset,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit)
+psSphere *psSphereSetOffset( const psSphere *restrict position,
+                             const psSphere *restrict offset,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit )
 {
     psPlane lin;
@@ -361,46 +361,46 @@
     double tmpR = 0.0;
     double tmpD = 0.0;
-
-    if (mode == PS_LINEAR) {
-        proj.R = position->r;
-        proj.D = position->d;
-        proj.Xs = 1.0;
-        proj.Ys = 1.0;
-        proj.type = PS_PROJ_TAN;
-
-        lin.x = offset->r;
-        lin.y = offset->d;
-
-        tmp = psDeproject(&lin, &proj);
-        return(tmp);
-
-    } else if (mode == PS_SPHERICAL) {
-        if (unit == PS_ARCSEC) {
-            tmpR = (M_PI * offset->r) / (180.0 * 60.0 * 60.0);
-            tmpD = (M_PI * offset->d) / (180.0 * 60.0 * 60.0);
-        } else if (unit == PS_ARCMIN) {
-            tmpR = (M_PI * offset->r) / (180.0 * 60.0);
-            tmpD = (M_PI * offset->d) / (180.0 * 60.0);
-        } else if (unit == PS_DEGREE) {
-            tmpR = (M_PI * offset->r) / (180.0);
-            tmpD = (M_PI * offset->d) / (180.0);
-        } else if (unit == PS_RADIAN) {
-            tmpR = offset->r;
-            tmpD = offset->d;
-        } else {
-            psAbort(__func__, "Unknown offset unit: 0x%x\n", unit);
-        }
-
-        tmp = (psSphere *) psAlloc(sizeof(psSphere));
-        tmp->r = position->r + tmpR;
-        tmp->r = position->d + tmpD;
-        tmp->rErr = 0.0;
-        tmp->dErr = 0.0;
-
-        // XXX: wrap tmp->r and tmp->d to the allowed range (-PI to PI)
-        // and (0 to 2*PI).
-        return(tmp);
-    }
-    psAbort(__func__, "Unrecognized offset mode\n");
-    return(NULL);
-}
+    
+    if ( mode == PS_LINEAR ) {
+            proj.R = position->r;
+            proj.D = position->d;
+            proj.Xs = 1.0;
+            proj.Ys = 1.0;
+            proj.type = PS_PROJ_TAN;
+            
+            lin.x = offset->r;
+            lin.y = offset->d;
+            
+            tmp = psDeproject( &lin, &proj );
+            return ( tmp );
+            
+        } else if ( mode == PS_SPHERICAL ) {
+            if ( unit == PS_ARCSEC ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 * 60.0 * 60.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 * 60.0 * 60.0 );
+                } else if ( unit == PS_ARCMIN ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 * 60.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 * 60.0 );
+                } else if ( unit == PS_DEGREE ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 );
+                } else if ( unit == PS_RADIAN ) {
+                    tmpR = offset->r;
+                    tmpD = offset->d;
+                } else {
+                    psAbort( __func__, "Unknown offset unit: 0x%x\n", unit );
+                }
+                
+            tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+            tmp->r = position->r + tmpR;
+            tmp->r = position->d + tmpD;
+            tmp->rErr = 0.0;
+            tmp->dErr = 0.0;
+            
+            // XXX: wrap tmp->r and tmp->d to the allowed range (-PI to PI)
+            // and (0 to 2*PI).
+            return ( tmp );
+        }
+    psAbort( __func__, "Unrecognized offset mode\n" );
+    return ( NULL );
+}
Index: /trunk/psLib/src/astro/psCoord.h
===================================================================
--- /trunk/psLib/src/astro/psCoord.h	(revision 1373)
+++ /trunk/psLib/src/astro/psCoord.h	(revision 1374)
@@ -1,18 +1,18 @@
 /** @file  psCoord.h
- *
- *  @brief Contains basic coordinate transformation definitions and operations
- *
- *  This file defines the basic types for astronomical coordinate 
- *  transformation
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:08:02 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 # ifndef PS_COORD_H
@@ -26,64 +26,67 @@
 #include "psTime.h"
 
+/// @addtogroup CoordinateTransform
+/// @{
+
 typedef struct
-{
-    double x;      ///< x position
-    double y;      ///< y position
-    double xErr;   ///< Error in x position
-    double yErr;   ///< Error in y position
-}
+    {
+        double x;      ///< x position
+        double y;      ///< y position
+        double xErr;   ///< Error in x position
+        double yErr;   ///< Error in y position
+    }
 psPlane;
 
 typedef struct
-{
-    double r;      ///< RA
-    double d;      ///< Dec
-    double rErr;   ///< Error in RA
-    double dErr;   ///< Error in Dec
-}
+    {
+        double r;      ///< RA
+        double d;      ///< Dec
+        double rErr;   ///< Error in RA
+        double dErr;   ///< Error in Dec
+    }
 psSphere;
 
 typedef struct
-{
-    psDPolynomial2D *x;
-    psDPolynomial2D *y;
-}
+    {
+        psDPolynomial2D *x;
+        psDPolynomial2D *y;
+    }
 psPlaneTransform;
 
 typedef struct
-{
-    psDPolynomial4D *x;
-    psDPolynomial4D *y;
-}
+    {
+        psDPolynomial4D *x;
+        psDPolynomial4D *y;
+    }
 psPlaneDistort;
 
 typedef struct
-{
-    double sinPhi;                    ///< sin of North Pole lattitude
-    double cosPhi;                    ///< cos of North Pole lattitude
-    double Xo;                        ///< First PT of Ares lon
-    double xo;                        ///< First PT of Ares equiv lon
-}
+    {
+        double sinPhi;                    ///< sin of North Pole lattitude
+        double cosPhi;                    ///< cos of North Pole lattitude
+        double Xo;                        ///< First PT of Ares lon
+        double xo;                        ///< First PT of Ares equiv lon
+    }
 psSphereTransform;
 
 typedef enum {
-    PS_PROJ_TAN,       ///< Tangent projection
-    PS_PROJ_SIN,       ///< Sine projection
-    PS_PROJ_AIT,       ///< Aitoff projection
-    PS_PROJ_PAR,       ///< Par projection
-    PS_PROJ_GLS,       ///< GLS projection
-    PS_PROJ_CAR,       ///< CAR projection
-    PS_PROJ_MER,       ///< MER projection
+    PS_PROJ_TAN,        ///< Tangent projection
+    PS_PROJ_SIN,        ///< Sine projection
+    PS_PROJ_AIT,        ///< Aitoff projection
+    PS_PROJ_PAR,        ///< Par projection
+    PS_PROJ_GLS,        ///< GLS projection
+    PS_PROJ_CAR,        ///< CAR projection
+    PS_PROJ_MER,        ///< MER projection
     PS_PROJ_NTYPE      ///< Number of types; must be last.
 } psProjectionType;
 
 typedef struct
-{
-    double R;     ///< Coordinates of projection center
-    double D;     ///< Coordinates of projection center
-    double Xs;    ///< plate-scale in X direction
-    double Ys;    ///< plate-scale in Y direction
-    psProjectionType type;  ///< Projection type
-}
+    {
+        double R;     ///< Coordinates of projection center
+        double D;     ///< Coordinates of projection center
+        double Xs;    ///< plate-scale in X direction
+        double Ys;    ///< plate-scale in Y direction
+        psProjectionType type;  ///< Projection type
+    }
 psProjection;
 
@@ -100,47 +103,48 @@
 } psSphereOffsetUnit;
 
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords);
+psPlane *psPlaneTransformApply( psPlane *out,
+                                const psPlaneTransform *transform,
+                                const psPlane *coords );
+                                
+psPlane *psPlaneDistortApply( psPlane *out,
+                              const psPlaneDistort *transform,
+                              const psPlane *coords,
+                              float term3,
+                              float term4 );
+                              
+                              
+// New function prototype.
+psSphereTransform *psSphereTransformAlloc( double NPlat,
+        double Xo,
+        double xo );
+        
+void p_psSphereTransformFree( psSphereTransform *trans );
 
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4);
+psSphere *psSphereTransformApply( psSphere *out,
+                                  const psSphereTransform *transform,
+                                  const psSphere *coord );
+                                  
+psSphereTransform *psSphereTransformICRStoEcliptic( psTime time );
+psSphereTransform *psSphereTransformEcliptictoICRS( psTime time );
+psSphereTransform *psSphereTransformICRStoGalatic( void );
+psSphereTransform *psSphereTransformGalatictoICRS( void );
 
-
-// New function prototype.
-psSphereTransform *psSphereTransformAlloc(double NPlat,
-        double Xo,
-        double xo);
-
-void p_psSphereTransformFree(psSphereTransform *trans);
-
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord);
-
-psSphereTransform *psSphereTransformICRStoEcliptic(psTime time);
-psSphereTransform *psSphereTransformEcliptictoICRS(psTime time);
-psSphereTransform *psSphereTransformICRStoGalatic(void);
-psSphereTransform *psSphereTransformGalatictoICRS(void);
-
-psPlane *psProject(const psSphere *coord,
-                   const psProjection *projection);
-
-psSphere *psDeproject(const psPlane *coord,
-                      const psProjection *projection);
-
-psSphere *psSphereGetOffset(const psSphere *restrict position1,
-                            const psSphere *restrict position2,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit);
-
-psSphere *psSphereSetOffset(const psSphere *restrict position,
-                            const psSphere *restrict offset,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit);
-
+psPlane *psProject( const psSphere *coord,
+                    const psProjection *projection );
+                    
+psSphere *psDeproject( const psPlane *coord,
+                       const psProjection *projection );
+                       
+psSphere *psSphereGetOffset( const psSphere *restrict position1,
+                             const psSphere *restrict position2,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit );
+                             
+psSphere *psSphereSetOffset( const psSphere *restrict position,
+                             const psSphere *restrict offset,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit );
+                             
+/// @}
 
 #endif
Index: /trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.c	(revision 1373)
+++ /trunk/psLib/src/astronomy/psCoord.c	(revision 1374)
@@ -1,18 +1,18 @@
 /** @file  psCoord.c
- *
- *  @brief Contains basic coordinate transformation definitions and operations
- *
- *  This file defines the basic types for astronomical coordinate 
- *  transformation
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:08:02 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 #include "psType.h"
@@ -28,20 +28,20 @@
 
 // This is the only function in this file which I understand.
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords)
-{
-    if (out == NULL) {
-        out = (psPlane *) psAlloc(sizeof(psPlane));
-    }
-    out->x = transform->x->coeff[0][0] +
-             (transform->x->coeff[1][0] * coords->x) +
-             (transform->x->coeff[0][1] * coords->y);
-
-    out->y = transform->y->coeff[0][0] +
-             (transform->y->coeff[1][0] * coords->x) +
-             (transform->y->coeff[0][1] * coords->y);
-
-    return(out);
+psPlane *psPlaneTransformApply( psPlane *out,
+                                const psPlaneTransform *transform,
+                                const psPlane *coords )
+{
+    if ( out == NULL ) {
+            out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+        }
+    out->x = transform->x->coeff[ 0 ][ 0 ] +
+             ( transform->x->coeff[ 1 ][ 0 ] * coords->x ) +
+             ( transform->x->coeff[ 0 ][ 1 ] * coords->y );
+             
+    out->y = transform->y->coeff[ 0 ][ 0 ] +
+             ( transform->y->coeff[ 1 ][ 0 ] * coords->x ) +
+             ( transform->y->coeff[ 0 ][ 1 ] * coords->y );
+             
+    return ( out );
 }
 
@@ -49,49 +49,49 @@
 // This transformation takes into account parameters beyond an objects
 // spatial coordinates: term3 and term4.
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4)
-{
-    if (out == NULL) {
-        out = (psPlane *) psAlloc(sizeof(psPlane));
-    }
-
-    out->x = transform->x->coeff[0][0][0][0] +
-             (transform->x->coeff[1][0][0][0] * coords->x) +
-             (transform->x->coeff[0][1][0][0] * coords->y) +
-             (transform->x->coeff[0][0][1][0] * term3) +
-             (transform->x->coeff[0][0][0][1] * term4);
-
-    out->y = transform->y->coeff[0][0][0][0] +
-             (transform->y->coeff[1][0][0][0] * coords->x) +
-             (transform->y->coeff[0][1][0][0] * coords->y) +
-             (transform->y->coeff[0][0][1][0] * term3) +
-             (transform->y->coeff[0][0][0][1] * term4);
-
-    return(out);
+psPlane *psPlaneDistortApply( psPlane *out,
+                              const psPlaneDistort *transform,
+                              const psPlane *coords,
+                              float term3,
+                              float term4 )
+{
+    if ( out == NULL ) {
+            out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+        }
+        
+    out->x = transform->x->coeff[ 0 ][ 0 ][ 0 ][ 0 ] +
+             ( transform->x->coeff[ 1 ][ 0 ][ 0 ][ 0 ] * coords->x ) +
+             ( transform->x->coeff[ 0 ][ 1 ][ 0 ][ 0 ] * coords->y ) +
+             ( transform->x->coeff[ 0 ][ 0 ][ 1 ][ 0 ] * term3 ) +
+             ( transform->x->coeff[ 0 ][ 0 ][ 0 ][ 1 ] * term4 );
+             
+    out->y = transform->y->coeff[ 0 ][ 0 ][ 0 ][ 0 ] +
+             ( transform->y->coeff[ 1 ][ 0 ][ 0 ][ 0 ] * coords->x ) +
+             ( transform->y->coeff[ 0 ][ 1 ][ 0 ][ 0 ] * coords->y ) +
+             ( transform->y->coeff[ 0 ][ 0 ][ 1 ][ 0 ] * term3 ) +
+             ( transform->y->coeff[ 0 ][ 0 ][ 0 ][ 1 ] * term4 );
+             
+    return ( out );
 }
 
 
 // This function prototype has been modified since the SDRS.
-psSphereTransform *psSphereTransformAlloc(double NPlat,
+psSphereTransform *psSphereTransformAlloc( double NPlat,
         double Xo,
-        double xo)
-{
-    psSphereTransform *tmp = (psSphereTransform *) psAlloc(sizeof(psSphereTransform));
-
-    tmp->sinPhi = sin(NPlat);
-    tmp->cosPhi = cos(NPlat);
+        double xo )
+{
+    psSphereTransform * tmp = ( psSphereTransform * ) psAlloc( sizeof( psSphereTransform ) );
+    
+    tmp->sinPhi = sin( NPlat );
+    tmp->cosPhi = cos( NPlat );
     tmp->Xo = Xo;
     tmp->xo = xo;
-
-    return(tmp);
+    
+    return ( tmp );
 }
 
 // I understand this one too.
-void p_psSphereTransformFree(psSphereTransform *trans)
-{
-    psFree(trans);
+void p_psSphereTransformFree( psSphereTransform *trans )
+{
+    psFree( trans );
 }
 
@@ -103,7 +103,7 @@
 // there are no typo's.
 
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord)
+psSphere *psSphereTransformApply( psSphere *out,
+                                  const psSphereTransform *transform,
+                                  const psSphere *coord )
 {
     double sinY = 0.0;
@@ -114,131 +114,131 @@
     double y = 0.0;
     double dx = 0.0;
-
-    if (out == NULL) {
-        out = (psSphere *) psAlloc(sizeof(psSphere));
-    }
-
+    
+    if ( out == NULL ) {
+            out = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+        }
+        
     x = coord->r;
     y = coord->d;
-    dx    = x - transform->xo;
-    sinY = cos(y)*sin(dx)*transform->sinPhi + sin(y)*transform->cosPhi;
-    cosY = sqrt(1.0 - sinY*sinY);
-    sinX = (cos(y)*sin(dx)*transform->cosPhi - sin(y)*transform->sinPhi) /
-           cos(y);
-    cosX = cos(y)*cos(dx) / cos(y);
-
-    out->r = atan2(sinX, cosX) + transform->Xo;
-    out->d = atan2(sinY, cosY);
-
-    return(out);
-}
-
-psSphereTransform *psSphereTransformICRStoEcliptic(psTime time)
-{
-    struct tm *tmTime = psTimeToTM(time);
-    double year = (double) (1900 + tmTime->tm_year);
+    dx = x - transform->xo;
+    sinY = cos( y ) * sin( dx ) * transform->sinPhi + sin( y ) * transform->cosPhi;
+    cosY = sqrt( 1.0 - sinY * sinY );
+    sinX = ( cos( y ) * sin( dx ) * transform->cosPhi - sin( y ) * transform->sinPhi ) /
+           cos( y );
+    cosX = cos( y ) * cos( dx ) / cos( y );
+    
+    out->r = atan2( sinX, cosX ) + transform->Xo;
+    out->d = atan2( sinY, cosY );
+    
+    return ( out );
+}
+
+psSphereTransform *psSphereTransformICRStoEcliptic( psTime time )
+{
+    struct tm * tmTime = psTimeToTM( time );
+    double year = ( double ) ( 1900 + tmTime->tm_year );
     double T = year / 100.0;
-    double phi = -23.452294 + 0.013013*T + 0.000001639*T*T - 0.000000503*T*T*T;
+    double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T;
     double Xo = 0.0;
     double xo = 0.0;
-
-    return(psSphereTransformAlloc(phi, Xo, xo));
-}
-
-psSphereTransform *psSphereTransformEcliptictoICRS(psTime time)
-{
-    struct tm *tmTime = psTimeToTM(time);
-    double year = (double) (1900 + tmTime->tm_year);
+    
+    return ( psSphereTransformAlloc( phi, Xo, xo ) );
+}
+
+psSphereTransform *psSphereTransformEcliptictoICRS( psTime time )
+{
+    struct tm * tmTime = psTimeToTM( time );
+    double year = ( double ) ( 1900 + tmTime->tm_year );
     double T = year / 100.0;
-    double phi = +23.452294 - 0.013013*T - 0.000001639*T*T + 0.000000503*T*T*T;
+    double phi = + 23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T;
     double Xo = 0.0;
     double xo = 0.0;
-
-    return(psSphereTransformAlloc(phi, Xo, xo));
-}
-
-psSphereTransform *psSphereTransformICRStoGalatic(void)
-{
-    return(psSphereTransformAlloc(62.6, 282.25, 33.0));
-}
-
-psSphereTransform *psSphereTransformGalatictoICRS(void)
-{
-    return(psSphereTransformAlloc(-62.6, 33.0, 282.25));
+    
+    return ( psSphereTransformAlloc( phi, Xo, xo ) );
+}
+
+psSphereTransform *psSphereTransformICRStoGalatic( void )
+{
+    return ( psSphereTransformAlloc( 62.6, 282.25, 33.0 ) );
+}
+
+psSphereTransform *psSphereTransformGalatictoICRS( void )
+{
+    return ( psSphereTransformAlloc( -62.6, 33.0, 282.25 ) );
 }
 
 // XXX: Is this the correct way to calculate this?
-float cot(float x)
-{
-    return(1.0 / atan(x));
+float cot( float x )
+{
+    return ( 1.0 / atan( x ) );
 }
 
 // This is some kind of arc tan function.
-float arg(float x, float y)
-{
-    if (x > 0) {
-        return(atan(y/x));
-    } else if ((x==0) && (y==0)) {
-        return(0.5 * M_PI);
-    } else if ((x==0) && (y==0)) {
-        return(-0.5 * M_PI);
-    } else if ((x==0) && (y==0)) {
-        return(M_PI + atan(y/x));
-    } else if ((x==0) && (y==0)) {
-        return(-M_PI + atan(y/x));
-    }
-
-    psAbort(__func__, "Unacceptable range for (arg(%f, %f).\n", x, y);
-    return(0.0);
+float arg( float x, float y )
+{
+    if ( x > 0 ) {
+            return ( atan( y / x ) );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( 0.5 * M_PI );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( -0.5 * M_PI );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( M_PI + atan( y / x ) );
+        } else if ( ( x == 0 ) && ( y == 0 ) ) {
+            return ( -M_PI + atan( y / x ) );
+        }
+        
+    psAbort( __func__, "Unacceptable range for (arg(%f, %f).\n", x, y );
+    return ( 0.0 );
 }
 
 // XXX: Waiting for the definition of the PS_PROJ_PAR projection.
 // XXX: Waiting for the definition of the PS_PROJ_GLS projection.
-psPlane *psProject(const psSphere *coord,
-                   const psProjection *projection)
+psPlane *psProject( const psSphere *coord,
+                    const psProjection *projection )
 {
     float R = 0.0;
     float alpha = 0.0;
-    psPlane *tmp= (psPlane *) psAlloc(sizeof(psPlane));
-
-    if (projection->type == PS_PROJ_TAN) {
-        R = cot(coord->r) * (180.0 / M_PI);
-        tmp->x = R * sin(coord->d);
-        tmp->y = R * cos(coord->d);
-
-    } else if (projection->type == PS_PROJ_SIN) {
-        R = cos(coord->r) * (180.0 / M_PI);
-        tmp->x = R * sin(coord->d);
-        tmp->y = R * cos(coord->d);
-
-    } else if (projection->type == PS_PROJ_CAR) {
-        tmp->x = coord->d;
-        tmp->y = coord->r;
-
-    } else if (projection->type == PS_PROJ_MER) {
-        tmp->x = coord->d;
-        tmp->y = log(tan(45.0 + (0.5 * coord->r))) * 180.0/M_PI;
-
-    } else if (projection->type == PS_PROJ_AIT) {
-        alpha = 1.0 / ((180.0 / M_PI) *
-                       sqrt(1.0 + (cos(coord->r) * cos(0.5 * coord->d) * 0.5)));
-
-        tmp->x = 2.0 * alpha * cos(coord->r) * sin(0.5 * coord->d);
-        tmp->y = alpha * sin(coord->d);
-
-    } else if (projection->type == PS_PROJ_PAR) {
-        psAbort(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
-
-    } else if (projection->type == PS_PROJ_GLS) {
-        psAbort(__func__, "The projection type PS_PROJ_GLS is undefined.\n");
-    }
-
-    return(tmp);
+    psPlane *tmp = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+    
+    if ( projection->type == PS_PROJ_TAN ) {
+            R = cot( coord->r ) * ( 180.0 / M_PI );
+            tmp->x = R * sin( coord->d );
+            tmp->y = R * cos( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_SIN ) {
+            R = cos( coord->r ) * ( 180.0 / M_PI );
+            tmp->x = R * sin( coord->d );
+            tmp->y = R * cos( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_CAR ) {
+            tmp->x = coord->d;
+            tmp->y = coord->r;
+            
+        } else if ( projection->type == PS_PROJ_MER ) {
+            tmp->x = coord->d;
+            tmp->y = log( tan( 45.0 + ( 0.5 * coord->r ) ) ) * 180.0 / M_PI;
+            
+        } else if ( projection->type == PS_PROJ_AIT ) {
+            alpha = 1.0 / ( ( 180.0 / M_PI ) *
+                            sqrt( 1.0 + ( cos( coord->r ) * cos( 0.5 * coord->d ) * 0.5 ) ) );
+                            
+            tmp->x = 2.0 * alpha * cos( coord->r ) * sin( 0.5 * coord->d );
+            tmp->y = alpha * sin( coord->d );
+            
+        } else if ( projection->type == PS_PROJ_PAR ) {
+            psAbort( __func__, "The projection type PS_PROJ_PAR is undefined.\n" );
+            
+        } else if ( projection->type == PS_PROJ_GLS ) {
+            psAbort( __func__, "The projection type PS_PROJ_GLS is undefined.\n" );
+        }
+        
+    return ( tmp );
 }
 
 // XXX: Waiting for the definition of the PS_PROJ_PAR projection.
 // XXX: Waiting for the definition of the PS_PROJ_GLS projection.
-psSphere *psDeproject(const psPlane *coord,
-                      const psProjection *projection)
+psSphere *psDeproject( const psPlane *coord,
+                       const psProjection *projection )
 {
     float R = 0.0;
@@ -246,50 +246,50 @@
     float chu1 = 0.0;
     float chu2 = 0.0;
-    psSphere *tmp= (psSphere *) psAlloc(sizeof(psSphere));
-
-    if (projection->type == PS_PROJ_TAN) {
-        R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = arg(-coord->y, coord->x);
-        tmp->r = atan(180.0 / (R * M_PI));
-
-    } else if (projection->type == PS_PROJ_SIN) {
-        R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = arg(-coord->y, coord->x);
-        tmp->r = acos((R * M_PI) / 180.0);
-
-    } else if (projection->type == PS_PROJ_CAR) {
-        tmp->d = coord->x;
-        tmp->r = coord->y;
-
-    } else if (projection->type == PS_PROJ_MER) {
-        tmp->d = coord->x;
-        tmp->r = (2.0 * atan(exp((coord->y * M_PI/180.0)))) - 180.0;
-
-    } else if (projection->type == PS_PROJ_AIT) {
-        chu1 = (coord->x * M_PI) / 720.0;
-        chu1*= chu1;
-        chu2 = (coord->y * M_PI) / 360.0;
-        chu2*= chu2;
-        chu = sqrt(1.0 - chu1 - chu2);
-        tmp->d = 2.0 * arg((2.0 * chu * chu) - 1.0,
-                           (coord->x * chu * M_PI)/360.0);
-        tmp->r = asin((coord->y * chu * M_PI) / 180.0);
-
-    } else if (projection->type == PS_PROJ_PAR) {
-        psAbort(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
-
-    } else if (projection->type == PS_PROJ_GLS) {
-        psAbort(__func__, "The projection type PS_PROJ_GLG is undefined.\n");
-    }
-
-    return(tmp);
+    psSphere *tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+    
+    if ( projection->type == PS_PROJ_TAN ) {
+            R = sqrt( ( coord->x * coord->x ) + ( coord->y * coord->y ) );
+            tmp->d = arg( -coord->y, coord->x );
+            tmp->r = atan( 180.0 / ( R * M_PI ) );
+            
+        } else if ( projection->type == PS_PROJ_SIN ) {
+            R = sqrt( ( coord->x * coord->x ) + ( coord->y * coord->y ) );
+            tmp->d = arg( -coord->y, coord->x );
+            tmp->r = acos( ( R * M_PI ) / 180.0 );
+            
+        } else if ( projection->type == PS_PROJ_CAR ) {
+            tmp->d = coord->x;
+            tmp->r = coord->y;
+            
+        } else if ( projection->type == PS_PROJ_MER ) {
+            tmp->d = coord->x;
+            tmp->r = ( 2.0 * atan( exp( ( coord->y * M_PI / 180.0 ) ) ) ) - 180.0;
+            
+        } else if ( projection->type == PS_PROJ_AIT ) {
+            chu1 = ( coord->x * M_PI ) / 720.0;
+            chu1 *= chu1;
+            chu2 = ( coord->y * M_PI ) / 360.0;
+            chu2 *= chu2;
+            chu = sqrt( 1.0 - chu1 - chu2 );
+            tmp->d = 2.0 * arg( ( 2.0 * chu * chu ) - 1.0,
+                                ( coord->x * chu * M_PI ) / 360.0 );
+            tmp->r = asin( ( coord->y * chu * M_PI ) / 180.0 );
+            
+        } else if ( projection->type == PS_PROJ_PAR ) {
+            psAbort( __func__, "The projection type PS_PROJ_PAR is undefined.\n" );
+            
+        } else if ( projection->type == PS_PROJ_GLS ) {
+            psAbort( __func__, "The projection type PS_PROJ_GLG is undefined.\n" );
+        }
+        
+    return ( tmp );
 }
 
 // XXX: Do I need to check for unacceptable transformation parameters?
 // Maybe, if the points are on the North/South Pole, etc?
-psSphere *psSphereGetOffset(const psSphere *restrict position1,
-                            const psSphere *restrict position2,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit)
+psSphere *psSphereGetOffset( const psSphere *restrict position1,
+                             const psSphere *restrict position2,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit )
 {
     //    psPlane *lin;
@@ -298,51 +298,51 @@
     double tmpR = 0.0;
     double tmpD = 0.0;
-
-    if (mode == PS_LINEAR) {
-        // XXX: I have no idea how to construct this.  Maybe project both
-        // sperical positions onto the plane, set the origin at one of the
-        // points on the plane, then deproject?
-
-        // XXX: Do I need to somehow scale this projection?
-        // project position1?  Will it project to (0.0, 0.0)?
-        proj.R = position1->r;
-        proj.D = position1->d;
-        proj.Xs = 1.0;
-        proj.Ys = 1.0;
-        proj.type = PS_PROJ_TAN;
-
-        //        lin = psProject(position2, proj);
-        //        tmp = psDeproject(lin, proj);
-
-        // XXX: Do we need to convert units in tmp?
-        return(tmp);
-    } else if (mode == PS_SPHERICAL) {
-        tmpR = position2->r - position1->r;
-        tmpD = position2->d - position1->d;
-
-        if (unit == PS_ARCSEC) {
-            tmpR = (tmpR * 180.0 * 60.0 * 60.0) / M_PI;
-            tmpD = (tmpR * 180.0 * 60.0 * 60.0) / M_PI;
-        } else if (unit == PS_ARCMIN) {
-            tmpR = (tmpR * 180.0 * 60.0) / M_PI;
-            tmpD = (tmpR * 180.0 * 60.0) / M_PI;
-        } else if (unit == PS_DEGREE) {
-            tmpR = (tmpR * 180.0) / M_PI;
-            tmpD = (tmpR * 180.0) / M_PI;
-        } else if (unit == PS_RADIAN) {}
-        else {
-            psAbort(__func__, "Unknown offset unit: 0x%x\n", unit);
-        }
-
-        tmp = (psSphere *) psAlloc(sizeof(psSphere));
-        tmp->r = tmpR;
-        tmp->d = tmpD;
-        tmp->rErr = 0.0;
-        tmp->dErr = 0.0;
-        // XXX: Do we need to wrap these to an acceptable range?
-        return(tmp);
-    }
-    psAbort(__func__, "Unrecognized offset mode\n");
-    return(NULL);
+    
+    if ( mode == PS_LINEAR ) {
+            // XXX: I have no idea how to construct this.  Maybe project both
+            // sperical positions onto the plane, set the origin at one of the
+            // points on the plane, then deproject?
+            
+            // XXX: Do I need to somehow scale this projection?
+            // project position1?  Will it project to (0.0, 0.0)?
+            proj.R = position1->r;
+            proj.D = position1->d;
+            proj.Xs = 1.0;
+            proj.Ys = 1.0;
+            proj.type = PS_PROJ_TAN;
+            
+            //        lin = psProject(position2, proj);
+            //        tmp = psDeproject(lin, proj);
+            
+            // XXX: Do we need to convert units in tmp?
+            return ( tmp );
+        } else if ( mode == PS_SPHERICAL ) {
+            tmpR = position2->r - position1->r;
+            tmpD = position2->d - position1->d;
+            
+            if ( unit == PS_ARCSEC ) {
+                    tmpR = ( tmpR * 180.0 * 60.0 * 60.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 * 60.0 * 60.0 ) / M_PI;
+                } else if ( unit == PS_ARCMIN ) {
+                    tmpR = ( tmpR * 180.0 * 60.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 * 60.0 ) / M_PI;
+                } else if ( unit == PS_DEGREE ) {
+                    tmpR = ( tmpR * 180.0 ) / M_PI;
+                    tmpD = ( tmpR * 180.0 ) / M_PI;
+                } else if ( unit == PS_RADIAN ) {}
+            else {
+                    psAbort( __func__, "Unknown offset unit: 0x%x\n", unit );
+                }
+                
+            tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+            tmp->r = tmpR;
+            tmp->d = tmpD;
+            tmp->rErr = 0.0;
+            tmp->dErr = 0.0;
+            // XXX: Do we need to wrap these to an acceptable range?
+            return ( tmp );
+        }
+    psAbort( __func__, "Unrecognized offset mode\n" );
+    return ( NULL );
 }
 
@@ -351,8 +351,8 @@
 // Maybe, if the points are on the North/South Pole, etc?
 // XXX: I copied the algorithm from the ADD exactly.
-psSphere *psSphereSetOffset(const psSphere *restrict position,
-                            const psSphere *restrict offset,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit)
+psSphere *psSphereSetOffset( const psSphere *restrict position,
+                             const psSphere *restrict offset,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit )
 {
     psPlane lin;
@@ -361,46 +361,46 @@
     double tmpR = 0.0;
     double tmpD = 0.0;
-
-    if (mode == PS_LINEAR) {
-        proj.R = position->r;
-        proj.D = position->d;
-        proj.Xs = 1.0;
-        proj.Ys = 1.0;
-        proj.type = PS_PROJ_TAN;
-
-        lin.x = offset->r;
-        lin.y = offset->d;
-
-        tmp = psDeproject(&lin, &proj);
-        return(tmp);
-
-    } else if (mode == PS_SPHERICAL) {
-        if (unit == PS_ARCSEC) {
-            tmpR = (M_PI * offset->r) / (180.0 * 60.0 * 60.0);
-            tmpD = (M_PI * offset->d) / (180.0 * 60.0 * 60.0);
-        } else if (unit == PS_ARCMIN) {
-            tmpR = (M_PI * offset->r) / (180.0 * 60.0);
-            tmpD = (M_PI * offset->d) / (180.0 * 60.0);
-        } else if (unit == PS_DEGREE) {
-            tmpR = (M_PI * offset->r) / (180.0);
-            tmpD = (M_PI * offset->d) / (180.0);
-        } else if (unit == PS_RADIAN) {
-            tmpR = offset->r;
-            tmpD = offset->d;
-        } else {
-            psAbort(__func__, "Unknown offset unit: 0x%x\n", unit);
-        }
-
-        tmp = (psSphere *) psAlloc(sizeof(psSphere));
-        tmp->r = position->r + tmpR;
-        tmp->r = position->d + tmpD;
-        tmp->rErr = 0.0;
-        tmp->dErr = 0.0;
-
-        // XXX: wrap tmp->r and tmp->d to the allowed range (-PI to PI)
-        // and (0 to 2*PI).
-        return(tmp);
-    }
-    psAbort(__func__, "Unrecognized offset mode\n");
-    return(NULL);
-}
+    
+    if ( mode == PS_LINEAR ) {
+            proj.R = position->r;
+            proj.D = position->d;
+            proj.Xs = 1.0;
+            proj.Ys = 1.0;
+            proj.type = PS_PROJ_TAN;
+            
+            lin.x = offset->r;
+            lin.y = offset->d;
+            
+            tmp = psDeproject( &lin, &proj );
+            return ( tmp );
+            
+        } else if ( mode == PS_SPHERICAL ) {
+            if ( unit == PS_ARCSEC ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 * 60.0 * 60.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 * 60.0 * 60.0 );
+                } else if ( unit == PS_ARCMIN ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 * 60.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 * 60.0 );
+                } else if ( unit == PS_DEGREE ) {
+                    tmpR = ( M_PI * offset->r ) / ( 180.0 );
+                    tmpD = ( M_PI * offset->d ) / ( 180.0 );
+                } else if ( unit == PS_RADIAN ) {
+                    tmpR = offset->r;
+                    tmpD = offset->d;
+                } else {
+                    psAbort( __func__, "Unknown offset unit: 0x%x\n", unit );
+                }
+                
+            tmp = ( psSphere * ) psAlloc( sizeof( psSphere ) );
+            tmp->r = position->r + tmpR;
+            tmp->r = position->d + tmpD;
+            tmp->rErr = 0.0;
+            tmp->dErr = 0.0;
+            
+            // XXX: wrap tmp->r and tmp->d to the allowed range (-PI to PI)
+            // and (0 to 2*PI).
+            return ( tmp );
+        }
+    psAbort( __func__, "Unrecognized offset mode\n" );
+    return ( NULL );
+}
Index: /trunk/psLib/src/astronomy/psCoord.h
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.h	(revision 1373)
+++ /trunk/psLib/src/astronomy/psCoord.h	(revision 1374)
@@ -1,18 +1,18 @@
 /** @file  psCoord.h
- *
- *  @brief Contains basic coordinate transformation definitions and operations
- *
- *  This file defines the basic types for astronomical coordinate 
- *  transformation
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:08:02 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 # ifndef PS_COORD_H
@@ -26,64 +26,67 @@
 #include "psTime.h"
 
+/// @addtogroup CoordinateTransform
+/// @{
+
 typedef struct
-{
-    double x;      ///< x position
-    double y;      ///< y position
-    double xErr;   ///< Error in x position
-    double yErr;   ///< Error in y position
-}
+    {
+        double x;      ///< x position
+        double y;      ///< y position
+        double xErr;   ///< Error in x position
+        double yErr;   ///< Error in y position
+    }
 psPlane;
 
 typedef struct
-{
-    double r;      ///< RA
-    double d;      ///< Dec
-    double rErr;   ///< Error in RA
-    double dErr;   ///< Error in Dec
-}
+    {
+        double r;      ///< RA
+        double d;      ///< Dec
+        double rErr;   ///< Error in RA
+        double dErr;   ///< Error in Dec
+    }
 psSphere;
 
 typedef struct
-{
-    psDPolynomial2D *x;
-    psDPolynomial2D *y;
-}
+    {
+        psDPolynomial2D *x;
+        psDPolynomial2D *y;
+    }
 psPlaneTransform;
 
 typedef struct
-{
-    psDPolynomial4D *x;
-    psDPolynomial4D *y;
-}
+    {
+        psDPolynomial4D *x;
+        psDPolynomial4D *y;
+    }
 psPlaneDistort;
 
 typedef struct
-{
-    double sinPhi;                    ///< sin of North Pole lattitude
-    double cosPhi;                    ///< cos of North Pole lattitude
-    double Xo;                        ///< First PT of Ares lon
-    double xo;                        ///< First PT of Ares equiv lon
-}
+    {
+        double sinPhi;                    ///< sin of North Pole lattitude
+        double cosPhi;                    ///< cos of North Pole lattitude
+        double Xo;                        ///< First PT of Ares lon
+        double xo;                        ///< First PT of Ares equiv lon
+    }
 psSphereTransform;
 
 typedef enum {
-    PS_PROJ_TAN,       ///< Tangent projection
-    PS_PROJ_SIN,       ///< Sine projection
-    PS_PROJ_AIT,       ///< Aitoff projection
-    PS_PROJ_PAR,       ///< Par projection
-    PS_PROJ_GLS,       ///< GLS projection
-    PS_PROJ_CAR,       ///< CAR projection
-    PS_PROJ_MER,       ///< MER projection
+    PS_PROJ_TAN,        ///< Tangent projection
+    PS_PROJ_SIN,        ///< Sine projection
+    PS_PROJ_AIT,        ///< Aitoff projection
+    PS_PROJ_PAR,        ///< Par projection
+    PS_PROJ_GLS,        ///< GLS projection
+    PS_PROJ_CAR,        ///< CAR projection
+    PS_PROJ_MER,        ///< MER projection
     PS_PROJ_NTYPE      ///< Number of types; must be last.
 } psProjectionType;
 
 typedef struct
-{
-    double R;     ///< Coordinates of projection center
-    double D;     ///< Coordinates of projection center
-    double Xs;    ///< plate-scale in X direction
-    double Ys;    ///< plate-scale in Y direction
-    psProjectionType type;  ///< Projection type
-}
+    {
+        double R;     ///< Coordinates of projection center
+        double D;     ///< Coordinates of projection center
+        double Xs;    ///< plate-scale in X direction
+        double Ys;    ///< plate-scale in Y direction
+        psProjectionType type;  ///< Projection type
+    }
 psProjection;
 
@@ -100,47 +103,48 @@
 } psSphereOffsetUnit;
 
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords);
+psPlane *psPlaneTransformApply( psPlane *out,
+                                const psPlaneTransform *transform,
+                                const psPlane *coords );
+                                
+psPlane *psPlaneDistortApply( psPlane *out,
+                              const psPlaneDistort *transform,
+                              const psPlane *coords,
+                              float term3,
+                              float term4 );
+                              
+                              
+// New function prototype.
+psSphereTransform *psSphereTransformAlloc( double NPlat,
+        double Xo,
+        double xo );
+        
+void p_psSphereTransformFree( psSphereTransform *trans );
 
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4);
+psSphere *psSphereTransformApply( psSphere *out,
+                                  const psSphereTransform *transform,
+                                  const psSphere *coord );
+                                  
+psSphereTransform *psSphereTransformICRStoEcliptic( psTime time );
+psSphereTransform *psSphereTransformEcliptictoICRS( psTime time );
+psSphereTransform *psSphereTransformICRStoGalatic( void );
+psSphereTransform *psSphereTransformGalatictoICRS( void );
 
-
-// New function prototype.
-psSphereTransform *psSphereTransformAlloc(double NPlat,
-        double Xo,
-        double xo);
-
-void p_psSphereTransformFree(psSphereTransform *trans);
-
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord);
-
-psSphereTransform *psSphereTransformICRStoEcliptic(psTime time);
-psSphereTransform *psSphereTransformEcliptictoICRS(psTime time);
-psSphereTransform *psSphereTransformICRStoGalatic(void);
-psSphereTransform *psSphereTransformGalatictoICRS(void);
-
-psPlane *psProject(const psSphere *coord,
-                   const psProjection *projection);
-
-psSphere *psDeproject(const psPlane *coord,
-                      const psProjection *projection);
-
-psSphere *psSphereGetOffset(const psSphere *restrict position1,
-                            const psSphere *restrict position2,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit);
-
-psSphere *psSphereSetOffset(const psSphere *restrict position,
-                            const psSphere *restrict offset,
-                            psSphereOffsetMode mode,
-                            psSphereOffsetUnit unit);
-
+psPlane *psProject( const psSphere *coord,
+                    const psProjection *projection );
+                    
+psSphere *psDeproject( const psPlane *coord,
+                       const psProjection *projection );
+                       
+psSphere *psSphereGetOffset( const psSphere *restrict position1,
+                             const psSphere *restrict position2,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit );
+                             
+psSphere *psSphereSetOffset( const psSphere *restrict position,
+                             const psSphere *restrict offset,
+                             psSphereOffsetMode mode,
+                             psSphereOffsetUnit unit );
+                             
+/// @}
 
 #endif
Index: /trunk/psLib/src/astronomy/psCoord2.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord2.c	(revision 1373)
+++ /trunk/psLib/src/astronomy/psCoord2.c	(revision 1374)
@@ -1,3 +1,18 @@
-// This file contains
+/** @file  psCoord2.c
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 #include "psType.h"
@@ -7,11 +22,11 @@
 #include "psFunctions.h"
 
-psGrommit *psGrommitAlloc(const psExposure *exp)
-{
-    psGrommit *grommit = (psGrommit *) psAlloc(sizeof(psGrommit));
-
+psGrommit *psGrommitAlloc( const psExposure *exp )
+{
+    psGrommit * grommit = ( psGrommit * ) psAlloc( sizeof( psGrommit ) );
+    
     grommit->latitude = exp->dec;              // XXX Is this correct?
-    grommit->sinLat = sin(grommit->latitude);
-    grommit->cosLat = cos(grommit->latitude);
+    grommit->sinLat = sin( grommit->latitude );
+    grommit->cosLat = cos( grommit->latitude );
     grommit->abberationMag = 0.0;
     grommit->height = 0.0;
@@ -25,39 +40,39 @@
     grommit->longitudeOffset = ra;             // XXX Is this correct?
     grommit->siderealTime = 0.0;
-
-    return(grommit);
-}
-
-void p_psGrommitFree(psGrommit *grommit)
-{
-    psFree(grommit);
-}
-
-psCell *psCellinFPA(psCell *out,
-                    const psPlane *coord,
-                    const psFPA *FPA)
-{
-    psChip *tmpChip = NULL;
+    
+    return ( grommit );
+}
+
+void p_psGrommitFree( psGrommit *grommit )
+{
+    psFree( grommit );
+}
+
+psCell *psCellinFPA( psCell *out,
+                     const psPlane *coord,
+                     const psFPA *FPA )
+{
+    psChip * tmpChip = NULL;
     psCell *tmpCell = NULL;
-
-    tmpChip = psChipinFPA(tmpChip, coord, FPA);
-    tmpCell = psCellinChip(tmpCell, coord, tmpChip);
-    return(tmpCell);
-}
-
-
-psChip *psChipinFPA(psChip *out,
-                    const psPlane *coord,
-                    const psFPA *FPA)
-{
-    psFPA *tmpChip = NULL;
-
-    for (tmpChip = FPA->chips; tmpChip != NULL; tmpChip++) {
-        tmpCoord = psPlaneTransformApply(out, tmpChip->fromFPA, coord);
-
-
-        //XXX     if (this is the correct chip)
-        return(tmpChip);
-    }
+    
+    tmpChip = psChipinFPA( tmpChip, coord, FPA );
+    tmpCell = psCellinChip( tmpCell, coord, tmpChip );
+    return ( tmpCell );
+}
+
+
+psChip *psChipinFPA( psChip *out,
+                     const psPlane *coord,
+                     const psFPA *FPA )
+{
+    psFPA * tmpChip = NULL;
+    
+    for ( tmpChip = FPA->chips; tmpChip != NULL; tmpChip++ ) {
+            tmpCoord = psPlaneTransformApply( out, tmpChip->fromFPA, coord );
+            
+            
+            //XXX     if (this is the correct chip)
+            return ( tmpChip );
+        }
 }
 
@@ -66,11 +81,11 @@
 p_psCheckValidImageCoords(double x, double y, tmpImage)
 {
-    if ((x < 0.0) ||
-            (x > (double) tmpImage->numCols) ||
-            (y < 0.0) ||
-            (y > (double) tmpImage->numRows)) {
-        return(0);
-    }
-    return(1);
+    if ( ( x < 0.0 ) ||
+            ( x > ( double ) tmpImage->numCols ) ||
+            ( y < 0.0 ) ||
+            ( y > ( double ) tmpImage->numRows ) ) {
+            return ( 0 );
+        }
+    return ( 1 );
 }
 
@@ -88,57 +103,57 @@
 XXX: must deallocate memory.
  *****************************************************************************/
-psCell *psCellinChip(psCell *out,
-                     const psPlane *coord,
-                     const psChip *chip)
-{
-    psCell *tmpCell = NULL;
+psCell *psCellinChip( psCell *out,
+                      const psPlane *coord,
+                      const psChip *chip )
+{
+    psCell * tmpCell = NULL;
     psReadout *tmpReadout = NULL;
     psPlane *tmpCoord = NULL;
-
-    for (tmpCell = chip->cells; tmpCell != NULL; tmpCell++) {
-        if (tmpCell->readouts != NULL) {
-            tmpReadout = tmpCell->readouts;
-            tmpCoord = psPlaneTransformApply(out, tmpCell->fromChip, coord);
-            if (p_psCheckValidImageCoords(tmpCoord->x, tmpCoord->y,
-                                          tmpReadout->image)) {
-                return(tmpCell);
-            }
+    
+    for ( tmpCell = chip->cells; tmpCell != NULL; tmpCell++ ) {
+            if ( tmpCell->readouts != NULL ) {
+                    tmpReadout = tmpCell->readouts;
+                    tmpCoord = psPlaneTransformApply( out, tmpCell->fromChip, coord );
+                    if ( p_psCheckValidImageCoords( tmpCoord->x, tmpCoord->y,
+                                                    tmpReadout->image ) ) {
+                            return ( tmpCell );
+                        }
+                }
         }
-    }
-    return(NULL);
-}
-
-psPlane *psCoordCelltoChip(psPlane *out,
+    return ( NULL );
+}
+
+psPlane *psCoordCelltoChip( psPlane *out,
+                            const psPlane *in,
+                            const psCell *cell )
+{
+    return ( psPlaneTransformApply( out, cell->toChip, in ) );
+}
+
+psPlane *psCoordChipToFPA( psPlane *out,
                            const psPlane *in,
-                           const psCell *cell)
-{
-    return(psPlaneTransformApply(out, cell->toChip, in));
-}
-
-psPlane *psCoordChipToFPA(psPlane *out,
+                           const psChip *chip )
+{
+    return ( psPlaneTransformApply( out, chip->toFPA, in ) );
+}
+
+psPlane *psCoordFPAtoTP( psPlane *out,
+                         const psPlane *in,
+                         const psFPA *fpa )
+{
+    return ( psPlaneTransformApply( out, fpa->toTangentPlane, in ) );
+}
+
+psSphere *psCoordTPtoSky( psSphere *out,
                           const psPlane *in,
-                          const psChip *chip)
-{
-    return(psPlaneTransformApply(out, chip->toFPA, in));
-}
-
-psPlane *psCoordFPAtoTP(psPlane *out,
-                        const psPlane *in,
-                        const psFPA *fpa)
-{
-    return(psPlaneTransformApply(out, fpa->toTangentPlane, in));
-}
-
-psSphere *psCoordTPtoSky(psSphere *out,
-                         const psPlane *in,
-                         const psGrommit *grommit)
+                          const psGrommit *grommit )
 {}
 
 
-psPlane *psCoordCellToFPA(psPlane *out,
-                          const psPlane *in,
-                          const psCell *cell)
-{
-    return(psPlaneTransformApply(out, cell->toFPA, in));
+psPlane *psCoordCellToFPA( psPlane *out,
+                           const psPlane *in,
+                           const psCell *cell )
+{
+    return ( psPlaneTransformApply( out, cell->toFPA, in ) );
 }
 
@@ -147,96 +162,97 @@
 // transformation, as well as a few psPlane structs.  Can this be implemented
 // better?
-psSphere *psCoordCelltoSky(psSphere *out,
-                           const psPlane *in,
-                           const psCell *cell)
-{
-    psPlane *tmp1 = NULL;
+psSphere *psCoordCelltoSky( psSphere *out,
+                            const psPlane *in,
+                            const psCell *cell )
+{
+    psPlane * tmp1 = NULL;
     psPlane *tmp2 = NULL;
-    psFPA *parFPA = (cell->parent)->parent;
+    psFPA *parFPA = ( cell->parent ) ->parent;
     psGrommit *tmpGrommit = NULL;
-
-    tmp1 = psPlaneTransformApply(tmp1, cell->toFPA, in)
-           tmp2 = psPlaneTransformApply(tmp2, parFPA->toTangentPlane, tmp1)
-                  tmpGrommit = psGrommitAlloc(parFPA->exposure)
-                               tmp3 = psCoordTPtoSky(out, tmp2, psGrommit);
-
-    psFree(tmp1);
-    psFree(tmp2);
-    psFree(tmpGrommit);
-
-    return(psCoordTPtoSky(out, tmp2, psGrommit);
-       }
-
-       psSphere *psCoordCelltoSkyQuick(psSphere *out,
-                                       const psPlane *in,
-                                       const psCell *cell)
-       {
-           psPlane *tmp1 = NULL;
-
-           tmp1 = psPlaneTransformApply(tmp1, cell->toSky, in);
-
-           //XXX: Do something to convert the linear coords in tmp1 to spherical
-           // coords in out.
-
-           free(tmp1)
-
-           return(out);
-       }
-
-       psPlane *psCoordSkytoTP(psPlane *out,
-                               const psSphere *in,
-                               const psGrommit *grommit)
-       {
-           if (out == NULL) {
-               out = (psPlane *) psAlloc(sizeof(psPlane));
-           }
-
-           return(out);
-       }
-
-       psPlane *psCoordTPtoFPA(psPlane *out,
-                               const psPlane *in,
-                               const psFPA *fpa)
-       {
-           return(psPlaneTransformApply(out, fpa->fromTangentPlane, in));
-       }
-
-       psPlane *psCoordFPAtoChip(psPlane *out,
-                                 const psPlane *in,
-                                 const psChip *chip)
-       {
-           return(psPlaneTransformApply(out, chip->fromFPA, in));
-       }
-
-
-       psPlane *psCoordChiptoCell(psPlane *out,
+    
+    tmp1 = psPlaneTransformApply( tmp1, cell->toFPA, in )
+           tmp2 = psPlaneTransformApply( tmp2, parFPA->toTangentPlane, tmp1 )
+                  tmpGrommit = psGrommitAlloc( parFPA->exposure )
+                               tmp3 = psCoordTPtoSky( out, tmp2, psGrommit );
+                               
+    psFree( tmp1 );
+    psFree( tmp2 );
+    psFree( tmpGrommit );
+    
+    return ( psCoordTPtoSky( out, tmp2, psGrommit );
+         }
+         
+         psSphere *psCoordCelltoSkyQuick( psSphere *out,
+                                          const psPlane *in,
+                                          const psCell *cell )
+         {
+             psPlane * tmp1 = NULL;
+             
+             tmp1 = psPlaneTransformApply( tmp1, cell->toSky, in );
+             
+             //XXX: Do something to convert the linear coords in tmp1 to spherical
+             // coords in out.
+             
+             free( tmp1 )
+             
+             return ( out );
+         }
+         
+         psPlane *psCoordSkytoTP( psPlane *out,
+                                  const psSphere *in,
+                                  const psGrommit *grommit )
+         {
+             if ( out == NULL ) {
+                     out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+                 }
+                 
+             return ( out );
+         }
+         
+         psPlane *psCoordTPtoFPA( psPlane *out,
                                   const psPlane *in,
-                                  const psCell *cell)
-       {
-           return(psPlaneTransformApply(out, cell->fromChip, in));
-       }
-
-       psPlane *psCoordSkytoCell(psPlane *out,
-                                 const psSphere *in,
-                                 const psCell *cell)
-       {
-           out = psCoordSkytoTP(out, in, tmpGrommit);
-           out = psCoordTPtoFPA(out, out, whichFPA);
-           out = psCoordFPAtoChip(out, out, whichChip);
-           out = psCoordChiptoCell(out, out, whichCell);
-
-           return(out);
-       }
-
-       psPlane *psCoordSkytoCellQuick(psPlane *out,
-                                      const psSphere *in,
-                                      const psCell *cell)
-       {
-           if (out == NULL) {
-               out = (psPlane *) psAlloc(sizeof(psPlane));
-           }
-
-           return(out);
-       }
-
-
+                                  const psFPA *fpa )
+         {
+             return ( psPlaneTransformApply( out, fpa->fromTangentPlane, in ) );
+         }
+         
+         psPlane *psCoordFPAtoChip( psPlane *out,
+                                    const psPlane *in,
+                                    const psChip *chip )
+         {
+             return ( psPlaneTransformApply( out, chip->fromFPA, in ) );
+         }
+         
+         
+         psPlane *psCoordChiptoCell( psPlane *out,
+                                     const psPlane *in,
+                                     const psCell *cell )
+         {
+             return ( psPlaneTransformApply( out, cell->fromChip, in ) );
+         }
+         
+         psPlane *psCoordSkytoCell( psPlane *out,
+                                    const psSphere *in,
+                                    const psCell *cell )
+         {
+             out = psCoordSkytoTP( out, in, tmpGrommit );
+             out = psCoordTPtoFPA( out, out, whichFPA );
+             out = psCoordFPAtoChip( out, out, whichChip );
+             out = psCoordChiptoCell( out, out, whichCell );
+             
+             return ( out );
+         }
+         
+         psPlane *psCoordSkytoCellQuick( psPlane *out,
+                                         const psSphere *in,
+                                         const psCell *cell )
+         {
+             if ( out == NULL ) {
+                     out = ( psPlane * ) psAlloc( sizeof( psPlane ) );
+                 }
+                 
+             return ( out );
+         }
+         
+         
+         
Index: /trunk/psLib/src/astronomy/psCoord2.h
===================================================================
--- /trunk/psLib/src/astronomy/psCoord2.h	(revision 1373)
+++ /trunk/psLib/src/astronomy/psCoord2.h	(revision 1374)
@@ -1,18 +1,18 @@
 /** @file  psCoord2.h
- *
- *  @brief Contains basic coordinate transformation definitions and operations
- *
- *  This file defines the basic types for astronomical coordinate 
- *  transformation
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-28 22:31:19 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic coordinate transformation definitions and operations
+*
+*  This file defines the basic types for astronomical coordinate 
+*  transformation
+*
+*  @ingroup CoordinateTransform
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 # ifndef PS_COORD2_H
@@ -25,100 +25,106 @@
 #include "psFunctions.h"
 
+/// @addtogroup CoordinateTransform
+/// @{
+
 typedef struct
-{
-    const double latitude;             ///<
-    const double sinLat, cosLat;       ///<
-    const double abberationMag;        ///<
-    const double height;               ///<
-    const double temperature;          ///<
-    const double pressure;             ///<
-    const double humidity;             ///<
-    const double wavelength;           ///<
-    const double lapseRate;            ///<
-    const double refractA, refractB;   ///<
-    const double longitudeOffset;      ///<
-    const double siderealTime;         ///<
-}
+    {
+        const double latitude;             ///<
+        const double sinLat, cosLat;       ///<
+        const double abberationMag;        ///<
+        const double height;               ///<
+        const double temperature;          ///<
+        const double pressure;             ///<
+        const double humidity;             ///<
+        const double wavelength;           ///<
+        const double lapseRate;            ///<
+        const double refractA, refractB;   ///<
+        const double longitudeOffset;      ///<
+        const double siderealTime;         ///<
+    }
 psGrommit;
 
 typedef struct
-{
-    int nX, nY;               ///<
-    double x0, y0;            ///<
-    double xScale, yScale;    ///<
-    double **x, **y;          ///<
-}
+    {
+        int nX, nY;               ///<
+        double x0, y0;            ///<
+        double xScale, yScale;    ///<
+        double **x, **y;          ///<
+    }
 psFixedPattern;
 
-psGrommit *psGrommitAlloc(const psExposure *exp);
+psGrommit *psGrommitAlloc( const psExposure *exp );
 
-void p_psGrommitFree(psGrommit *grommit);
+void p_psGrommitFree( psGrommit *grommit );
 
-psCell *psCellinFPA(psCell *out,
-                    const psPlane *coord,
-                    const psFPA *FPA);
-
-psChip *psChipinFPA(psChip *out,
-                    const psPlane *coord,
-                    const psFPA *FPA);
-
-psCell *psCellinChip(psCell *out,
+psCell *psCellinFPA( psCell *out,
                      const psPlane *coord,
-                     const psChip *chip);
-
-
-
-
-psPlane *psCoordCelltoChip(psPlane *out,
+                     const psFPA *FPA );
+                     
+psChip *psChipinFPA( psChip *out,
+                     const psPlane *coord,
+                     const psFPA *FPA );
+                     
+psCell *psCellinChip( psCell *out,
+                      const psPlane *coord,
+                      const psChip *chip );
+                      
+                      
+                      
+                      
+psPlane *psCoordCelltoChip( psPlane *out,
+                            const psPlane *in,
+                            const psCell *cell );
+                            
+psPlane *psCoordChipToFPA( psPlane *out,
                            const psPlane *in,
-                           const psCell *cell);
-
-psPlane *psCoordChipToFPA(psPlane *out,
+                           const psChip *chip );
+                           
+psPlane *psCoordFPAtoTP( psPlane *out,
+                         const psPlane *in,
+                         const psFPA *fpa );
+                         
+psSphere *psCoordTPtoSky( psSphere *out,
                           const psPlane *in,
-                          const psChip *chip);
-
-psPlane *psCoordFPAtoTP(psPlane *out,
-                        const psPlane *in,
-                        const psFPA *fpa);
-
-psSphere *psCoordTPtoSky(psSphere *out,
+                          const psGrommit *grommit );
+                          
+psPlane *psCoordCellToFPA( psPlane *out,
+                           const psPlane *in,
+                           const psCell *cell );
+                           
+psSphere *psCoordCelltoSky( psSphere *out,
+                            const psPlane *in,
+                            const psCell *cell );
+                            
+psSphere *psCoordCelltoSkyQuick( psSphere *out,
+                                 const psPlane *in,
+                                 const psCell *cell );
+                                 
+psPlane *psCoordSkytoTP( psPlane *out,
+                         const psSphere *in,
+                         const psGrommit *grommit );
+                         
+psPlane *psCoordTPtoFPA( psPlane *out,
                          const psPlane *in,
-                         const psGrommit *grommit);
-
-psPlane *psCoordCellToFPA(psPlane *out,
-                          const psPlane *in,
-                          const psCell *cell);
-
-psSphere *psCoordCelltoSky(psSphere *out,
+                         const psFPA *fpa );
+                         
+psPlane *psCoordFPAtoChip( psPlane *out,
                            const psPlane *in,
-                           const psCell *cell);
-
-psSphere *psCoordCelltoSkyQuick(psSphere *out,
-                                const psPlane *in,
-                                const psCell *cell);
-
-psPlane *psCoordSkytoTP(psPlane *out,
-                        const psSphere *in,
-                        const psGrommit *grommit);
-
-psPlane *psCoordTPtoFPA(psPlane *out,
-                        const psPlane *in,
-                        const psFPA *fpa);
-
-psPlane *psCoordFPAtoChip(psPlane *out,
-                          const psPlane *in,
-                          const psChip *chip);
-
-psPlane *psCoordChiptoCell(psPlane *out,
-                           const psPlane *in,
-                           const psCell *cell);
-
-psPlane *psCoordSkytoCell(psPlane *out,
-                          const psSphere *in,
-                          const psCell *cell);
-
-psPlane *psCoordSkytoCellQuick(psPlane *out,
-                               const psSphere *in,
-                               const psCell *cell);
+                           const psChip *chip );
+                           
+psPlane *psCoordChiptoCell( psPlane *out,
+                            const psPlane *in,
+                            const psCell *cell );
+                            
+psPlane *psCoordSkytoCell( psPlane *out,
+                           const psSphere *in,
+                           const psCell *cell );
+                           
+psPlane *psCoordSkytoCellQuick( psPlane *out,
+                                const psSphere *in,
+                                const psCell *cell );
+                                
+                                
+/// @}
 
 #endif
Index: /trunk/psLib/src/astronomy/psMetadata.h
===================================================================
--- /trunk/psLib/src/astronomy/psMetadata.h	(revision 1373)
+++ /trunk/psLib/src/astronomy/psMetadata.h	(revision 1374)
@@ -10,6 +10,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-30 19:37:07 $
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 #define PS_METADATA_H
 
-
 /// @addtogroup Metadata
 /// @{
@@ -30,14 +29,14 @@
  */
 typedef enum {
-    PS_META_ITEM_SET = 0,                ///< Null. Metadata is in psMetadataItem.items
-    PS_META_S32,                         ///< Signed 32-bit integer data.
-    PS_META_F32,                         ///< Single-precision float data.
-    PS_META_F64,                         ///< Double-precision float data.
-    PS_META_STR,                         ///< String data (Stored in as void *).
-    PS_META_IMG,                         ///< Image data (Stored in as void *).
-    PS_META_JPEG,                        ///< JPEG data (Stored in as void .
-    PS_META_PNG,                         ///< PNG data (Stored in as void *).
-    PS_META_ASTROM,                      ///< Astrometric coefficients (Stored in as void *).
-    PS_META_UNKNOWN,                     ///< Other data (Stored in as void *).
+    PS_META_ITEM_SET = 0,                 ///< Null. Metadata is in psMetadataItem.items
+    PS_META_S32,                          ///< Signed 32-bit integer data.
+    PS_META_F32,                          ///< Single-precision float data.
+    PS_META_F64,                          ///< Double-precision float data.
+    PS_META_STR,                          ///< String data (Stored in as void *).
+    PS_META_IMG,                          ///< Image data (Stored in as void *).
+    PS_META_JPEG,                         ///< JPEG data (Stored in as void .
+    PS_META_PNG,                          ///< PNG data (Stored in as void *).
+    PS_META_ASTROM,                       ///< Astrometric coefficients (Stored in as void *).
+    PS_META_UNKNOWN,                      ///< Other data (Stored in as void *).
     PS_META_NTYPE                       ///< Number of types. Must be last.
 } psMetadataType;
@@ -97,7 +96,7 @@
  */
 psMetadataItem *psMetadataItemAlloc(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -117,7 +116,7 @@
  */
 psMetadataItem *psMetadataItemAllocV(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     va_list list                        ///< Arguments for name formatting and metadata item data.
 );
@@ -140,6 +139,6 @@
  */
 bool psMetadataAddItem(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
     psMetadataItem *restrict item       ///< Metadata item to be added.
 );
@@ -152,9 +151,9 @@
  */
 bool psMetadataAdd(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -170,6 +169,6 @@
  */
 bool psMetadataRemove(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be removed.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be removed.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -183,5 +182,5 @@
  */
 psMetadataItem *psMetadataLookup(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -194,5 +193,5 @@
  */
 psMetadataItem *psMetadataGet(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     int where                           ///< Location to be retrieved.
 );
@@ -205,5 +204,5 @@
  */
 bool psMetadataSetIterator(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
     int where                           ///< Location of iterator.
 );
@@ -216,6 +215,6 @@
  */
 psMetadataItem *psMetadataGetNext(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -228,6 +227,6 @@
  */
 psMetadataItem *psMetadataGetPrevious(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -244,6 +243,6 @@
  */
 void psMetadataItemPrint(
-    FILE *fd,                                    ///< Pointer to file to write metadata item.
-    const char *format,                          ///< Format to print metadata item.
+    FILE *fd,                                     ///< Pointer to file to write metadata item.
+    const char *format,                           ///< Format to print metadata item.
     const psMetadataItem *restrict metadataItem ///< Metadata item to print.
 );
@@ -256,7 +255,7 @@
  */
 psMetadata *psMetadataReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     const char *filename                ///< Name of file to read.
 );
@@ -269,7 +268,7 @@
  */
 psMetadata *psMetadataFReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     fitsfile *fd                        ///< Pointer to file to read.
 );
Index: /trunk/psLib/src/astronomy/psPhotometry.h
===================================================================
--- /trunk/psLib/src/astronomy/psPhotometry.h	(revision 1373)
+++ /trunk/psLib/src/astronomy/psPhotometry.h	(revision 1374)
@@ -1,17 +1,17 @@
 /** @file  psPhotometry.h
- *
- *  @brief Contains basic photometric structures.
- *
- *  This file defines the basic photometric structures.
- *
- *  @ingroup AstroImage
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-28 22:31:01 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*
+*  @brief Contains basic photometric structures.
+*
+*  This file defines the basic photometric structures.
+*
+*  @ingroup Photometry
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 
 # ifndef PS_PHOTOMETRIC_H
@@ -24,24 +24,29 @@
 #include "psFunctions.h"
 
+/// @addtogroup Photometry
+/// @{
+
 typedef struct
-{
-    const int ID;
-    const char *name;
-    const char *camera;
-    const char *filter;
-    const char *detector;
-}
+    {
+        const int ID;
+        const char *name;
+        const char *camera;
+        const char *filter;
+        const char *detector;
+    }
 psPhotSystem;
 
 typedef struct
-{
-    psPhotSystem src;
-    psPhotSystem dst;
-    psPhotSystem pP, pM;
-    psPhotSystem sP, sM;
-    float pA, sA;
-    psPolynomial3D transform;
-}
+    {
+        psPhotSystem src;
+        psPhotSystem dst;
+        psPhotSystem pP, pM;
+        psPhotSystem sP, sM;
+        float pA, sA;
+        psPolynomial3D transform;
+    }
 psPhotTransform;
 
+/// @}
+
 #endif
Index: /trunk/psLib/src/collections/psMetadata.h
===================================================================
--- /trunk/psLib/src/collections/psMetadata.h	(revision 1373)
+++ /trunk/psLib/src/collections/psMetadata.h	(revision 1374)
@@ -10,6 +10,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-30 19:37:07 $
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 #define PS_METADATA_H
 
-
 /// @addtogroup Metadata
 /// @{
@@ -30,14 +29,14 @@
  */
 typedef enum {
-    PS_META_ITEM_SET = 0,                ///< Null. Metadata is in psMetadataItem.items
-    PS_META_S32,                         ///< Signed 32-bit integer data.
-    PS_META_F32,                         ///< Single-precision float data.
-    PS_META_F64,                         ///< Double-precision float data.
-    PS_META_STR,                         ///< String data (Stored in as void *).
-    PS_META_IMG,                         ///< Image data (Stored in as void *).
-    PS_META_JPEG,                        ///< JPEG data (Stored in as void .
-    PS_META_PNG,                         ///< PNG data (Stored in as void *).
-    PS_META_ASTROM,                      ///< Astrometric coefficients (Stored in as void *).
-    PS_META_UNKNOWN,                     ///< Other data (Stored in as void *).
+    PS_META_ITEM_SET = 0,                 ///< Null. Metadata is in psMetadataItem.items
+    PS_META_S32,                          ///< Signed 32-bit integer data.
+    PS_META_F32,                          ///< Single-precision float data.
+    PS_META_F64,                          ///< Double-precision float data.
+    PS_META_STR,                          ///< String data (Stored in as void *).
+    PS_META_IMG,                          ///< Image data (Stored in as void *).
+    PS_META_JPEG,                         ///< JPEG data (Stored in as void .
+    PS_META_PNG,                          ///< PNG data (Stored in as void *).
+    PS_META_ASTROM,                       ///< Astrometric coefficients (Stored in as void *).
+    PS_META_UNKNOWN,                      ///< Other data (Stored in as void *).
     PS_META_NTYPE                       ///< Number of types. Must be last.
 } psMetadataType;
@@ -97,7 +96,7 @@
  */
 psMetadataItem *psMetadataItemAlloc(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -117,7 +116,7 @@
  */
 psMetadataItem *psMetadataItemAllocV(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     va_list list                        ///< Arguments for name formatting and metadata item data.
 );
@@ -140,6 +139,6 @@
  */
 bool psMetadataAddItem(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
     psMetadataItem *restrict item       ///< Metadata item to be added.
 );
@@ -152,9 +151,9 @@
  */
 bool psMetadataAdd(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -170,6 +169,6 @@
  */
 bool psMetadataRemove(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be removed.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be removed.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -183,5 +182,5 @@
  */
 psMetadataItem *psMetadataLookup(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -194,5 +193,5 @@
  */
 psMetadataItem *psMetadataGet(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     int where                           ///< Location to be retrieved.
 );
@@ -205,5 +204,5 @@
  */
 bool psMetadataSetIterator(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
     int where                           ///< Location of iterator.
 );
@@ -216,6 +215,6 @@
  */
 psMetadataItem *psMetadataGetNext(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -228,6 +227,6 @@
  */
 psMetadataItem *psMetadataGetPrevious(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -244,6 +243,6 @@
  */
 void psMetadataItemPrint(
-    FILE *fd,                                    ///< Pointer to file to write metadata item.
-    const char *format,                          ///< Format to print metadata item.
+    FILE *fd,                                     ///< Pointer to file to write metadata item.
+    const char *format,                           ///< Format to print metadata item.
     const psMetadataItem *restrict metadataItem ///< Metadata item to print.
 );
@@ -256,7 +255,7 @@
  */
 psMetadata *psMetadataReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     const char *filename                ///< Name of file to read.
 );
@@ -269,7 +268,7 @@
  */
 psMetadata *psMetadataFReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     fitsfile *fd                        ///< Pointer to file to read.
 );
Index: /trunk/psLib/src/image/psImageExtraction.c
===================================================================
--- /trunk/psLib/src/image/psImageExtraction.c	(revision 1373)
+++ /trunk/psLib/src/image/psImageExtraction.c	(revision 1374)
@@ -1,3 +1,3 @@
-/** @file  psImageManip.h
+/** @file  psImageExtraction.c
 *
 *  @brief Contains basic image extraction operations, as specified in the 
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-31 02:27:43 $
+*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
Index: /trunk/psLib/src/image/psImageExtraction.h
===================================================================
--- /trunk/psLib/src/image/psImageExtraction.h	(revision 1373)
+++ /trunk/psLib/src/image/psImageExtraction.h	(revision 1374)
@@ -1,3 +1,3 @@
-/** @file  psImageManip.h
+/** @file  psImageExtraction.h
 *
 *  @brief Contains basic image extraction operations, as specified in the 
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-31 02:27:43 $
+*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,9 +41,9 @@
 */
 psImage *psImageSubset(
-    psImage *out,                        ///< Subimage to return, or NULL.
-    psImage *image,                      ///< Parent image.
-    unsigned int numCols,                ///< Subimage width (<= image.nCols - col0).
-    unsigned int numRows,                ///< Subimage height (<= image.nRows - row0).
-    unsigned int col0,                   ///< Subimage col-offset (0 <= col0 < nCol).
+    psImage *out,                         ///< Subimage to return, or NULL.
+    psImage *image,                       ///< Parent image.
+    unsigned int numCols,                 ///< Subimage width (<= image.nCols - col0).
+    unsigned int numRows,                 ///< Subimage height (<= image.nRows - row0).
+    unsigned int col0,                    ///< Subimage col-offset (0 <= col0 < nCol).
     unsigned int row0                   ///< Subimage row-offset (0 <= row0 < nCol).
 );
Index: /trunk/psLib/src/image/psImageStats.h
===================================================================
--- /trunk/psLib/src/image/psImageStats.h	(revision 1373)
+++ /trunk/psLib/src/image/psImageStats.h	(revision 1374)
@@ -1,18 +1,17 @@
 /** @file psImageStats.h
- *  \brief Routines for calculating statistics on images.
- *  \ingroup Stats
- *  @ingroup Stats
- *
- *  This file will hold the prototypes for procedures which calculate
- *  statistic on images, histograms on images, and fit/evaluate Chebyshev
- *  polynomials to images.
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:00:27 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*  \brief Routines for calculating statistics on images.
+*  @ingroup ImageStats
+*
+*  This file will hold the prototypes for procedures which calculate
+*  statistic on images, histograms on images, and fit/evaluate Chebyshev
+*  polynomials to images.
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 #if !defined(PS_IMAGE_STATS_H)
 #define PS_IMAGE_STATS_H
@@ -25,27 +24,32 @@
 #include "psFunctions.h"
 
+/// @addtogroup ImageStats
+/// @{
+
 /// This routine must determine the various statistics for the image.
-psStats *psImageStats(psStats *stats, ///< defines statistics to be calculated
-                      psImage *in,    ///< image (or subimage) to calculate stats
-                      psImage *mask,  ///< mask data for image (NULL ok)
-                      int maskVal);   ///< mask Mask for mask
-
-
-psHistogram *psImageHistogram(psHistogram *out,  ///< input histogram description & target
-                              psImage *in,       ///< Image data to be histogramed.
-                              psImage *mask,     ///< mask data for image (NULL ok)
-                              unsigned int maskVal);  ///< mask Mask for mask
-
+psStats *psImageStats( psStats *stats,  ///< defines statistics to be calculated
+                       psImage *in,     ///< image (or subimage) to calculate stats
+                       psImage *mask,   ///< mask data for image (NULL ok)
+                       int maskVal );   ///< mask Mask for mask
+                       
+                       
+psHistogram *psImageHistogram( psHistogram *out,   ///< input histogram description & target
+                               psImage *in,        ///< Image data to be histogramed.
+                               psImage *mask,      ///< mask data for image (NULL ok)
+                               unsigned int maskVal );  ///< mask Mask for mask
+                               
 /// Fit a 2-D polynomial surface to an image.
 psPolynomial2D *
-psImageFitPolynomial(const psImage *input, ///< image to fit
-                     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
+psImageFitPolynomial( const psImage *input,  ///< image to fit
+                      psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
                     );
-
+                    
 /// Evaluate a 2-D polynomial surface to image pixels.
 int
-psImageEvalPolynomial(const psImage *input, ///< image to fit
-                      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
+psImageEvalPolynomial( const psImage *input,  ///< image to fit
+                       const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
                      );
+                     
+/// @}
 
 #endif
Index: /trunk/psLib/src/imageops/psImageStats.h
===================================================================
--- /trunk/psLib/src/imageops/psImageStats.h	(revision 1373)
+++ /trunk/psLib/src/imageops/psImageStats.h	(revision 1374)
@@ -1,18 +1,17 @@
 /** @file psImageStats.h
- *  \brief Routines for calculating statistics on images.
- *  \ingroup Stats
- *  @ingroup Stats
- *
- *  This file will hold the prototypes for procedures which calculate
- *  statistic on images, histograms on images, and fit/evaluate Chebyshev
- *  polynomials to images.
- *
- *  @author George Gusciora, MHPCC
- *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 02:00:27 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- */
+*  \brief Routines for calculating statistics on images.
+*  @ingroup ImageStats
+*
+*  This file will hold the prototypes for procedures which calculate
+*  statistic on images, histograms on images, and fit/evaluate Chebyshev
+*  polynomials to images.
+*
+*  @author George Gusciora, MHPCC
+*
+*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
+*
+*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+*/
 #if !defined(PS_IMAGE_STATS_H)
 #define PS_IMAGE_STATS_H
@@ -25,27 +24,32 @@
 #include "psFunctions.h"
 
+/// @addtogroup ImageStats
+/// @{
+
 /// This routine must determine the various statistics for the image.
-psStats *psImageStats(psStats *stats, ///< defines statistics to be calculated
-                      psImage *in,    ///< image (or subimage) to calculate stats
-                      psImage *mask,  ///< mask data for image (NULL ok)
-                      int maskVal);   ///< mask Mask for mask
-
-
-psHistogram *psImageHistogram(psHistogram *out,  ///< input histogram description & target
-                              psImage *in,       ///< Image data to be histogramed.
-                              psImage *mask,     ///< mask data for image (NULL ok)
-                              unsigned int maskVal);  ///< mask Mask for mask
-
+psStats *psImageStats( psStats *stats,  ///< defines statistics to be calculated
+                       psImage *in,     ///< image (or subimage) to calculate stats
+                       psImage *mask,   ///< mask data for image (NULL ok)
+                       int maskVal );   ///< mask Mask for mask
+                       
+                       
+psHistogram *psImageHistogram( psHistogram *out,   ///< input histogram description & target
+                               psImage *in,        ///< Image data to be histogramed.
+                               psImage *mask,      ///< mask data for image (NULL ok)
+                               unsigned int maskVal );  ///< mask Mask for mask
+                               
 /// Fit a 2-D polynomial surface to an image.
 psPolynomial2D *
-psImageFitPolynomial(const psImage *input, ///< image to fit
-                     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
+psImageFitPolynomial( const psImage *input,  ///< image to fit
+                      psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
                     );
-
+                    
 /// Evaluate a 2-D polynomial surface to image pixels.
 int
-psImageEvalPolynomial(const psImage *input, ///< image to fit
-                      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
+psImageEvalPolynomial( const psImage *input,  ///< image to fit
+                       const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
                      );
+                     
+/// @}
 
 #endif
Index: /trunk/psLib/src/pslib.h
===================================================================
--- /trunk/psLib/src/pslib.h	(revision 1373)
+++ /trunk/psLib/src/pslib.h	(revision 1374)
@@ -8,6 +8,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-31 01:50:33 $
+*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -75,17 +75,39 @@
 #include "psVector.h"
 
+/// @defgroup Array Array Container
+/// @ingroup DataContainer
 #include "psArray.h"
 
 /// @defgroup Image Image Container
 /// @ingroup DataContainer
+/// @{
 #include "psImage.h"
+#include "psImageExtraction.h"
+#include "psImageManip.h"
 
-/// @defgroup BitSet Bit Set
+/// @defgroup ImageIO Image File I/O Functions
+/// @ingroup Image
+#include "psImageIO.h"
+
+
+/// @defgroup ImageStats Image Statistical Functions
+/// @ingroup Image
+#include "psImageStats.h"
+
+/// @}
+
+/// @defgroup BitSet Bit Set Container
 /// @ingroup DataContainer
 #include "psBitSet.h"
+
+/// @}
 
 // Data Manipulation
 /// @defgroup DataManip Data Manipulation
 /// @{
+
+/// @defgroup Compare Comparison Functions
+/// @ingroup DataManip
+#include "psCompare.h"
 
 /// @defgroup Stats Statistic Functions
@@ -101,14 +123,7 @@
 #include "psMatrixVectorArithmetic.h"
 
-/// @defgroup Transform Fourier Transform
+/// @defgroup Transform Fourier Transform Operations
 /// @ingroup DataManip
 #include "psFFT.h"
-
-/// @defgroup ImageIO Image File I/O
-/// @ingroup DataManip
-#include "psImageIO.h"
-
-#include "psImageManip.h"
-#include "psImageExtraction.h"
 
 #include "psFunctions.h"
@@ -120,4 +135,17 @@
 /// @defgroup Astronomy Astronomy Functions
 /// @{
+
+/// @defgroup AstroImage Astronomical Imagery
+/// @ingroup Astronomy
+#include "psCCD.h"
+
+/// @defgroup CoordinateTransform Coordinate Functions
+/// @ingroup Astronomy
+#include "psCoord.h"
+#include "psCoord2.h"
+
+/// @defgroup Photometry Photometry
+/// @ingroup Astronomy
+#include "psPhotometry.h"
 
 /// @defgroup Time Time Functions
Index: /trunk/psLib/src/types/psMetadata.h
===================================================================
--- /trunk/psLib/src/types/psMetadata.h	(revision 1373)
+++ /trunk/psLib/src/types/psMetadata.h	(revision 1374)
@@ -10,6 +10,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-07-30 19:37:07 $
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-04 00:55:17 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 #define PS_METADATA_H
 
-
 /// @addtogroup Metadata
 /// @{
@@ -30,14 +29,14 @@
  */
 typedef enum {
-    PS_META_ITEM_SET = 0,                ///< Null. Metadata is in psMetadataItem.items
-    PS_META_S32,                         ///< Signed 32-bit integer data.
-    PS_META_F32,                         ///< Single-precision float data.
-    PS_META_F64,                         ///< Double-precision float data.
-    PS_META_STR,                         ///< String data (Stored in as void *).
-    PS_META_IMG,                         ///< Image data (Stored in as void *).
-    PS_META_JPEG,                        ///< JPEG data (Stored in as void .
-    PS_META_PNG,                         ///< PNG data (Stored in as void *).
-    PS_META_ASTROM,                      ///< Astrometric coefficients (Stored in as void *).
-    PS_META_UNKNOWN,                     ///< Other data (Stored in as void *).
+    PS_META_ITEM_SET = 0,                 ///< Null. Metadata is in psMetadataItem.items
+    PS_META_S32,                          ///< Signed 32-bit integer data.
+    PS_META_F32,                          ///< Single-precision float data.
+    PS_META_F64,                          ///< Double-precision float data.
+    PS_META_STR,                          ///< String data (Stored in as void *).
+    PS_META_IMG,                          ///< Image data (Stored in as void *).
+    PS_META_JPEG,                         ///< JPEG data (Stored in as void .
+    PS_META_PNG,                          ///< PNG data (Stored in as void *).
+    PS_META_ASTROM,                       ///< Astrometric coefficients (Stored in as void *).
+    PS_META_UNKNOWN,                      ///< Other data (Stored in as void *).
     PS_META_NTYPE                       ///< Number of types. Must be last.
 } psMetadataType;
@@ -97,7 +96,7 @@
  */
 psMetadataItem *psMetadataItemAlloc(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -117,7 +116,7 @@
  */
 psMetadataItem *psMetadataItemAllocV(
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     va_list list                        ///< Arguments for name formatting and metadata item data.
 );
@@ -140,6 +139,6 @@
  */
 bool psMetadataAddItem(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
     psMetadataItem *restrict item       ///< Metadata item to be added.
 );
@@ -152,9 +151,9 @@
  */
 bool psMetadataAdd(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be added.
-    const char *name,                    ///< Name of metadata item.
-    psMetadataType type,                 ///< Type of metadata item.
-    const char *comment,                 ///< Comment for metadata item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be added.
+    const char *name,                     ///< Name of metadata item.
+    psMetadataType type,                  ///< Type of metadata item.
+    const char *comment,                  ///< Comment for metadata item.
     ...                                 ///< Arguments for name formatting and metadata item data.
 );
@@ -170,6 +169,6 @@
  */
 bool psMetadataRemove(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
-    int where,                           ///< Location to be removed.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
+    int where,                            ///< Location to be removed.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -183,5 +182,5 @@
  */
 psMetadataItem *psMetadataLookup(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     const char *restrict key            ///< Name of metadata key.
 );
@@ -194,5 +193,5 @@
  */
 psMetadataItem *psMetadataGet(
-    psMetadata *restrict md,             ///< Metadata collection to insert metadat item.
+    psMetadata *restrict md,              ///< Metadata collection to insert metadat item.
     int where                           ///< Location to be retrieved.
 );
@@ -205,5 +204,5 @@
  */
 bool psMetadataSetIterator(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
     int where                           ///< Location of iterator.
 );
@@ -216,6 +215,6 @@
  */
 psMetadataItem *psMetadataGetNext(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -228,6 +227,6 @@
  */
 psMetadataItem *psMetadataGetPrevious(
-    psMetadata *restrict md,             ///< Metadata collection to iterate.
-    const char *restrict match,          ///< Beginning of key name.
+    psMetadata *restrict md,              ///< Metadata collection to iterate.
+    const char *restrict match,           ///< Beginning of key name.
     int which                           ///< Iterator to be used.
 );
@@ -244,6 +243,6 @@
  */
 void psMetadataItemPrint(
-    FILE *fd,                                    ///< Pointer to file to write metadata item.
-    const char *format,                          ///< Format to print metadata item.
+    FILE *fd,                                     ///< Pointer to file to write metadata item.
+    const char *format,                           ///< Format to print metadata item.
     const psMetadataItem *restrict metadataItem ///< Metadata item to print.
 );
@@ -256,7 +255,7 @@
  */
 psMetadata *psMetadataReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     const char *filename                ///< Name of file to read.
 );
@@ -269,7 +268,7 @@
  */
 psMetadata *psMetadataFReadHeader(
-    psMetadata *output,                  ///< Resulting metadata from read.
-    const char *extname,                 ///< File name extension string.
-    int extnum,                          ///< File name extension number.
+    psMetadata *output,                   ///< Resulting metadata from read.
+    const char *extname,                  ///< File name extension string.
+    int extnum,                           ///< File name extension number.
     fitsfile *fd                        ///< Pointer to file to read.
 );
