Index: /trunk/archive/pslib/include/psAstrom.h
===================================================================
--- /trunk/archive/pslib/include/psAstrom.h	(revision 152)
+++ /trunk/archive/pslib/include/psAstrom.h	(revision 153)
@@ -14,91 +14,91 @@
 /***********************************************************************************************************/
 
-/* Astrometric coefficients */
-typedef struct {
-    int xyOrder;		        // Spatial (x,y) order of polynomial
-    int colourOrder;		        // Order of polynomial in colour
-    int magOrder;		        // Order of polynomial in magnitude
-    int xyColourOrder;		        // Spatial (x,y) order of polynomial in colour times x and y
-    int xyMagOrder;		        // Spatial (x,y) order of polynomial in magnitude times x and y
-    enum psColourRef colourRef;	        // Colour reference
-    psDoubleArray *restrict coeff;	// Coefficients of astrometric solution
-    psDoubleArray *restrict coeffErr;	// Error in coefficients
+/** Astrometric coefficients */
+typedef struct {
+    int xyOrder;		        //!< Spatial (x,y) order of polynomial
+    int colourOrder;		        //!< Order of polynomial in colour
+    int magOrder;		        //!< Order of polynomial in magnitude
+    int xyColourOrder;		        //!< Spatial (x,y) order of polynomial in colour times x and y
+    int xyMagOrder;		        //!< Spatial (x,y) order of polynomial in magnitude times x and y
+    enum psColourRef colourRef;	        //!< Colour reference
+    psDoubleArray *restrict coeff;	//!< Coefficients of astrometric solution
+    psDoubleArray *restrict coeffErr;	//!< Error in coefficients
 } psAstromCoeffs;
 
-/* Constructor */
+/** Constructor */
 psAstromCoeffs *
-psAstromCoeffsNew(int xyOrder,		// Spatial (x,y) order of polynomial
-		  int colourOrder,	// Order of polynomial in colour
-		  int magOrder,		// Order of polynomial in magnitude
-		  int xyColourOrder,	// Spatial (x,y) order of polynomial in colour times x and y
-		  int xyMagOrder,	// Spatial (x,y) order of polynomial in magnitude times x and y
-		  enum psColourRef colourRef // Colour reference
-    );
-
-/* Destructor */
-void
-psAstromCoeffsDel(psAstromCoeffs *restrict myAstromCoeffs // Object to destroy
-    );
-
-/***********************************************************************************************************/
-
-/* Telescope pointing information for an exposure */
+psAstromCoeffsNew(int xyOrder,		//!< Spatial (x,y) order of polynomial
+		  int colourOrder,	//!< Order of polynomial in colour
+		  int magOrder,		//!< Order of polynomial in magnitude
+		  int xyColourOrder,	//!< Spatial (x,y) order of polynomial in colour times x and y
+		  int xyMagOrder,	//!< Spatial (x,y) order of polynomial in magnitude times x and y
+		  enum psColourRef colourRef //!< Colour reference
+    );
+
+/** Destructor */
+void
+psAstromCoeffsDel(psAstromCoeffs *restrict myAstromCoeffs //!< Object to destroy
+    );
+
+/***********************************************************************************************************/
+
+/** Telescope pointing information for an exposure */
 typedef struct {
     // Telescope longitude, latitude and height are stored separately, since they don't change with pointing
-    double ra, dec;			// Telescope boresight
-    double ha;				// Hour angle
-    double zd;				// Zenith distance
-    double az;				// Azimuth
-    float rotAngle;			// Rotator position angle
-    float temp;				// Temperature
-    float pressure;			// Pressure
+    double ra, dec;			//!< Telescope boresight
+    double ha;				//!< Hour angle
+    double zd;				//!< Zenith distance
+    double az;				//!< Azimuth
+    float rotAngle;			//!< Rotator position angle
+    float temp;				//!< Temperature
+    float pressure;			//!< Pressure
     /* Derived quantities */
-    float parallactic;			// Parallactic angle
-    float airmass;	                // Airmass, calculated from zenith distance
+    float parallactic;			//!< Parallactic angle
+    float airmass;	                //!< Airmass, calculated from zenith distance
 } psTelPointing;
 
-/* Constructor */
+/** Constructor */
 psTelPointing *
-psTelPointingNew(double ra, double dec,	// Telescope boresight
-		 double ha,		// Hour angle
-		 double zd,		// Zenith distance
-		 double az,		// Azimuth
-		 float rotAngle,	// Rotator position angle
-		 float temp,		// Temperature
-		 float pressure		// Pressure
-    );
-
-/* Destructor */
-void
-psTelPointingDel(psTelPointing *restrict myTelPointing // Object to destroy
-    );
-
-
-/***********************************************************************************************************/
-
-/* Cell details: specifies how the cell is mounted on its parent OTA   */
-typedef struct {
-    psOTAPos position;			// Position of cell in its OTA.  Specifies the position of the
-					// (imaginary) pixel (0,0)
-    float rotation;			// Rotation of cell in its OTA.  Specified from +x through +y
-    int xSize, ySize;			// Number of pixels in x and y
-    float scale;			// Relative pixel scales, if CCD pitch varies. Specify a positive
-					// scale for a left-handed coordinate system, negative for right. If
-					// NULL, then every chip has identical scale, and system is
-					// left-handed.
+psTelPointingNew(double ra, double dec,	//!< Telescope boresight
+		 double ha,		//!< Hour angle
+		 double zd,		//!< Zenith distance
+		 double az,		//!< Azimuth
+		 float rotAngle,	//!< Rotator position angle
+		 float temp,		//!< Temperature
+		 float pressure		//!< Pressure
+    );
+
+/** Destructor */
+void
+psTelPointingDel(psTelPointing *restrict myTelPointing //!< Object to destroy
+    );
+
+
+/***********************************************************************************************************/
+
+/** Cell details: specifies how the cell is mounted on its parent OTA */
+typedef struct {
+    psOTAPos position;			//!< Position of cell in its OTA.  Specifies the position of the
+					//!< (imaginary) pixel (0,0)
+    float rotation;			//!< Rotation of cell in its OTA.  Specified from +x through +y
+    int xSize, ySize;			//!< Number of pixels in x and y
+    float scale;			//!< Relative pixel scales, if CCD pitch varies. Specify a positive
+					//!< scale for a left-handed coordinate system, negative for right. If
+					//!< NULL, then every chip has identical scale, and system is
+					//!< left-handed.
 } psCellDescription;
 
-/* Constructor */
+/** Constructor */
 psCellDescription *
 psCellDescriptionNew(void);
 
-/* Destructor */
-void
-psCellDescriptionDel(psCellDescription *restrict myCell // Cell description to destroy
-    );
-
-/***********************************************************************************************************/
-
-/* Array of cell descriptions */
+/** Destructor */
+void
+psCellDescriptionDel(psCellDescription *restrict myCell //!< Cell description to destroy
+    );
+
+/***********************************************************************************************************/
+
+/** Array of cell descriptions */
 PS_DECLARE_ARRAY_TYPE(psCellDescription);
 PS_CREATE_ARRAY_TYPE(psCellDescription);
@@ -106,26 +106,26 @@
 /***********************************************************************************************************/
 
-/* OTA details: specifies how the OTA is mounted on the focal plane */
-typedef struct {
-    psOTAPos position;			// Position of OTA on the focal plane.  Specifies the position of the
-					// bottom left-hand corner.
-    float rotation;			// Rotation of OTA on the focal plane.  Specified from +x through +y
-    psCellDescriptionArray *restrict cells; // Cell descriptions
-    psOTAAstrom *astrom;		// OTA astrometry
+/** OTA details: specifies how the OTA is mounted on the focal plane */
+typedef struct {
+    psOTAPos position;			//!< Position of OTA on the focal plane.  Specifies the position of the
+					//!< bottom left-hand corner.
+    float rotation;			//!< Rotation of OTA on the focal plane.  Specified from +x through +y
+    psCellDescriptionArray *restrict cells; //!< Cell descriptions
+    psOTAAstrom *astrom;		//!< OTA astrometry
 } psOTADescription;
 
-/* Constructor */
+/** Constructor */
 psOTADescription *
 psOTADescriptionNew(void);
 
-/* Destructor */
-void
-psOTADescriptionDel(psOTADescription *restrict myOTA // OTA description to destroy
-    );
-
-/***********************************************************************************************************/
-
-/* Astrometric solution for an OTA */
-/* There are four coordinate frames that we need to worry about:
+/** Destructor. */
+void
+psOTADescriptionDel(psOTADescription *restrict myOTA //!< OTA description to destroy
+    );
+
+/***********************************************************************************************************/
+
+/** Astrometric solution for an OTA.
+ * There are four coordinate frames that we need to worry about:
  * 1. Chip frame: chip# plus x,y in pixels
  * 2. Focal plane frame: X,Y in microns
@@ -144,24 +144,24 @@
 typedef struct {
     /* Focal plane to and from tangent plane */
-    psAstromCoeffs *restrict tpToFP;	// General astrometric solution for tangent plane to focal plane
-    psAstromCoeffs *restrict fpToTP;	// General astrometric solution for focal plane to tangent plane
-    psMatrix *pattern;		        // Fixed pattern distortions for focal plane to tangent plane (simply
-					// * -1 for the reverse); MAY NEED TO BE REVISED UPON IMPLEMENTATION
+    psAstromCoeffs *restrict tpToFP;	//!< General astrometric solution for tangent plane to focal plane
+    psAstromCoeffs *restrict fpToTP;	//!< General astrometric solution for focal plane to tangent plane
+    psMatrix *pattern;		        //!< Fixed pattern distortions for focal plane to tangent plane (simply
+					//!< * -1 for the reverse); MAY NEED TO BE REVISED UPON IMPLEMENTATION
     /* Tangent plane to and from the celestial sphere */
-    psDoubleArray *restrict tp;		// Data needed to convert from the sky to the tangent plane and back;
-					// produced by and used by SLALib (a.k.a. "Wallace's Grommit")
+    psDoubleArray *restrict tp;		//!< Data needed to convert from the sky to the tangent plane and back;
+					//!< produced by and used by SLALib (a.k.a. "Wallace's Grommit")
     /* Characterisation of the solution */
-    float rmsX, rmsY;		        // Dispersion in astrometric solution
-    float chi2;				// chi^2 of astrometric solution
+    float rmsX, rmsY;		        //!< Dispersion in astrometric solution
+    float chi2;				//!< chi^2 of astrometric solution
 } psOTAAstrom;
 
-/* Constructor */
+/** Constructor */
 psAstrom *
-psAstromNew(const psTelPointing *telescope	// Telescope pointing, used to initialise the tp data.
-    );
-
-/* Destructor */
-void
-psAstromDel(psAstrom *restrict myAstrom	// Object to destroy
+psAstromNew(const psTelPointing *telescope //!< Telescope pointing, used to initialise the tp data.
+    );
+
+/** Destructor */
+void
+psAstromDel(psAstrom *restrict myAstrom	//!< Object to destroy
     );
 
@@ -170,23 +170,23 @@
 /* Calculating and applying astrometric solutions */
 
-/* Convert (RA,Dec) to (cell#,x,y) */
+/** Convert (RA,Dec) to (cell#,x,y) */
 psOTAPos *
-psSkyToOTA(const psSkyPos *restrict position, // Position on the sky
-	   const psOTADescription *restrict ota // OTA details
-    );
-
-/* Convert (cell#,x,y) to (RA,Dec) */
+psSkyToOTA(const psSkyPos *restrict position, //!< Position on the sky
+	   const psOTADescription *restrict ota //!< OTA details
+    );
+
+/** Convert (cell#,x,y) to (RA,Dec) */
 psSkyPos *
-psOTAToSky(const psOTAPos *restrict position, // Position on the detector
-	   const psOTADescription *restrict ota // OTA details
-    );
-
-/* Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
+psOTAToSky(const psOTAPos *restrict position, //!< Position on the detector
+	   const psOTADescription *restrict ota //!< OTA details
+    );
+
+/** Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
 int
-psFitAstrom(psOTADescription *restrict ota, // psAstrom struct containing initial guess for coefficients
-	    const psOTAPosArray *restrict detector, // Positions on OTA (chip#,x,y)
-	    const psSkyPosArray *restrict sky, // Positions on the sky (RA,Dec)
-	    const psTelPointing *telescope // Telescope pointing information, for airmass, parallactic angle
-					   // which may help set the astrometric solution
+psFitAstrom(psOTADescription *restrict ota, //!< psAstrom struct containing initial guess for coefficients
+	    const psOTAPosArray *restrict detector, //!< Positions on OTA (chip#,x,y)
+	    const psSkyPosArray *restrict sky, //!< Positions on the sky (RA,Dec)
+	    const psTelPointing *telescope //!< Telescope pointing information, for airmass, parallactic angle
+					   //!< which may help set the astrometric solution
 	    );
 
@@ -195,21 +195,21 @@
 /* Functions needed for astrometry, and will likely be useful elsewhere */
 
-/* Get the airmass for a given position and sidereal time */
+/** Get the airmass for a given position and sidereal time */
 float
-psGetAirmass(const psSkyPos *restrict position, // Position on the sky
-	     float siderealTime	// Sidereal time
+psGetAirmass(const psSkyPos *restrict position, //!< Position on the sky
+	     float siderealTime	//!< Sidereal time
 	     );
 
-/* Get the parallactic angle for a given position and sidereal time */
+/** Get the parallactic angle for a given position and sidereal time */
 float
-psGetParallactic(const psSkyPos *restrict position, // Position on the sky
-		 real siderealTime	// Sidereal time
+psGetParallactic(const psSkyPos *restrict position, //!< Position on the sky
+		 real siderealTime	//!< Sidereal time
 		 );
 
-/* Estimate atmospheric refraction, along the parallactic */
+/** Estimate atmospheric refraction, along the parallactic */
 float
-psGetRefraction(float colour,		// Colour of object
-		enum psColourRef colourRef; // Colour reference
-		psTelPointing telescope	// Telescope pointing information, for airmass, temp and pressure
+psGetRefraction(float colour,		//!< Colour of object
+		enum psColourRef colourRef; //!< Colour reference
+		psTelPointing telescope	//!< Telescope pointing information, for airmass, temp and pressure
     );
 
Index: /trunk/archive/pslib/include/psBitMask.h
===================================================================
--- /trunk/archive/pslib/include/psBitMask.h	(revision 152)
+++ /trunk/archive/pslib/include/psBitMask.h	(revision 153)
@@ -2,34 +2,33 @@
 #define PS_BIT_MASK_H
 
-/* Type for a big bitmask */
-/* Set to long int for now */
+/** Type for a big bitmask.  Set to long int for now. */
 typedef long int psBitMask;
 
 
-/* Set a bit mask */
+/** Set a bit mask */
 psBitMask *
-psSetBitMask(psBitMask *outMask,	// Output bit mask or NULL
-	     const psBitMask *myMask,	// Input bit mask
-	     int bit			// Bit to set
+psSetBitMask(psBitMask *outMask,	//!< Output bit mask or NULL
+	     const psBitMask *myMask,	//!< Input bit mask
+	     int bit			//!< Bit to set
     );
 
-/* Check a bit mask.  Returns true or false */
+/** Check a bit mask.  Returns true or false */
 int
-psCheckBitMask(const psBitMask *checkMask, // Bit mask to check
-	       int bit			// Bit to check
+psCheckBitMask(const psBitMask *checkMask, //!< Bit mask to check
+	       int bit			//!< Bit to check
     );
 
-/* OR two bit masks */
+/** OR two bit masks */
 psBitMask *
-psOrBitMasks(psBitMask *outMask,	// Output bit mask or NULL
-	     const psBitMask *restrict inMask1,	// Input bit mask 1
-	     const psBitMask *restrict inMask2 // Input bit mask 2
+psOrBitMasks(psBitMask *outMask,	//!< Output bit mask or NULL
+	     const psBitMask *restrict inMask1,	//!< Input bit mask 1
+	     const psBitMask *restrict inMask2 //!< Input bit mask 2
     );
 
-/* AND two bit masks */
+/** AND two bit masks */
 psBitMask *
-psAndBitMasks(psBitMask *outMask,	// Output bit mask or NULL
-	     const psBitMask *restrict inMask1,	// Input bit mask 1
-	     const psBitMask *restrict inMask2 // Input bit mask 2
+psAndBitMasks(psBitMask *outMask,	//!< Output bit mask or NULL
+	     const psBitMask *restrict inMask1,	//!< Input bit mask 1
+	     const psBitMask *restrict inMask2 //!< Input bit mask 2
     );
 
Index: /trunk/archive/pslib/include/psColour.h
===================================================================
--- /trunk/archive/pslib/include/psColour.h	(revision 152)
+++ /trunk/archive/pslib/include/psColour.h	(revision 153)
@@ -2,18 +2,16 @@
 #define PS_COLOUR_H
 
-/* Colour References */
 
-/*
- * Reference colours are roughly appropriate for a G5V star.  I get, with an arbitrary zero point, on the AB
- * system the following rough magnitudes: g = 1.36 mag, r = 0.84 mag, i = 0.72 mag, z = 0.69 mag, y = 0.69
- * mag, w = 0.80 mag
+/** Colour References.  Reference colours are roughly appropriate for a G5V star.  I get, with an arbitrary
+ * zero point, on the AB system the following rough magnitudes: g = 1.36 mag, r = 0.84 mag, i = 0.72 mag, z =
+ * 0.69 mag, y = 0.69 mag, w = 0.80 mag
  */
 enum {
-    PS_COLOUR_NO_INFO,			// No colour information
-    PS_COLOUR_G_MINUS_R,		// Reference is g-r = 0.5 mag
-    PS_COLOUR_R_MINUS_I,		// Reference is r-i = 0.1 mag
-    PS_COLOUR_I_MINUS_Z,		// Reference is i-z = 0.0 mag
-    PS_COLOUR_Z_MINUS_Y,		// Reference is z-y = 0.0 mag
-    PS_COLOUR_R_MINUS_W			// Reference is r-w = 0.0 mag
+    PS_COLOUR_NO_INFO,			//!< No colour information
+    PS_COLOUR_G_MINUS_R,		//!< Reference is g-r = 0.5 mag
+    PS_COLOUR_R_MINUS_I,		//!< Reference is r-i = 0.1 mag
+    PS_COLOUR_I_MINUS_Z,		//!< Reference is i-z = 0.0 mag
+    PS_COLOUR_Z_MINUS_Y,		//!< Reference is z-y = 0.0 mag
+    PS_COLOUR_R_MINUS_W			//!< Reference is r-w = 0.0 mag
 } psColourRef;
 
Index: /trunk/archive/pslib/include/psComplexArrays.h
===================================================================
--- /trunk/archive/pslib/include/psComplexArrays.h	(revision 152)
+++ /trunk/archive/pslib/include/psComplexArrays.h	(revision 153)
@@ -6,30 +6,33 @@
 /* Complex number arrays */
 
-/* Multiplication of two complex number arrays */
-/* Purposely leave these NOT restrict-ed, so that the multiplication may be done in-place */
+/** Multiplication of two complex number arrays.  Purposely leave these NOT restrict-ed, so that the
+ * multiplication may be done in-place
+ */
 psComplexArray *
-psComplexMultiply(psComplexArray *out, // Output array to be returned; may be NULL
-		  const psComplexArray *complex1, // Input complex array 1
-		  const psComplexArray *complex2 // Input complex array 2
+psComplexMultiply(psComplexArray *out, //!< Output array to be returned; may be NULL
+		  const psComplexArray *complex1, //!< Input complex array 1
+		  const psComplexArray *complex2 //!< Input complex array 2
 		  );
 
-/* Division of two complex number arrays */
-/* Purposely leave these NOT restrict-ed, so that the division may be done in-place */
+/** Division of two complex number arrays.  Purposely leave these NOT restrict-ed, so that the division
+ * may be done in-place
+ */
 psComplexArray *
-psComplexDivide(psComplexArray *out,	// Output array to be returned; may be NULL
-		const psComplexArray *complex1, // Input complex array 1
-		const psComplexArray *complex2 // Input complex array 2
+psComplexDivide(psComplexArray *out,	//!< Output array to be returned; may be NULL
+		const psComplexArray *complex1, //!< Input complex array 1
+		const psComplexArray *complex2 //!< Input complex array 2
 		);
 
-/* Complex conjugates for a complex number array */
-/* Purposely leave these NOT restrict-ed, so that the operation may be done in-place */
+/** Complex conjugates for a complex number array. Purposely leave these NOT restrict-ed, so that the
+ * operation may be done in-place
+ */
 psComplexArray *
-psComplexConjugate(psComplexArray *out,	// Output array to be returned; may be NULL
-		   const psComplexArray *myComplexNumbers // Input complex number array
+psComplexConjugate(psComplexArray *out,	//!< Output array to be returned; may be NULL
+		   const psComplexArray *myComplexNumbers //!< Input complex number array
 		   );
 
-/* Moduli for a complex number array */
+/** Moduli for a complex number array */
 psFloatArray *
-psComplexModulus(const psComplex *restrict myComplexNumbers // Input complex number array
+psComplexModulus(const psComplex *restrict myComplexNumbers //!< Input complex number array
 		 );
 
Index: /trunk/archive/pslib/include/psDateTime.h
===================================================================
--- /trunk/archive/pslib/include/psDateTime.h	(revision 152)
+++ /trunk/archive/pslib/include/psDateTime.h	(revision 153)
@@ -4,17 +4,17 @@
 /* Dates and Times */
 
-/* Get current MJD, for a timestamp */
+/** Get current MJD, for a timestamp */
 float
 psGetMJD(void);
 
-/* Convert MJD to Human-readable date/time string */
+/** Convert MJD to Human-readable date/time string */
 char *
-psMJDToTime(float mjd			// Input MJD
+psMJDToTime(float mjd			//!< Input MJD
 	    );
 
-/* Get Sidereal time */
+/** Get Sidereal time */
 float
-psGetSidereal(float mjd,		// MJD
-	      float longitude		// Longitude
+psGetSidereal(float mjd,		//!< MJD
+	      float longitude		//!< Longitude
 	      );
 
Index: /trunk/archive/pslib/include/psFFT.h
===================================================================
--- /trunk/archive/pslib/include/psFFT.h	(revision 152)
+++ /trunk/archive/pslib/include/psFFT.h	(revision 153)
@@ -6,22 +6,21 @@
 /* Fourier Transform functions */
 
-/* Return Fourier Transform of an array */
+/** Return Fourier Transform of an array */
 psComplexArray *
-psRealFFT(psComplexArray *restrict out,	// Output array to be returned; may be NULL
-	  const psFloatArray *restrict myArray // Input array
+psRealFFT(psComplexArray *restrict out,	//!< Output array to be returned; may be NULL
+	  const psFloatArray *restrict myArray //!< Input array
 	  );
 
-/* Return [inverse?] Fourier Transform of a complex array */
-/* May NOT be done in-place (restrict-ed) */
+/** Return [inverse?] Fourier Transform of a complex array.  May NOT be done in-place (restrict-ed) */
 psComplexArray *
-psComplexFFT(psComplexArray *restrict out, // Output array to be returned; may be NULL
-	     const psComplexArray *restrict myArray, // Input array
-	     int sign			// +1 or -1 to indicate direction of FT
+psComplexFFT(psComplexArray *restrict out, //!< Output array to be returned; may be NULL
+	     const psComplexArray *restrict myArray, //!< Input array
+	     int sign			//!< +1 or -1 to indicate direction of FT
 	     );
 
-/* Return Power spectrum of a array */
+/** Return Power spectrum of a array */
 psFloatArray *
-psPowerSpec(psFloatArray *restrict out,	// Output array to be returned
-	    const psFloatArray *restrict myArray // Input array
+psPowerSpec(psFloatArray *restrict out,	//!< Output array to be returned
+	    const psFloatArray *restrict myArray //!< Input array
 	    );
 
Index: /trunk/archive/pslib/include/psFilter.h
===================================================================
--- /trunk/archive/pslib/include/psFilter.h	(revision 152)
+++ /trunk/archive/pslib/include/psFilter.h	(revision 153)
@@ -2,11 +2,12 @@
 #define PS_FILTER_H
 
+/** Filters */
 enum {
-    PS_FILTER_G,			// g band
-    PS_FILTER_R,			// r band
-    PS_FILTER_I,			// i band
-    PS_FILTER_Z,			// z band
-    PS_FILTER_Y,			// y band
-    PS_FILTER_W				// w band
+    PS_FILTER_G,			//!< g band
+    PS_FILTER_R,			//!< r band
+    PS_FILTER_I,			//!< i band
+    PS_FILTER_Z,			//!< z band
+    PS_FILTER_Y,			//!< y band
+    PS_FILTER_W				//!< w band
 } psFilter;
 
Index: /trunk/archive/pslib/include/psFunctions.h
===================================================================
--- /trunk/archive/pslib/include/psFunctions.h	(revision 152)
+++ /trunk/archive/pslib/include/psFunctions.h	(revision 153)
@@ -6,25 +6,24 @@
 /* Standard Functions */
 
-/* Gaussian */
-/* Note that this is not a Gaussian deviate */
+/** Gaussian.  Note that this is not a Gaussian deviate */
 float
-psGaussian(float x,			// Value at which to evaluate
-	   float mean,			// Mean for the Gaussian
-	   float stddev			// Standard deviation for the Gaussian
+psGaussian(float x,			//!< Value at which to evaluate
+	   float mean,			//!< Mean for the Gaussian
+	   float stddev			//!< Standard deviation for the Gaussian
 	   );
 
-/* Polynomial: one dimension */
+/** Polynomial: one dimension */
 float
-psPolynomial1d(float x,			// Value at which to evaluate
-	       const psFloatArray *restrict coeffs // Coefficients for the polynomial
+psPolynomial1d(float x,			//!< Value at which to evaluate
+	       const psFloatArray *restrict coeffs //!< Coefficients for the polynomial
 	       );
 
-/* Polynomial: two dimensions */
+/** Polynomial: two dimensions */
 float
-psPolynomial2d(float x,			// Value x at which to evaluate
-	       float y,			// Value y at which to evaluate
-	       int orderx,		// Polynomial order in x
-	       int ordery,		// Polynomial order in y
-	       const psFloatArray *coeffs // Coefficients for the polynomial
+psPolynomial2d(float x,			//!< Value x at which to evaluate
+	       float y,			//!< Value y at which to evaluate
+	       int orderx,		//!< Polynomial order in x
+	       int ordery,		//!< Polynomial order in y
+	       const psFloatArray *coeffs //!< Coefficients for the polynomial
 	       );
 
Index: /trunk/archive/pslib/include/psMatrix.h
===================================================================
--- /trunk/archive/pslib/include/psMatrix.h	(revision 152)
+++ /trunk/archive/pslib/include/psMatrix.h	(revision 153)
@@ -2,19 +2,19 @@
 #define PS_MATRIX_H
 
-/* A matrix */
+/** A matrix */
 typedef struct {
-    int xSize, ySize;			// Dimensions in x and y
-    float *restrict *restrict value;	// Values in matrix
+    int xSize, ySize;			//!< Dimensions in x and y
+    float *restrict *restrict value;	//!< Values in matrix
 } psMatrix;
 
-/* Constructor */
+/** Constructor */
 psMatrix *
-psMatrixNew(int Xdimen,			// x dimension of new matrix
-	    int Ydimen			// y dimension of new matrix
+psMatrixNew(int Xdimen,			//!< x dimension of new matrix
+	    int Ydimen			//!< y dimension of new matrix
 	    );
 
-/* Destructor */
+/** Destructor */
 void
-psMatrixDel(psMatrix *restrict myMatrix	// Matrix to destroy
+psMatrixDel(psMatrix *restrict myMatrix	//!< Matrix to destroy
 	    );
 
@@ -23,23 +23,23 @@
 /* Linear Algebra */
 
-/* Invert matrix */
-/* Not using restrict, to allow inversion to be done in-place */
+/** Invert matrix.  Not using restrict, to allow inversion to be done in-place */
 psMatrix *
-psInvertMatrix(psMatrix *out,		// Matrix to return, or NULL
-	       const psMatrix *myMatrix, // Matrix to be inverted
-	       float *restrict determinant // Determinant to return, or NULL
+psInvertMatrix(psMatrix *out,		//!< Matrix to return, or NULL
+	       const psMatrix *myMatrix, //!< Matrix to be inverted
+	       float *restrict determinant //!< Determinant to return, or NULL
 	       );
 
-/* Matrix determinant */
+/** Matrix determinant */
 float
-psDeterminant(const psMatrix *restrict myMatrix // Matrix to get determinant for
+psDeterminant(const psMatrix *restrict myMatrix //!< Matrix to get determinant for
 	      );
 
-/* Matrix Multiplication */
-/* Not using restrict, to allow matrix1 == matrix2, and to do multiplication in-place */
+/** Matrix Multiplication.  Not using restrict, to allow matrix1 == matrix2, and to do multiplication
+ * in-place
+ */
 psMatrix
-psMatrixMultiply(psMatrix *out,		// Matrix to return, or NULL
-		 const psMatrix *matrix1, // Matrix 1
-		 const psMatrix *matrix2 // Matrix 2
+psMatrixMultiply(psMatrix *out,		//!< Matrix to return, or NULL
+		 const psMatrix *matrix1, //!< Matrix 1
+		 const psMatrix *matrix2 //!< Matrix 2
 		 );
 
Index: /trunk/archive/pslib/include/psMinimise.h
===================================================================
--- /trunk/archive/pslib/include/psMinimise.h	(revision 152)
+++ /trunk/archive/pslib/include/psMinimise.h	(revision 153)
@@ -7,27 +7,27 @@
 /* Minimisation */
 
-/* Minimise a particular function */
+/** Minimise a particular function */
 psFloatArray *
-psMinimise(float (*myFunction)(const psFloatArray *restrict),	// Function to minimise
-	   psFloatArray *restrict initialGuess // Initial guess
+psMinimise(float (*myFunction)(const psFloatArray *restrict),	//!< Function to minimise
+	   psFloatArray *restrict initialGuess //!< Initial guess
 	   );
 
 
-/* Minimise chi^2 for input data */
+/** Minimise chi^2 for input data */
 psFloatArray *
 psMinimiseChi2(float (*evalModel)(const psFloatArray *restrict,
-				  const psFloatArray *restrict), // Model to fit; receives domain and
-								   // parameters
-	       const psFloatArray *restrict domain, // The domain values for the corresponding measurements
-	       const psFloatArray *restrict data, // Data to fit
-	       const psFloatArray *restrict errors, // Errors in the data
-	       psFloatArray *restrict initialGuess, // Initial guess
-	       const psIntArray *restrict guessMask // 1 = fit for parameter, 0 = hold parameter constant
+				  const psFloatArray *restrict), //!< Model to fit; receives domain and
+								 //!< parameters
+	       const psFloatArray *restrict domain, //!< The domain values for the corresponding measurements
+	       const psFloatArray *restrict data, //!< Data to fit
+	       const psFloatArray *restrict errors, //!< Errors in the data
+	       psFloatArray *restrict initialGuess, //!< Initial guess
+	       const psIntArray *restrict guessMask //!< 1 = fit for parameter, 0 = hold parameter constant
 	       );
 
-/* Derive a polynomial that goes through the points --- can be done analytically */
+/** Derive a polynomial that goes through the points --- can be done analytically */
 psFloatArray *
-psGetArrayPolynomial(const psFloatArray *restrict ord, // Ordinates (or NULL to just use the indices)
-		     const psFloatArray *restrict coord // Coordinates
+psGetArrayPolynomial(const psFloatArray *restrict ord, //!< Ordinates (or NULL to just use the indices)
+		     const psFloatArray *restrict coord //!< Coordinates
     );
 
Index: /trunk/archive/pslib/include/psObjects.h
===================================================================
--- /trunk/archive/pslib/include/psObjects.h	(revision 152)
+++ /trunk/archive/pslib/include/psObjects.h	(revision 153)
@@ -20,24 +20,24 @@
 /***********************************************************************************************************/
 
-/* Object definition, to handle both objects we detect, and catalogues */
+/** Object definition, to handle both objects we detect, and catalogues */
 typedef struct {
-    psOTAPos *otaPos;			// Centre position on OTA, with associated error
-    psSkyPos *skyPos;			// Position on the sky, with associated error
-    float mag, magErr;			// Magnitude and associated error
-    float isoMag, isoMagErr;		// Isophotal magnitude and associated error
-    float fwhm, fwhmErr;		// FWHM and associated error
-    float ellipA, ellipB;		// Elliptical semi-major (A) and semi-minor (B) axes
-    float ellipAngle;			// Ellipse position angle
-    float sky, skyErr;			// Local sky level, and associated error
-    float colour, colourErr;		// Colour and associated error, if known
-    enum psColourRef colourRef;		// Colour reference
-    psBitMask *quality;			// Bit mask for quality information
+    psOTAPos *otaPos;			//!< Centre position on OTA, with associated error
+    psSkyPos *skyPos;			//!< Position on the sky, with associated error
+    float mag, magErr;			//!< Magnitude and associated error
+    float isoMag, isoMagErr;		//!< Isophotal magnitude and associated error
+    float fwhm, fwhmErr;		//!< FWHM and associated error
+    float ellipA, ellipB;		//!< Elliptical semi-major (A) and semi-minor (B) axes
+    float ellipAngle;			//!< Ellipse position angle
+    float sky, skyErr;			//!< Local sky level, and associated error
+    float colour, colourErr;		//!< Colour and associated error, if known
+    enum psColourRef colourRef;		//!< Colour reference
+    psBitMask *quality;			//!< Bit mask for quality information
 } psObject;
 
-/* Constructor */
+/** Constructor */
 psObject *
 psObjectNew(void);
 
-/* Destructor */
+/** Destructor */
 void
 psObjectDel(psObject *restrict myObject);
@@ -45,5 +45,5 @@
 /***********************************************************************************************************/
 
-/* An assembly of objects */
+/** An assembly of objects */
 PS_DECLARE_ARRAY_TYPE(psObject);
 PS_CREATE_ARRAY_TYPE(psObject);
@@ -51,63 +51,63 @@
 /***********************************************************************************************************/
 
-/* Associates objects on an image with the image */
+/** Associates objects on an image with the image */
 typedef struct {
-    const psImage *image;		// Image that produced the objects, which has metadata we need
-    psObjectArray *objects;		// The objects
+    const psImage *image;		//!< Image that produced the objects, which has metadata we need
+    psObjectArray *objects;		//!< The objects
 } psImageObjects;
 
-/* Constructor */
+/** Constructor */
 psImageObjects *
-psImageObjectsNew(const psImage *image,	// Image that produced the objects, which has metadata we need
-		  psObjectArray *objects // The objects
+psImageObjectsNew(const psImage *image,	//!< Image that produced the objects, which has metadata we need
+		  psObjectArray *objects //!< The objects
 		  );
 
-/* Destructor */
+/** Destructor */
 void
-psImageObjectsDel(psImageObjects *restrict myImageObjects // Object to destroy
+psImageObjectsDel(psImageObjects *restrict myImageObjects //!< Object to destroy
 		  );
 
 /***********************************************************************************************************/
 
-/* Objects from a catalogue */
+/** Objects from a catalogue */
 typedef struct {
-    enum psCatalogue catalogue;		// Source catalogue from which objects come
-    psObjectArray *object;		// The objects
+    enum psCatalogue catalogue;		//!< Source catalogue from which objects come
+    psObjectArray *object;		//!< The objects
 } psCatalogueObjects;
 
-/* Constructor */
+/** Constructor */
 psCatalogueObjects *
-psCatalogueObjectsNew(enum psCatalogue *catalogue, // Source catalogue
-		      psObjectArray *objects // The objects
+psCatalogueObjectsNew(enum psCatalogue *catalogue, //!< Source catalogue
+		      psObjectArray *objects //!< The objects
 		      );
 
-/* Destructor */
+/** Destructor */
 void
-psCatalogueObjectsDel(psCatalogeObjects *restrict myCatalogueObjects // Object to destroy
+psCatalogueObjectsDel(psCatalogeObjects *restrict myCatalogueObjects //!< Object to destroy
 		      );
 
 /***********************************************************************************************************/
 
-/* A "super" object --- an object with multiple detections in different images */
+/** A "super" object --- an object with multiple detections in different images */
 typedef struct {
-    const psImageArray *images;		// Images that provided the different measurements
-    const psObjectArray *objects;	// Individual object measurements
+    const psImageArray *images;		//!< Images that provided the different measurements
+    const psObjectArray *objects;	//!< Individual object measurements
 
     /* Derived quantities */
-    psSkyPos *meanSkyPos;		// Mean position on the sky
-    double pmRA, pmDec;			// Proper motion in RA and Dec
-    double pmRAErr, pmDecErr;		// Errors in proper motion
-    float posChi2;			// chi^2 for position
+    psSkyPos *meanSkyPos;		//!< Mean position on the sky
+    double pmRA, pmDec;			//!< Proper motion in RA and Dec
+    double pmRAErr, pmDecErr;		//!< Errors in proper motion
+    float posChi2;			//!< chi^2 for position
 } psSuperObject;
 
-/* Constructor */
+/** Constructor */
 psSuperObject *
-psSuperObjectNew(const psImageArray *images, // The images with the measurements
-		 const psObjectArray *objects // Object measurements
+psSuperObjectNew(const psImageArray *images, //!< The images with the measurements
+		 const psObjectArray *objects //!< Object measurements
 		 );
 
-/* Destructor */
+/** Destructor */
 void
-psSuperObjectDel(psSuperObject *restrict mySuperObject // Object to destroy
+psSuperObjectDel(psSuperObject *restrict mySuperObject //!< Object to destroy
 		 );
 
@@ -118,27 +118,27 @@
 
 
-/* Correlate two OTA object arrays */
-/*
+/** Correlate two OTA object arrays.
  * Returns an array with the indices of the object in the second bunch that matched the corresponding object
  * in the first bunch, or -1 if none that match.
  */
 psIntArray *
-psCorrelateObjects(const psObjectArray *restrict myObjects1, // First bunch of objects
-		   const psObjectArray *restrict myObjects2, // Second bunch of objects
-		   const psOTADescription *myOTA1, // OTA description for first bunch of objects, or NULL for
-						   // sky
-		   const psOTADescription *myOTA2 // OTA description for second bunch of objects, or NULL for
-						  // sky
+psCorrelateObjects(const psObjectArray *restrict myObjects1, //!< First bunch of objects
+		   const psObjectArray *restrict myObjects2, //!< Second bunch of objects
+		   const psOTADescription *myOTA1, //!< OTA description for first bunch of objects, or NULL for
+						   //!< sky
+		   const psOTADescription *myOTA2 //!< OTA description for second bunch of objects, or NULL for
+						  //!< sky
 		   );
 
 
-/* Get matched lists from a correlated index array */
-/* Returns a status number, and matched1 and matched2 are manipulated to contain matches */
+/** Get matched lists from a correlated index array Returns a status number, and matched1 and matched2
+ * are manipulated to contain matches
+ */
 int
-psGetCorrelatedMatches(const psIntArray matches, // Index array specifying matches */
-		       const psObjectArray *restrict myObjects1, // First bunch of objects
-		       const psObjectArray *restrict myObjects2, // Second bunch of objects
-		       psObjectArray *matched1, // Matched objects in first bunch
-		       psObjectArray *matched2 // Matched objects in second bunch
+psGetCorrelatedMatches(const psIntArray matches, //!< Index array specifying matches */
+		       const psObjectArray *restrict myObjects1, //!< First bunch of objects
+		       const psObjectArray *restrict myObjects2, //!< Second bunch of objects
+		       psObjectArray *matched1, //!< Matched objects in first bunch
+		       psObjectArray *matched2 //!< Matched objects in second bunch
 		       );
 
@@ -147,25 +147,25 @@
 /* Object selection */
 
-/* Get objects within a particular magnitude range */
+/** Get objects within a particular magnitude range */
 psObjectArray *
-psSelectObjectMag(psObjectArray *restrict myArray, // Bunch of objects to select from
-		  float magLower,	// Lower bound for magnitude
-		  float magUpper	// Upper bound for magnitude
+psSelectObjectMag(psObjectArray *restrict myArray, //!< Bunch of objects to select from
+		  float magLower,	//!< Lower bound for magnitude
+		  float magUpper	//!< Upper bound for magnitude
 		  );
 
-/* Get objects within a radius on the sky */
+/** Get objects within a radius on the sky */
 psObjectArray *
-psSelectObjectSkyDist(psObjectArray *restrict myArray, // Bunch of objects to select from
-		      psSkyPos *skyPos,	// Position on the sky
-		      float radius,	// Radius of search
-		      int circleOrSquare // Circle = 1, Square = 2
+psSelectObjectSkyDist(psObjectArray *restrict myArray, //!< Bunch of objects to select from
+		      psSkyPos *skyPos,	//!< Position on the sky
+		      float radius,	//!< Radius of search
+		      int circleOrSquare //!< Circle = 1, Square = 2
 		      );
 
-/* Get objects within a particular colour range */
+/** Get objects within a particular colour range */
 psObjectArray *
-psSelectObjectColour(psObjectArray *restrict myArray, // Bunch of objects to select from
-		     float magLower,	// Lower bound for colour
-		     float magUpper,	// Upper bound for colour
-		     enum psColourRef colourRef	// Only select those with this colour reference
+psSelectObjectColour(psObjectArray *restrict myArray, //!< Bunch of objects to select from
+		     float magLower,	//!< Lower bound for colour
+		     float magUpper,	//!< Upper bound for colour
+		     enum psColourRef colourRef	//!< Only select those with this colour reference
 		     );
 
Index: /trunk/archive/pslib/include/psPosition.h
===================================================================
--- /trunk/archive/pslib/include/psPosition.h	(revision 152)
+++ /trunk/archive/pslib/include/psPosition.h	(revision 153)
@@ -7,13 +7,13 @@
 /***********************************************************************************************************/
 
-/* Magic values for errors */
+/** Magic values for errors */
 enum {
-    PS_NO_VALUE = -111.0,		// Corresponding value not yet measured
-    PS_NO_ERROR = -222.0		// Corresponding value has no error
+    PS_NO_VALUE = -111.0,		//!< Corresponding value not yet measured
+    PS_NO_ERROR = -222.0		//!< Corresponding value has no error
 };
 
 /***********************************************************************************************************/
 
-/* Planets */
+/** Planets */
 enum {
     PS_MERCURY = 1,
@@ -27,36 +27,36 @@
 } psPlanetNum;
 
-/* Catalogues */
+/** Catalogues */
 enum {
-    PS_PANSTARRS,			// Pan-STARRS object catalogue
-    PS_USNO,				// USNO-B1 catalogue
-    PS_2MASS,				// 2MASS catalogue
-    PS_TYCHO,				// Tycho catalogue
-    UCAC2 = 4				// UCAC2 catalogue
+    PS_PANSTARRS,			//!< Pan-STARRS object catalogue
+    PS_USNO,				//!< USNO-B1 catalogue
+    PS_2MASS,				//!< 2MASS catalogue
+    PS_TYCHO,				//!< Tycho catalogue
+    PS_UCAC2 = 4			//!< UCAC2 catalogue
 } psCatalogue;
 
 /***********************************************************************************************************/
 
-/* A position on a detector */
+/** A position on a detector */
 typedef struct {
-    int chip;				// Chip number
-    float x;				// x position
-    float xErr;				// Error in x position
-    float y;				// y position
-    float yErr;				// Error in y position
+    int chip;				//!< Chip number
+    float x;				//!< x position
+    float xErr;				//!< Error in x position
+    float y;				//!< y position
+    float yErr;				//!< Error in y position
 } psOTAPos;
 
-/* Constructor */
+/** Constructor */
 psOTAPos *
 psOTAPosNew(void);
 
-/* Destructor */
+/** Destructor */
 void
-psOTAPosDel(psOTAPos *restrict myOTAPos	// Object to destroy
+psOTAPosDel(psOTAPos *restrict myOTAPos	//!< Object to destroy
     );
 
 /***********************************************************************************************************/
 
-/* An array of detector positions */
+/** An array of detector positions */
 PS_DECLARE_ARRAY_TYPE(psOTAPos);
 PS_CREATE_ARRAY_TYPE(psOTAPos);
@@ -64,25 +64,27 @@
 /***********************************************************************************************************/
 
-/* A simple RA/Dec position on the sky, default system is ICRS. */
-/* Double precision needed for milli-arcsec */
+/*
+ * \brief A simple RA/Dec position on the sky, default system is ICRS.  Double precision needed for
+ * milli-arcsec.
+ */
 typedef struct {
-    double ra;				// Right Ascension
-    double raErr;			// Error in RA
-    double dec;				// Declination
-    double decErr;			// Error in Dec
+    double ra;				//!< Right Ascension
+    double raErr;			//!< Error in RA
+    double dec;				//!< Declination
+    double decErr;			//!< Error in Dec
 } psSkyPos;
 
-/* Constructor */
+/** Constructor */
 psSkyPos *
 psSkyPosNew(void);
 
-/* Destructor */
+/** Destructor */
 void
-psSkyPosDel(psSkyPos *restrict mySkyPos	// Object to destroy
+psSkyPosDel(psSkyPos *restrict mySkyPos	//!< Object to destroy
     );
 
 /***********************************************************************************************************/
 
-/* An array of sky positions */
+/** An array of sky positions */
 PS_DECLARE_ARRAY_TYPE(psSkyPos);
 PS_CREATE_ARRAY_TYPE(psSkyPos);
@@ -90,20 +92,19 @@
 /***********************************************************************************************************/
 
-/* Latitude and Longitude. */
-/* Double precision needed for milli-arcsec */
+/** Latitude and Longitude.  Double precision needed for milli-arcsec */
 typedef struct {
-    double lat;				// Latitude
-    double latErr;			// Error in Latitude
-    double lng;			        // Longitude (can't use "long")
-    double lngErr;			// Error in Longitude
+    double lat;				//!< Latitude
+    double latErr;			//!< Error in Latitude
+    double lng;			        //!< Longitude (can't use "long")
+    double lngErr;			//!< Error in Longitude
 } psLatLong;
 
-/* Constructor */
+/** Constructor */
 psLatLong *
 psLatLongNew(void);
 
-/* Destructor */
+/** Destructor */
 void
-psLatLongDel(psLatLong *restrict myLatLong // Object to destroy
+psLatLongDel(psLatLong *restrict myLatLong //!< Object to destroy
     );
 
@@ -112,15 +113,14 @@
 /* Offsets */
 
-/* Get offset (RA,Dec) on the sky between two positions */
-/* position1 and position2 may not be identical */
+/** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
 psSkyPos *
-psGetOffset(const psSkyPos *restrict position1, // Position 1
-	    const psSkyPos *restrict position2 // Position 2
+psGetOffset(const psSkyPos *restrict position1, //!< Position 1
+	    const psSkyPos *restrict position2 //!< Position 2
 	    );
 
-/* Apply an offset to a position */
+/** Apply an offset to a position */
 psSkyPos *
-psApplyOffset(const psSkyPos *restrict position, // Position
-	      const psSkyPos *restrict offset // Offset
+psApplyOffset(const psSkyPos *restrict position, //!< Position
+	      const psSkyPos *restrict offset //!< Offset
 	      );
 
@@ -129,34 +129,34 @@
 /* Positions of well-known objects */
 
-/* Get Sun Position */
+/** Get Sun Position */
 psSkyPos *
-psGetSunPos(float mjd			// MJD to get position for
+psGetSunPos(float mjd			//!< MJD to get position for
 	    );
 
-/* Get Moon position */
+/** Get Moon position */
 psSkyPos *
-psGetMoonPos(float mjd,			// MJD to get position for
-	     double latitude,		// Latitude for apparent position
-	     double longitude		// Longitude for apparent position
+psGetMoonPos(float mjd,			//!< MJD to get position for
+	     double latitude,		//!< Latitude for apparent position
+	     double longitude		//!< Longitude for apparent position
 	     );
 
-/* Get Moon phase */
+/** Get Moon phase */
 float
-psGetMoonPhase(float mjd		// MJD to get phase for
+psGetMoonPhase(float mjd		//!< MJD to get phase for
 	       );
 
-/* Get Planet positions */
+/** Get Planet positions */
 psSkyPos *
-psGetPlanetPos(enum psPlanetNum myPlanetNum, // Number for planet
-	       float mjd		// MJD to get position for
+psGetPlanetPos(enum psPlanetNum myPlanetNum, //!< Number for planet
+	       float mjd		//!< MJD to get position for
 	       );
 
-/* Get star list from catalogue */
+/** Get star list from catalogue */
 psObjectArray *
-psReadStarCatalogue(double ra,		// RA of centre of search
-		    double dec,		// Declination of centre of search
-		    float radius,	// Radius of search for stars in catalogue
-		    float mjd,		// The epoch (in MJD) for which to get positions
-		    enum psCatalogue myCatalogue // The catalogue to use
+psReadStarCatalogue(double ra,		//!< RA of centre of search
+		    double dec,		//!< Declination of centre of search
+		    float radius,	//!< Radius of search for stars in catalogue
+		    float mjd,		//!< The epoch (in MJD) for which to get positions
+		    enum psCatalogue myCatalogue //!< The catalogue to use
     );
 
@@ -165,22 +165,22 @@
 /* Celestial coordinate conversions */
 
-/* Convert ICRS to Ecliptic */
+/** Convert ICRS to Ecliptic */
 psLatLong *
-psCoordinatesItoE(const psSkyPos *restrict coordinates // ICRS coordinates to convert
+psCoordinatesItoE(const psSkyPos *restrict coordinates //!< ICRS coordinates to convert
 		  );
 
-/* Convert Ecliptic to ICRS */
+/** Convert Ecliptic to ICRS */
 psSkyPos *
-psCoordinatesEtoI(const psLatLong *restrict coordinates // Ecliptic coordinates to convert
+psCoordinatesEtoI(const psLatLong *restrict coordinates //!< Ecliptic coordinates to convert
 		  );
 
-/* Convert ICRS to Galactic */
+/** Convert ICRS to Galactic */
 psLatLong *
-psCoordinatesItoG(const psSkyPos *restrict coordinates // ICRS coordinates to convert
+psCoordinatesItoG(const psSkyPos *restrict coordinates //!< ICRS coordinates to convert
 		  );
 
-/* Convert Galactic to ICRS */
+/** Convert Galactic to ICRS */
 psSkyPos *
-psCoordinatesGtoI(const psLatLong *restrict coordinates // Galactic coordinates to convert
+psCoordinatesGtoI(const psLatLong *restrict coordinates //!< Galactic coordinates to convert
 		  );
 
Index: /trunk/archive/pslib/include/psSort.h
===================================================================
--- /trunk/archive/pslib/include/psSort.h	(revision 152)
+++ /trunk/archive/pslib/include/psSort.h	(revision 153)
@@ -6,16 +6,14 @@
 /* Sorting */
 
-/* Sort an array */
-/* Inputs not restrict-ed to allow sort in place */
+/** Sort an array. Inputs not restrict-ed to allow sort in place */
 psFloatArray *
-psSort(psFloatArray *out,		// Sorted array to return. May be NULL
-       const psFloatArray *myArray	// Array to sort
+psSort(psFloatArray *out,		//!< Sorted array to return. May be NULL
+       const psFloatArray *myArray	//!< Array to sort
        );
 
-/* Sort an array, along with some other stuff */
-/* Returns an index array */
+/** Sort an array, along with some other stuff.  Returns an index array */
 psIntArray *
-psCoSort(psIntArray *restrict out;	// Output index array (may be NULL)
-	 const psFloatArray *restrict myArray // Array to sort
+psCoSort(psIntArray *restrict out;	//!< Output index array (may be NULL)
+	 const psFloatArray *restrict myArray //!< Array to sort
 	 );
 
Index: /trunk/archive/pslib/include/psStats.h
===================================================================
--- /trunk/archive/pslib/include/psStats.h	(revision 152)
+++ /trunk/archive/pslib/include/psStats.h	(revision 153)
@@ -5,53 +5,53 @@
 #include "psStdArrays.h"
 
-/* Do Statistics on an array.  Returns a status value. */
+/** Do Statistics on an array.  Returns a status value. */
 int
-psArrayStats(const psFloatArray *restrict myArray, // Array to be analysed
-	     const psIntArray *restrict maskArray, // Ignore elements where (maskArray & maskVal) != 0
-						   // May be NULL
-	     unsigned int maskVal,	// Only mask elements with one of these bits set in maskArray
-	     int numIter,	        // Number of clipping iterations (0 not to clip)
-	     float numSD,		// Number of s.d. to clip at
-	     float *restrict mean,	// Mean of array (or NULL)
-	     float *restrict sd,	// Standard deviation (or NULL)
-	     float *restrict med	// Median (or NULL)
+psArrayStats(const psFloatArray *restrict myArray, //!< Array to be analysed
+	     const psIntArray *restrict maskArray, //!< Ignore elements where (maskArray & maskVal) != 0
+						   //!< May be NULL
+	     unsigned int maskVal,	//!< Only mask elements with one of these bits set in maskArray
+	     int numIter,	        //!< Number of clipping iterations (0 not to clip)
+	     float numSD,		//!< Number of s.d. to clip at
+	     float *restrict mean,	//!< Mean of array (or NULL)
+	     float *restrict sd,	//!< Standard deviation (or NULL)
+	     float *restrict med	//!< Median (or NULL)
 	     );
 
 /***********************************************************************************************************/
 
-/* Histograms */
+/** Histograms */
 typedef struct {
-    const psFloatArray *restrict lower, *restrict upper; // Lower and upper bounds for the bins
-    psIntArray *nums;			// Number in each of the bins
-    const float minVal, maxVal;		// Minimum and maximum values
-    int minNum, maxNum;			// Number below the minimum and above the maximum
+    const psFloatArray *restrict lower, *restrict upper; //!< Lower and upper bounds for the bins
+    psIntArray *nums;			//!< Number in each of the bins
+    const float minVal, maxVal;		//!< Minimum and maximum values
+    int minNum, maxNum;			//!< Number below the minimum and above the maximum
 } psHistogram;
 
 
-/* Constructor */
+/** Constructor */
 psHistogram *
-psHistogramNew(float lower,		// Lower limit for the bins
-	       float upper,		// Upper limit for the bins
-	       float size		// Size of the bins
+psHistogramNew(float lower,		//!< Lower limit for the bins
+	       float upper,		//!< Upper limit for the bins
+	       float size		//!< Size of the bins
     );
 
-/* Generic constructor */
+/** Generic constructor */
 psHistogram *
-psHistogramNewGeneric(const psFloatArray *restrict lower, // Lower bounds for the bins
-		      const psFloatArray *restrict upper, // Upper bounds for the bins
-		      float minVal,	// Minimum value
-		      float maxVal	// Maximum value
+psHistogramNewGeneric(const psFloatArray *restrict lower, //!< Lower bounds for the bins
+		      const psFloatArray *restrict upper, //!< Upper bounds for the bins
+		      float minVal,	//!< Minimum value
+		      float maxVal	//!< Maximum value
     );
 
-/* Destructor */
+/** Destructor */
 void
-psHistogramDel(psHistogram *restrict myHist // Histogram to destroy
+psHistogramDel(psHistogram *restrict myHist //!< Histogram to destroy
     );
 
 
-/* Calculate a histogram */
+/** Calculate a histogram */
 psHistogram *
-psGetArrayHistogram(psHistogram *restrict myHist, // Histogram data
-		    const psFloatArray *restrict myArray // Array to analyse
+psGetArrayHistogram(psHistogram *restrict myHist, //!< Histogram data
+		    const psFloatArray *restrict myArray //!< Array to analyse
     );
 
Index: /trunk/archive/pslib/include/psStdArrays.h
===================================================================
--- /trunk/archive/pslib/include/psStdArrays.h	(revision 152)
+++ /trunk/archive/pslib/include/psStdArrays.h	(revision 153)
@@ -4,6 +4,8 @@
 #include "psArray.h"
 
-/* ps- typedefs so that array names comply with the standard naming convention */
-/* These should not be used generally. */
+/**
+ * ps- typedefs so that array names comply with the standard naming convention. These should NOT be used
+ * generally.
+ */
 typedef float psFloat;
 typedef int psInt;
@@ -11,17 +13,17 @@
 typedef double psDouble;
 
-/* An array of real numbers */
+/** An array of real numbers */
 PS_DECLARE_ARRAY_TYPE(psFloat);
 PS_CREATE_ARRAY_TYPE(psFloat);
 
-/* An array of complex numbers */
+/** An array of complex numbers */
 PS_DECLARE_ARRAY_TYPE(psComplex);
 PS_CREATE_ARRAY_TYPE(psComplex);
 
-/* An array of integers */
+/** An array of integers */
 PS_DECLARE_ARRAY_TYPE(psInt);
 PS_CREATE_ARRAY_TYPE(psInt);
 
-/* An array of double-precision real numbers */
+/** An array of double-precision real numbers */
 PS_DECLARE_ARRAY_TYPE(psDouble);
 PS_CREATE_ARRAY_TYPE(psDouble);
