Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 299)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 300)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.10 2004-03-24 03:41:57 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.11 2004-03-24 03:42:51 price Exp $
 \documentclass[panstarrs]{panstarrs}
 %\documentclass[panstarrs]{panstarrs}
@@ -140,10 +140,10 @@
 \begin{verbatim}
 typedef struct {
-    const void *magic0;			//!< initialised to p_psMEMMAGIC
-    const unsigned long id;		//!< a unique ID for this allocation
-    const char *file;			//!< set from __FILE__ in e.g. p_psAlloc
-    const int lineno;			//!< set from __LINE__ in e.g. p_psAlloc
-    int refCounter;			//!< how many times pointer is referenced
-    const void *magic;			//!< initialised to p_psMEMMAGIC
+    const void *magic0;                 //!< initialised to p_psMEMMAGIC
+    const unsigned long id;             //!< a unique ID for this allocation
+    const char *file;                   //!< set from __FILE__ in e.g. p_psAlloc
+    const int lineno;                   //!< set from __LINE__ in e.g. p_psAlloc
+    int refCounter;                     //!< how many times pointer is referenced
+    const void *magic;                  //!< initialised to p_psMEMMAGIC
 } psMemBlock;
 \end{verbatim}
@@ -160,21 +160,21 @@
 \begin{verbatim}
 /// Memory allocation. Underlying private function called by macro psAlloc. 
-void *p_psAlloc(size_t size,		//!< Size required
-		const char *file,	//!< File of call
-		int lineno		//!< Line number of call
-		);
+void *p_psAlloc(size_t size,            //!< Size required
+                const char *file,       //!< File of call
+                int lineno              //!< Line number of call
+                );
 
 /// Memory re-allocation.  Underlying private function called by macro psRealloc. 
-void *p_psRealloc(void *ptr,		//!< Pointer to re-allocate
-		  size_t size,		//!< Size required
-		  const char *file,	//!< File of call
-		  int lineno		//!< Line number of call
-		  );
+void *p_psRealloc(void *ptr,            //!< Pointer to re-allocate
+                  size_t size,          //!< Size required
+                  const char *file,     //!< File of call
+                  int lineno            //!< Line number of call
+                  );
 
 /// Free memory.  Underlying private function called by macro psFree. 
-void p_psFree(void *ptr,		//!< Pointer to free
-	      const char *file,		//!< File of call
-	      int lineno		//!< Line number of call
-	      );
+void p_psFree(void *ptr,                //!< Pointer to free
+              const char *file,         //!< File of call
+              int lineno                //!< Line number of call
+              );
 
 /// Memory allocation. psAlloc sends file and line number to p_psAlloc. 
@@ -263,17 +263,17 @@
 /// Set callback for problems 
 psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func //!< Function to run
-				       );
+                                       );
 
 /// Set callback for out-of-memory 
 psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func //!< Function to run
-					   );
+                                           );
 
 /// Set call back for when a particular memory block is allocated 
 psMemCallback psMemAllocateSetCB(psMemCallback func //!< Function to run
-				 );
+                                 );
 
 /// Set call back for when a particular memory block is freed 
 psMemCallback psMemFreeSetCB(psMemCallback func
-			     );
+                             );
 
 /// get next memory ID 
@@ -281,19 +281,19 @@
 
 /// set p_psMemAllocateID to id 
-long psMemSetAllocateID(long id		//!< ID to set
-			);
+long psMemSetAllocateID(long id         //!< ID to set
+                        );
 
 /// set p_psMemFreeID to id 
-long psMemSetFreeID(long id		//!< ID to set
-		    );
+long psMemSetFreeID(long id             //!< ID to set
+                    );
 
 /// Check for memory leaks 
-int psMemCheckLeaks(int id0,		//!< don't list blocks with id < id0
-		    psMemBlock ***arr,	//!< pointer to array of pointers to leaked blocks, or NULL
-		    FILE *fd		//!< print list of leaks to fd (or NULL)
-		    );
+int psMemCheckLeaks(int id0,            //!< don't list blocks with id < id0
+                    psMemBlock ***arr,  //!< pointer to array of pointers to leaked blocks, or NULL
+                    FILE *fd            //!< print list of leaks to fd (or NULL)
+                    );
 /// Check for memory corruption 
 int psMemCheckCorruption(int abort_on_error //!< Abort on detecting corruption?
-			 );
+                         );
 \end{verbatim}
 
@@ -400,14 +400,14 @@
 \begin{verbatim}
 /// Return reference counter 
-int psMemGetRefCounter(void *vptr	//!< Pointer to get refCounter for
-		       );
+int psMemGetRefCounter(void *vptr       //!< Pointer to get refCounter for
+                       );
 
 /// Increment reference counter and return the pointer 
-void *psMemIncrRefCounter(void *vptr	//!< Pointer to increment refCounter, and return
-			  );
+void *psMemIncrRefCounter(void *vptr    //!< Pointer to increment refCounter, and return
+                          );
 
 /// Decrement reference counter and return the pointer 
-void *psMemDecrRefCounter(void *vptr	//!< Pointer to decrement refCounter, and return
-			  );
+void *psMemDecrRefCounter(void *vptr    //!< Pointer to decrement refCounter, and return
+                          );
 \end{verbatim}
 
@@ -487,16 +487,16 @@
 
 /// Send a trace message
-void p_psTrace(const char *facil, 	///< facilty of interest
-	       int level,		///< desired trace level
-	       ...			///< trace message arguments 
+void p_psTrace(const char *facil,       ///< facilty of interest
+               int level,               ///< desired trace level
+               ...                      ///< trace message arguments 
     );
 
 /// Set trace level 
-int psSetTraceLevel(const char *facil,	///< facilty of interest
-		    int level		///< desired trace level
+int psSetTraceLevel(const char *facil,  ///< facilty of interest
+                    int level           ///< desired trace level
     );
 
 /// Get the trace level 
-int psGetTraceLevel(const char *name	///< facilty of interest
+int psGetTraceLevel(const char *name    ///< facilty of interest
     );
 
@@ -652,11 +652,11 @@
 
 /// Sets the log destination 
-int psSetLogDestination(int dest);	
+int psSetLogDestination(int dest);      
 
 /// Sets the log level
-int psSetLogLevel(int level);		
+int psSetLogLevel(int level);           
 
 /// sets the log format
-void psSetLogFormat(const char *fmt);	
+void psSetLogFormat(const char *fmt);   
 \end{verbatim}
 
@@ -728,24 +728,24 @@
 /** Doubly-linked list element */
 typedef struct psDlistElem {
-   struct psDlistElem *prev;		//!< previous link in list
-   struct psDlistElem *next;		//!< next link in list
-   void *data;				//!< real data item
+   struct psDlistElem *prev;            //!< previous link in list
+   struct psDlistElem *next;            //!< next link in list
+   void *data;                          //!< real data item
 } psDlistElem;
 
 /** Doubly-linked list */
 typedef struct {
-   int n;				//!< number of elements on list
-   psDlistElem *head;			//!< first element on list (may be NULL)
-   psDlistElem *tail;			//!< last element on list (may be NULL)
-   psDlistElem *iter;			//!< iteration cursor
+   int n;                               //!< number of elements on list
+   psDlistElem *head;                   //!< first element on list (may be NULL)
+   psDlistElem *tail;                   //!< last element on list (may be NULL)
+   psDlistElem *iter;                   //!< iteration cursor
 } psDlist;
 
 /** Special values of index into list */
 enum {
-   PS_DLIST_HEAD = 0,			//!< at head
-   PS_DLIST_TAIL = -1,			//!< at tail
-   PS_DLIST_UNKNOWN = -2,		//!< unknown position
-   PS_DLIST_PREV = -3,			//!< previous element
-   PS_DLIST_NEXT = -4			//!< next element
+   PS_DLIST_HEAD = 0,                   //!< at head
+   PS_DLIST_TAIL = -1,                  //!< at tail
+   PS_DLIST_UNKNOWN = -2,               //!< unknown position
+   PS_DLIST_PREV = -3,                  //!< previous element
+   PS_DLIST_NEXT = -4                   //!< next element
 };
 \end{verbatim}
@@ -755,43 +755,43 @@
 \begin{verbatim}
 /** Constructor */
-psDlist *psDlistAlloc(void *data	//!< initial data item; may be NULL
-		      );
+psDlist *psDlistAlloc(void *data        //!< initial data item; may be NULL
+                      );
 
 /** Destructor */
-void psDlistFree(psDlist *list,		//!< list to destroy
-		void (*elemFree)(void *) //!< destructor for data on list
-		 );
+void psDlistFree(psDlist *list,         //!< list to destroy
+                void (*elemFree)(void *) //!< destructor for data on list
+                 );
 
 /**** List maintainence functions ****/
 
 /** Add to list */
-psDlist *psDlistAdd(psDlist *list,	//!< list to add to (may be NULL)
-		    void *data,		//!< data item to add
-		    int where		//!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
-		    );
+psDlist *psDlistAdd(psDlist *list,      //!< list to add to (may be NULL)
+                    void *data,         //!< data item to add
+                    int where           //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
+                    );
 
 /** Append to a list */
-psDlist *psDlistAppend(psDlist *list,	//!< list to append to (may be NULL)
-		       void *data	//!< data item to add
-		       );
+psDlist *psDlistAppend(psDlist *list,   //!< list to append to (may be NULL)
+                       void *data       //!< data item to add
+                       );
 
 /** Remove from a list */
-void *psDlistRemove(psDlist *list,	//!< list to remove element from
-		    void *data,		//!< data item to remove
-		    int which		//!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
-					//!< PS_DLIST_PREV
-		    );
+void *psDlistRemove(psDlist *list,      //!< list to remove element from
+                    void *data,         //!< data item to remove
+                    int which           //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
+                                        //!< PS_DLIST_PREV
+                    );
 /** Retrieve from a list */
-void *psDlistGet(const psDlist *list,	//!< list to retrieve element from
-		 int which		//!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
-		 );
+void *psDlistGet(const psDlist *list,   //!< list to retrieve element from
+                 int which              //!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
+                 );
 
 /** Convert doubly-linked list to an array */
 psVoidPtrArray *psDlistToArray(psDlist *dlist //!< List to convert
-			       );
+                               );
 
 /** Convert array to a doubly-linked list */
 psDlist *psArrayToDlist(psVoidPtrArray *arr //!< Array to convert
-			);
+                        );
 \end{verbatim}
 
@@ -810,21 +810,21 @@
 \begin{verbatim}
 /** Set the iterator */
-void psDlistSetIterator(psDlist *list,	//!< list to retrieve element from
-			int where,	//!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
-			int which	//!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
-					//!< PS_DLIST_PREV
-			);
+void psDlistSetIterator(psDlist *list,  //!< list to retrieve element from
+                        int where,      //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
+                        int which       //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
+                                        //!< PS_DLIST_PREV
+                        );
 
 /** Get next element */
-void *psDlistGetNext(psDlist *list,	//!< list to retrieve element from
-		     int which		//!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
-					//!< PS_DLIST_PREV
-		     );
+void *psDlistGetNext(psDlist *list,     //!< list to retrieve element from
+                     int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
+                                        //!< PS_DLIST_PREV
+                     );
 
 /** Get previous element */
-void *psDlistGetPrev(psDlist *list,	//!< list to retrieve element from
-		     int which		//!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
-					//!< PS_DLIST_PREV
-		     );
+void *psDlistGetPrev(psDlist *list,     //!< list to retrieve element from
+                     int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
+                                        //!< PS_DLIST_PREV
+                     );
 \end{verbatim}
 in which the \code{where} argument must be \code{PS_DLIST_HEAD} or \code{PS_DLIST_TAIL},
@@ -1018,30 +1018,30 @@
 
 \begin{verbatim}
-typedef struct HashTable psHash;	///< Opaque type for a hash table
+typedef struct HashTable psHash;        ///< Opaque type for a hash table
 
 /// Allocate hash buckets in table.
-psHash *psHashAlloc(int nbucket		///< initial number of buckets
+psHash *psHashAlloc(int nbucket         ///< initial number of buckets
     );
 
 /// Free hash buckets from table.
-void psHashFree(psHash *table,		///< hash table to be freed
-		void (*itemFree)(void *item) ///< how to free hashed data; or NULL
+void psHashFree(psHash *table,          ///< hash table to be freed
+                void (*itemFree)(void *item) ///< how to free hashed data; or NULL
     );
 
 /// Insert entry into table.
-void *psHashInsert(psHash *table,	///< table to insert in
-		   const char *key,	///< key to use
-		   void *data,		///< data to insert
-		   void (*itemFree)(void *item) ///< how to free hashed data; or NULL
+void *psHashInsert(psHash *table,       ///< table to insert in
+                   const char *key,     ///< key to use
+                   void *data,          ///< data to insert
+                   void (*itemFree)(void *item) ///< how to free hashed data; or NULL
     );
 
 /// Lookup key in table.
-void *psHashLookup(psHash *table,	///< table to lookup key in
-		   const char *key	///< key to lookup
+void *psHashLookup(psHash *table,       ///< table to lookup key in
+                   const char *key      ///< key to lookup
     );
 
 /// Remove key from table.
-void *psHashRemove(psHash *table,	///< table to lookup key in
-		   const char *key	///< key to lookup
+void *psHashRemove(psHash *table,       ///< table to lookup key in
+                   const char *key      ///< key to lookup
     );
 \end{verbatim}
@@ -1075,22 +1075,22 @@
     
 /// Prints an error message and aborts
-void psAbort(const char *name,		///< Category of code that caused the abort
-	     const char *fmt,		///< Format
-	     ...			///< Extra arguments to use format
-	     );
+void psAbort(const char *name,          ///< Category of code that caused the abort
+             const char *fmt,           ///< Format
+             ...                        ///< Extra arguments to use format
+             );
 
 /// Prints an error message and doesn't abort
-void psError(const char *name,		///< Category of code that caused the abort
-	     const char *fmt,		///< Format
-	     ...			///< Extra arguments to use format
+void psError(const char *name,          ///< Category of code that caused the abort
+             const char *fmt,           ///< Format
+             ...                        ///< Extra arguments to use format
     );
 
 /// Allocates and returns a copy of a string
-char *psStringCopy(const char *str	///< string to copy
+char *psStringCopy(const char *str      ///< string to copy
     );
 
 /// Allocates nChar and returns a copy of the string or segment
-char *psStringNCopy(const char *str,	///< string to copy
-		    int nChar		//!< Number of characters (including \0 )
+char *psStringNCopy(const char *str,    ///< string to copy
+                    int nChar           //!< Number of characters (including \0 )
     );
 \end{verbatim}
@@ -1247,10 +1247,10 @@
 /** private structure used to pass constant values into the math operators. */
 typedef struct {
-    psType type;			///< data type information
-    union {			       
-	int i;				///< integer value entry
-	float f;			///< float value entry
-	double d;			///< double value entry
-	complex float c;		///< complex value entry
+    psType type;                        ///< data type information
+    union {                            
+        int i;                          ///< integer value entry
+        float f;                        ///< float value entry
+        double d;                       ///< double value entry
+        complex float c;                ///< complex value entry
     } val;
 } p_psScalar;
@@ -1708,22 +1708,22 @@
 /// basic image data structure.
 typedef struct psImage {
-    psType type; 			///< image data type and dimension
-    int nx, ny;				///< size of image 
-    int x0, y0;				///< data region relative to parent 
+    psType type;                        ///< image data type and dimension
+    int nx, ny;                         ///< size of image 
+    int x0, y0;                         ///< data region relative to parent 
     union {
-	psF32 **rows;		        ///< == rows_f32 
-	psS8  **rows_s8;		///< pointers to psS8 data 
-	psS16 **rows_s16;		///< pointers to psS16 data 
-	psS32 **rows_s32;		///< pointers to psS32 data 
-	psU8  **rows_u8;		///< pointers to psU8 data 
-	psU16 **rows_u16;		///< pointers to psU16 data 
-	psU32 **rows_u32;		///< pointers to psU32 data 
-	psF32 **rows_f32;		///< pointers to psF32 data 
-	psF64 **rows_f64;		///< pointers to psF64 data 
-	psComplex **rows_complex;	//!< pointers to psComplex data
+        psF32 **rows;                   ///< == rows_f32 
+        psS8  **rows_s8;                ///< pointers to psS8 data 
+        psS16 **rows_s16;               ///< pointers to psS16 data 
+        psS32 **rows_s32;               ///< pointers to psS32 data 
+        psU8  **rows_u8;                ///< pointers to psU8 data 
+        psU16 **rows_u16;               ///< pointers to psU16 data 
+        psU32 **rows_u32;               ///< pointers to psU32 data 
+        psF32 **rows_f32;               ///< pointers to psF32 data 
+        psF64 **rows_f64;               ///< pointers to psF64 data 
+        psComplex **rows_complex;       //!< pointers to psComplex data
     } rows;
-    psImage *parent;			///< parent, if a subimage 
-    int Nchildren;			///< number of subimages 
-    psImage *children;			///< children of this region; array of Nchildren pointers
+    psImage *parent;                    ///< parent, if a subimage 
+    int Nchildren;                      ///< number of subimages 
+    psImage *children;                  ///< children of this region; array of Nchildren pointers
 } psImage;
 \end{verbatim}
@@ -1762,10 +1762,10 @@
 /// Create a subimage of the specified area.
 psImage *
-psImageSubset(psImage *out,		//!< Subimage to return, or NULL
-	      const psImage *image,	///< parent image 
-	      int nx,			///< subimage width (<= image.nx - x0)  
-	      int ny,			///< subimage width (<= image.ny - y0)  
-	      int x0,			///< subimage x-offset (0 <= x0 < nx)   
-	      int y0			///< subimage y-offset (0 <= y0 < ny)   
+psImageSubset(psImage *out,             //!< Subimage to return, or NULL
+              const psImage *image,     ///< parent image 
+              int nx,                   ///< subimage width (<= image.nx - x0)  
+              int ny,                   ///< subimage width (<= image.ny - y0)  
+              int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
+              int y0                    ///< subimage y-offset (0 <= y0 < ny)   
     );
 \end{verbatim}
@@ -1798,6 +1798,6 @@
 \begin{verbatim}
 psImage *
-psImageCopy(psImage *output, 		///< target structure for output image data
-	    const psImage *input	///< copy this image 
+psImageCopy(psImage *output,            ///< target structure for output image data
+            const psImage *input        ///< copy this image 
     );
 \end{verbatim}
@@ -1813,12 +1813,12 @@
 \begin{verbatim}
 psFloatArray *
-psImageSlice(psFloatArray *out,		//!< Vector to output, or NULL
-	     const psImage *input,	///< extract slice from this image
-	     int x, 			///< starting x coord of region to slice
-	     int y, 			///< starting y coord of region to slice
-	     int nx, 			///< width of region in x
-	     int ny, 			///< width of region in y
-	     int direction,		///< direction of vector along slice
-	     const psStats *stats	///< defines statistics used to find output values
+psImageSlice(psFloatArray *out,         //!< Vector to output, or NULL
+             const psImage *input,      ///< extract slice from this image
+             int x,                     ///< starting x coord of region to slice
+             int y,                     ///< starting y coord of region to slice
+             int nx,                    ///< width of region in x
+             int ny,                    ///< width of region in y
+             int direction,             ///< direction of vector along slice
+             const psStats *stats       ///< defines statistics used to find output values
     );
 \end{verbatim}
@@ -1835,12 +1835,12 @@
 \begin{verbatim}
 psFloatArray *
-psImageCut(psFloatArray *out,		//!< Vector to output, or NULL
-	   const psImage *input,	///< extract cut from this image
-	   float xs, 			///< starting x coord of cut
-	   float ys, 			///< starting y coord of cut
-	   float xe, 			///< ending x coord of cut
-	   float ye, 			///< ending y coord of cut
-	   float dw, 			///< width of cut
-	   const psStats *stats		///< defines statistics used to find output values
+psImageCut(psFloatArray *out,           //!< Vector to output, or NULL
+           const psImage *input,        ///< extract cut from this image
+           float xs,                    ///< starting x coord of cut
+           float ys,                    ///< starting y coord of cut
+           float xe,                    ///< ending x coord of cut
+           float ye,                    ///< ending y coord of cut
+           float dw,                    ///< width of cut
+           const psStats *stats         ///< defines statistics used to find output values
     );
  \end{verbatim}
@@ -1856,11 +1856,11 @@
 \begin{verbatim}
 psFloatArray *
-psImageRadialCut(psFloatArray *out,	//!< Vector to output, or NULL
-		 const psImage *input,	///< extract profile from this image
-		 float x, 		///< center x coord of annulii
-		 float y, 		///< center y coord of annulii
-		 float radius,		///< outer radius of annulii
-		 float dr,		///< radial step size of annulii
-		 const psStats *stats	///< defines statistics used to find output values
+psImageRadialCut(psFloatArray *out,     //!< Vector to output, or NULL
+                 const psImage *input,  ///< extract profile from this image
+                 float x,               ///< center x coord of annulii
+                 float y,               ///< center y coord of annulii
+                 float radius,          ///< outer radius of annulii
+                 float dr,              ///< radial step size of annulii
+                 const psStats *stats   ///< defines statistics used to find output values
     );
 \end{verbatim}
@@ -1875,8 +1875,8 @@
 \begin{verbatim}
 psImage *
-psImageRebin(psImage *out,		//!< Image to output, or NULL
-	     const psImage *input,	///< rebin this image
-	     float scale, 		///< rebinning scale: doutput = scale*dinput
-	     const psStats *stats	///< defines statistics used to find output values
+psImageRebin(psImage *out,              //!< Image to output, or NULL
+             const psImage *input,      ///< rebin this image
+             float scale,               ///< rebinning scale: doutput = scale*dinput
+             const psStats *stats       ///< defines statistics used to find output values
     );
 \end{verbatim}
@@ -1890,7 +1890,7 @@
 \begin{verbatim}
 psImage *
-psImageRotate(psImage *out,		//!< Image to output, or NULL
-	      const psImage *input,	///< rotate this image
-	      float angle		///< rotate by this amount anti-clockwise (degrees)
+psImageRotate(psImage *out,             //!< Image to output, or NULL
+              const psImage *input,     ///< rotate this image
+              float angle               ///< rotate by this amount anti-clockwise (degrees)
     );
 \end{verbatim}
@@ -1904,9 +1904,9 @@
 \begin{verbatim}
 psImage *
-psImageShift(psImage *out,		//!< Image to output, or NULL
-	     const psImage *input,	///< shift this image
-	     float dx,			///< shift by this amount in x
-	     float dy,			///< shift by this amount in y
-	     float exposed		///< set exposed pixels to this value
+psImageShift(psImage *out,              //!< Image to output, or NULL
+             const psImage *input,      ///< shift this image
+             float dx,                  ///< shift by this amount in x
+             float dy,                  ///< shift by this amount in y
+             float exposed              ///< set exposed pixels to this value
     );
 \end{verbatim}
@@ -1917,8 +1917,8 @@
 \begin{verbatim}
 psImage *
-psImageRoll(psImage *out,		//!< Image to output, or NULL
-	    const psImage *input,	///< roll this image
-	    int dx, 			///< roll this amount in x
-	    int dy			///< roll this amount in y
+psImageRoll(psImage *out,               //!< Image to output, or NULL
+            const psImage *input,       ///< roll this image
+            int dx,                     ///< roll this amount in x
+            int dy                      ///< roll this amount in y
     );
 \end{verbatim}
@@ -1928,6 +1928,6 @@
 \begin{verbatim}
 psStats *
-psImageGetStats(const psImage *input, 	///< image (or subimage) to calculate stats
-		psStats *stats		///< defines statistics to be calculated & target
+psImageGetStats(const psImage *input,   ///< image (or subimage) to calculate stats
+                psStats *stats          ///< defines statistics to be calculated & target
     );
 \end{verbatim}
@@ -1937,6 +1937,6 @@
 \begin{verbatim}
 psHistogram *
-psImageHistogram(psHistogram *hist,	///< input histogram description & target
-		 const psImage *input	///< determine histogram of this image
+psImageHistogram(psHistogram *hist,     ///< input histogram description & target
+                 const psImage *input   ///< determine histogram of this image
     );
 \end{verbatim}
@@ -1948,5 +1948,5 @@
 psPolynomial2D *
 psImageFitPolynomial(const psImage *input, ///< image to fit
-		     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
+                     psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target
     );
 \end{verbatim}
@@ -1959,5 +1959,5 @@
 int
 psImageEvalPolynomial(const psImage *input, ///< image to fit
-		      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
+                      const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
     );
 \end{verbatim}
@@ -1979,13 +1979,13 @@
 \begin{verbatim}
 psImage *
-psImageReadSection(psImage *output, 	///< place data in this structure for output 
-		   int x, 		///< starting x coord of region
-		   int y, 		///< starting y coord of region
-		   int nx, 		///< x size of region (-1 for full range)
-		   int ny, 		///< y size of region (-1 for full range)
-		   int z, 		///< plane of interest
-		   const char *extname,	///< MEF extension name ("PHU" for primary header)
-		   int extnum,		///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		   const char *filename	///< file to read data from
+psImageReadSection(psImage *output,     ///< place data in this structure for output 
+                   int x,               ///< starting x coord of region
+                   int y,               ///< starting y coord of region
+                   int nx,              ///< x size of region (-1 for full range)
+                   int ny,              ///< y size of region (-1 for full range)
+                   int z,               ///< plane of interest
+                   const char *extname, ///< MEF extension name ("PHU" for primary header)
+                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                   const char *filename ///< file to read data from
     );
 \end{verbatim}
@@ -1996,13 +1996,13 @@
 \begin{verbatim}
 psImage *
-psImageFReadSection(psImage *output,	///< place data in this structure for output 
-		    int x,		///< starting x coord of region		   
-		    int y,		///< starting y coord of region		   
-		    int dx,		///< x size of region (-1 for full range)	   
-		    int dy,		///< y size of region (-1 for full range)	   
-		    int z,		///< plane of interest			   
-		    const char *extname, ///< MEF extension name ("PHU" for primary header)
-		    int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		    FILE *f	///< file descriptor to read data from		   
+psImageFReadSection(psImage *output,    ///< place data in this structure for output 
+                    int x,              ///< starting x coord of region            
+                    int y,              ///< starting y coord of region            
+                    int dx,             ///< x size of region (-1 for full range)          
+                    int dy,             ///< y size of region (-1 for full range)          
+                    int z,              ///< plane of interest                     
+                    const char *extname, ///< MEF extension name ("PHU" for primary header)
+                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                    FILE *f     ///< file descriptor to read data from             
     );
 \end{verbatim}
@@ -2019,10 +2019,10 @@
 psImage *
 psImageWriteSection(psImage *input,    ///< image to write out
-		    int x, 		///< starting x coord of region		   
-		    int y, 		///< starting y coord of region		   
-		    int z, 		///< plane of interest			   
-		    const char *extname, ///< MEF extension name ("PHU" for primary header)
-		    int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		    const char *filename ///< file to write data to		   
+                    int x,              ///< starting x coord of region            
+                    int y,              ///< starting y coord of region            
+                    int z,              ///< plane of interest                     
+                    const char *extname, ///< MEF extension name ("PHU" for primary header)
+                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                    const char *filename ///< file to write data to                
     );
 \end{verbatim}
@@ -2031,11 +2031,11 @@
 \begin{verbatim}
 psImage *
-psImageFWriteSection(psImage *input,	///< image to write out
-		     int x, 		///< starting x coord of region		   
-		     int y, 		///< starting y coord of region		   
-		     int z, 		///< plane of interest			   
-		     const char *extname, ///< MEF extension name			   
-		     int extnum, 	///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		     FILE *f		///< file descriptor to write data to		   
+psImageFWriteSection(psImage *input,    ///< image to write out
+                     int x,             ///< starting x coord of region            
+                     int y,             ///< starting y coord of region            
+                     int z,             ///< plane of interest                     
+                     const char *extname, ///< MEF extension name                          
+                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                     FILE *f            ///< file descriptor to write data to              
     );
 \end{verbatim}
@@ -2048,8 +2048,8 @@
 \begin{verbatim}
 psMetadata *
-psImageReadHeader(psMetadata *output,	///< read data to this structure
-		  const char *extname, 	///< MEF extension name ("PHU" for primary header)
-		  int extnum,		///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		  const char *filename	///< file to read from
+psImageReadHeader(psMetadata *output,   ///< read data to this structure
+                  const char *extname,  ///< MEF extension name ("PHU" for primary header)
+                  int extnum,           ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                  const char *filename  ///< file to read from
     );
 \end{verbatim}
@@ -2060,7 +2060,7 @@
 psMetadata *
 psImageFReadHeader(psMetadata *output, ///< read data to this structure
-		   const char *extname,	///< MEF extension name ("PHU" for primary header)
-		   int extnum,		///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
-		   FILE *f      	///< file descriptor to read from
+                   const char *extname, ///< MEF extension name ("PHU" for primary header)
+                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
+                   FILE *f              ///< file descriptor to read from
     );
 \end{verbatim}
@@ -2070,7 +2070,7 @@
 \begin{verbatim}
 psImage *
-psImageFFT(psImage *output,		//!< Output image
-	   const psImage *input,	///< image to FFT
-	   int direction		///< FFT direction 
+psImageFFT(psImage *output,             //!< Output image
+           const psImage *input,        ///< image to FFT
+           int direction                ///< FFT direction 
     );
 \end{verbatim}
@@ -2081,9 +2081,9 @@
 \begin{verbatim}
 int
-psImageClip(psImage *input, 		///< clip this image
-	    float min,			///< clip pixels with values < min
-	    float vmin, 		///< set min-clipped pixels to vmin
-	    float max,			///< clip pixels with values > max
-	    float vmax			///< set max-clipped pixels to vmax
+psImageClip(psImage *input,             ///< clip this image
+            float min,                  ///< clip pixels with values < min
+            float vmin,                 ///< set min-clipped pixels to vmin
+            float max,                  ///< clip pixels with values > max
+            float vmax                  ///< set max-clipped pixels to vmax
     );
 \end{verbatim}
@@ -2094,6 +2094,6 @@
 \begin{verbatim}
 int
-psImageClipNaN(psImage *input,		///< clip this image & target
-	       float value		///< set nan pixels to this value
+psImageClipNaN(psImage *input,          ///< clip this image & target
+               float value              ///< set nan pixels to this value
     );
 \end{verbatim}
@@ -2108,9 +2108,9 @@
 \begin{verbatim}
 int 
-psImageOverlaySection(psImage *image,	///< input image & target
-		      const psImage *overlay, ///< image to overlay 
-		      int x0,		///< x offset of overlay subimage 
-		      int y0,		///< y offset of overlay subimage 
-		      const char *operator ///< overlay operation 
+psImageOverlaySection(psImage *image,   ///< input image & target
+                      const psImage *overlay, ///< image to overlay 
+                      int x0,           ///< x offset of overlay subimage 
+                      int y0,           ///< y offset of overlay subimage 
+                      const char *operator ///< overlay operation 
     );
 \end{verbatim}
@@ -2267,11 +2267,11 @@
 typedef struct {
     int nCells;                         ///< Number of Cells assigned
-    psCell *cells;			///< Cells in the Chip
-
-    psMetaDataSet *md;			///< Chip-level metadata
+    psCell *cells;                      ///< Cells in the Chip
+
+    psMetaDataSet *md;                  ///< Chip-level metadata
     psCoordXform *chipToFPA;            ///< Transformations from chip coordinates to FPA coordinates
-    psCoordXform *FPAtoChip;		//!< Transformations from FPA coordinates to chip
-
-    struct psFPA *parentFPA;		///< FPA which contains this chip
+    psCoordXform *FPAtoChip;            //!< Transformations from FPA coordinates to chip
+
+    struct psFPA *parentFPA;            ///< FPA which contains this chip
 } psChip;
 \end{verbatim}
@@ -2303,10 +2303,10 @@
     int nChips;                         ///< Number of Cells assigned
     int nAlloc;                         ///< Number of Cells available
-    psChip *chips;			///< Chips in the Focal Plane Array
-
-    psMetaDataSet *md;			///< FPA-level metadata 
-    psDistortion *TPtoFP;		///< Transformation term from 
-    psDistortion *FPtoTP;		///< Transformation term from 
-    psFixedPattern *pattern;		//!< Fixed pattern residual offsets
+    psChip *chips;                      ///< Chips in the Focal Plane Array
+
+    psMetaDataSet *md;                  ///< FPA-level metadata 
+    psDistortion *TPtoFP;               ///< Transformation term from 
+    psDistortion *FPtoTP;               ///< Transformation term from 
+    psFixedPattern *pattern;            //!< Fixed pattern residual offsets
     psExposure *exp;                    ///< information about this exposure
     psPhotSystem colorPlus, colorMinus; ///< Colour reference
@@ -2437,8 +2437,8 @@
 /** returns Chip in FPA which contains the given FPA coordinate */
 psChip *
-psChipInFPA (psChip *out,		//!< Chip to return, or NULL
-	     const psFPA *fpa, 		///< FPA description
-	     const psCoord *coord	///< coordinate in FPA
-	     );
+psChipInFPA (psChip *out,               //!< Chip to return, or NULL
+             const psFPA *fpa,          ///< FPA description
+             const psCoord *coord       ///< coordinate in FPA
+             );
 \end{verbatim}
 
@@ -2446,8 +2446,8 @@
 /** returns Cell in Chip which contains the given chip coordinate */
 psCell *
-psCellInChip(psCell *out,		//!< Cell to return, or NULL
-	     const psChip *chip,	///< chip description
-	     const psCoord *coord	///< coordinate in chip
-	     );
+psCellInChip(psCell *out,               //!< Cell to return, or NULL
+             const psChip *chip,        ///< chip description
+             const psCoord *coord       ///< coordinate in chip
+             );
 \end{verbatim}
 
@@ -2459,8 +2459,8 @@
 /** Return the cell in FPA which contains the given FPA coordinates */
 psCell *
-psCellInFPA(psCell *out,		//!< Cell to return, or NULL
-	    const psFPA *fpa,		//!< FPA description
-	    const psCoord *coord	//!< Coordinate in FPA
-	    );
+psCellInFPA(psCell *out,                //!< Cell to return, or NULL
+            const psFPA *fpa,           //!< FPA description
+            const psCoord *coord        //!< Coordinate in FPA
+            );
 \end{verbatim}
 
@@ -2507,8 +2507,8 @@
 /** Convert cell and cell coordinate to (RA,Dec) */
 psCoord *
-psCoordCellToSky(psCoord *out,		//!< Coordinates to return, or NULL
-		 const psCell *cell,	//!< Cell to get coordinates for
-		 const psCoord *coord	//!< cell coordinates to transform
-		 );
+psCoordCellToSky(psCoord *out,          //!< Coordinates to return, or NULL
+                 const psCell *cell,    //!< Cell to get coordinates for
+                 const psCoord *coord   //!< cell coordinates to transform
+                 );
 \end{verbatim}
 
@@ -2516,8 +2516,8 @@
 /** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */
 psCoord *
-psCoordCellToSkyQuick(psCoord *out,	//!< Coordinates to return, or NULL
-		      const psCell *cell, //!< Cell description
-		      const psCoord *coord //!< cell coordinates to transform
-		      );
+psCoordCellToSkyQuick(psCoord *out,     //!< Coordinates to return, or NULL
+                      const psCell *cell, //!< Cell description
+                      const psCoord *coord //!< cell coordinates to transform
+                      );
 \end{verbatim}
 
@@ -2525,8 +2525,8 @@
 /** Convert (RA,Dec) to tangent plane coords */
 psCoord *
-psCoordSkyToTP(psCoord *out,		//!< Coordinates to return, or NULL
-	       const psExposure *exp,	//!< Exposure description
-	       const psCoord *coord	//!< input Sky coordinate
-	       );
+psCoordSkyToTP(psCoord *out,            //!< Coordinates to return, or NULL
+               const psExposure *exp,   //!< Exposure description
+               const psCoord *coord     //!< input Sky coordinate
+               );
 \end{verbatim}
 
@@ -2534,8 +2534,8 @@
 /** Convert tangent plane coords to focal plane coordinates */
 psCoord *
-psCoordTPtoFPA(psCoord *out,		//!< Coordinates to return, or NULL
-	       const psFPA *fpa,	//!< FPA description
-	       const psCoord *coord	//!< input TP coordinate
-	       );
+psCoordTPtoFPA(psCoord *out,            //!< Coordinates to return, or NULL
+               const psFPA *fpa,        //!< FPA description
+               const psCoord *coord     //!< input TP coordinate
+               );
 \end{verbatim}
 
@@ -2543,8 +2543,8 @@
 /** converts the specified FPA coord to the coord on the given Chip */
 psCoord *
-psCoordFPAtoChip (psCoord *out,		//!< Coordinates to return, or NULL
-		  const psChip *chip,	///< Chip of interest
-		  const psCoord *coord	///< input FPA coordinate
-		  ); 
+psCoordFPAtoChip (psCoord *out,         //!< Coordinates to return, or NULL
+                  const psChip *chip,   ///< Chip of interest
+                  const psCoord *coord  ///< input FPA coordinate
+                  ); 
 \end{verbatim}
 
@@ -2552,8 +2552,8 @@
 /** converts the specified Chip coord to the coord on the given Cell */
 psCoord *
-psCoordChiptoCell (psCoord *out,	//!< Coordinates to return, or NULL
-		   const psCell *cell, 	///< Cell of interest
-		   const psCoord *coord	///< input Chip coordinate
-		   );
+psCoordChiptoCell (psCoord *out,        //!< Coordinates to return, or NULL
+                   const psCell *cell,  ///< Cell of interest
+                   const psCoord *coord ///< input Chip coordinate
+                   );
 \end{verbatim}
 
@@ -2561,8 +2561,8 @@
 /** converts the specified Cell coord to the coord on the parent Chip */
 psCoord *
-psCoordCelltoChip (psCoord *out,	//!< Coordinates to return, or NULL
-		   const psCell *cell, 	///< Cell description
-		   const psCoord *coord	///< input Cell coordinate
-		   );
+psCoordCelltoChip (psCoord *out,        //!< Coordinates to return, or NULL
+                   const psCell *cell,  ///< Cell description
+                   const psCoord *coord ///< input Cell coordinate
+                   );
 \end{verbatim}
 
@@ -2570,8 +2570,8 @@
 /** converts the specified Chip coord to the coord on the parent FPA */
 psCoord *
-psCoordChiptoFPA (psCoord *out,		//!< Coordinates to return, or NULL
-		  const psChip *chip, 	///< Chip description
-		  const psCoord *coord	///< input Chip coordinate
-		  );
+psCoordChiptoFPA (psCoord *out,         //!< Coordinates to return, or NULL
+                  const psChip *chip,   ///< Chip description
+                  const psCoord *coord  ///< input Chip coordinate
+                  );
 \end{verbatim}
 
@@ -2579,8 +2579,8 @@
 /** Convert focal plane coords to tangent plane coordinates */
 psCoord *
-psCoordFPAToTP(psCoord *out,		//!< Coordinates to return, or NULL
-	       const psFPA *fpa,	//!< FPA description
-	       const psCoord *coord	//!< input FPA coordinate
-	       );
+psCoordFPAToTP(psCoord *out,            //!< Coordinates to return, or NULL
+               const psFPA *fpa,        //!< FPA description
+               const psCoord *coord     //!< input FPA coordinate
+               );
 \end{verbatim}
 
@@ -2588,8 +2588,8 @@
 /** Convert tangent plane coords to (RA,Dec) */
 psCoord *
-psCoordTPtoSky(psCoord *out,		//!< Coordinates to return, or NULL
-	       const psExposure *exp,	//!< Exposure description
-	       const psCoord *coord	//!< input TP coordinate
-	       );
+psCoordTPtoSky(psCoord *out,            //!< Coordinates to return, or NULL
+               const psExposure *exp,   //!< Exposure description
+               const psCoord *coord     //!< input TP coordinate
+               );
 \end{verbatim}
 
@@ -2597,8 +2597,8 @@
 /** Convert Cell coords to FPA coordinates */
 psCoord *
-psCoordCellToFPA(psCoord *out,		//!< Coordinates to return, or NULL
-		 const psCell *cell,	//!< Cell description
-		 const psCoord *coord	//!< Input cell coordinates
-		 );
+psCoordCellToFPA(psCoord *out,          //!< Coordinates to return, or NULL
+                 const psCell *cell,    //!< Cell description
+                 const psCoord *coord   //!< Input cell coordinates
+                 );
 \end{verbatim}
 
@@ -2665,15 +2665,15 @@
 /** A struct to define a single item of metadata */
 typedef struct {
-    const int id;			//!< unique ID for this item
-    char *restrict name;		//!< Name of item
-    psMetaDataType type;		//!< type of this item
-    psMetaDataFlags flags;		//!< flags associated with this item
+    const int id;                       //!< unique ID for this item
+    char *restrict name;                //!< Name of item
+    psMetaDataType type;                //!< type of this item
+    psMetaDataFlags flags;              //!< flags associated with this item
     const union {
-	float f;			//!< floating value
-	int i;				//!< integer value
-	void *v;			//!< other type
-    } val;				//!< value of metadata
-    char *comment;			//!< optional comment ("", not NULL)
-    psDlist *restrict items;		//!< list of psMetaDataItems with the same name
+        float f;                        //!< floating value
+        int i;                          //!< integer value
+        void *v;                        //!< other type
+    } val;                              //!< value of metadata
+    char *comment;                      //!< optional comment ("", not NULL)
+    psDlist *restrict items;            //!< list of psMetaDataItems with the same name
 } psMetaDataItem;
 \end{verbatim}
@@ -2692,15 +2692,15 @@
 \begin{verbatim}
 /** Possible types of metadata. */
-typedef enum {				//!< type of val is:
-    PS_META_ITEM_SET = 0,		//!< NULL; metadata is in psMetaDataType.items
-    PS_META_FLOAT,			//!< float (.f)
-    PS_META_INT,			//!< int (.i)
-    PS_META_STR,			//!< string (.v)
-    PS_META_IMG,			//!< image (.v)
-    PS_META_JPEG,			//!< JPEG (.v)
-    PS_META_PNG,			//!< PNG (.v)
-    PS_META_ASTROM,			//!< astrometric coefficients (.v)
-    PS_META_UNKNOWN,			//!< other (.v)
-    PS_META_NTYPE			//!< Number of types; must be last
+typedef enum {                          //!< type of val is:
+    PS_META_ITEM_SET = 0,               //!< NULL; metadata is in psMetaDataType.items
+    PS_META_FLOAT,                      //!< float (.f)
+    PS_META_INT,                        //!< int (.i)
+    PS_META_STR,                        //!< string (.v)
+    PS_META_IMG,                        //!< image (.v)
+    PS_META_JPEG,                       //!< JPEG (.v)
+    PS_META_PNG,                        //!< PNG (.v)
+    PS_META_ASTROM,                     //!< astrometric coefficients (.v)
+    PS_META_UNKNOWN,                    //!< other (.v)
+    PS_META_NTYPE                       //!< Number of types; must be last
 } psMetaDataType;
 \end{verbatim}
@@ -2731,6 +2731,6 @@
 /** A set of metadata */
 typedef struct {
-    psDlist *restrict list;		//!< list of psMetaDataItem
-    psHash *restrict table;		//!< hash table of the same metadata
+    psDlist *restrict list;             //!< list of psMetaDataItem
+    psHash *restrict table;             //!< hash table of the same metadata
 } psMetaDataSet;
 \end{verbatim}
@@ -2815,10 +2815,10 @@
 /** Constructor */
 psMetaDataItem *psMetaDataItemAlloc(int typeFlags, //!< type of this piece of metadata + flags
-				    const void *val, //!< value of new item N.b. a pointer even if the item
-					             //!< is of type e.g. int
-				    const char *comment, //!< comment associated with item
-				    const char *name, //!< name of new item of metadata (may be in sprintf
-						      //!< format)
-				    ...	//!< possible arguments for name format
+                                    const void *val, //!< value of new item N.b. a pointer even if the item
+                                                     //!< is of type e.g. int
+                                    const char *comment, //!< comment associated with item
+                                    const char *name, //!< name of new item of metadata (may be in sprintf
+                                                      //!< format)
+                                    ... //!< possible arguments for name format
     );
 
@@ -2837,10 +2837,10 @@
 /// Add entry to the end of the metadata set
 psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, //!< Metadata set to add to
-				 psMetaDataItem *restrict item //!< Metatdata to add
+                                 psMetaDataItem *restrict item //!< Metatdata to add
     );
 
 /// delete entry from the metadata set
 psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, //!< Metadata set to delete from
-				 const char *restrict key //!< Key to delete
+                                 const char *restrict key //!< Key to delete
     );
 
@@ -2851,16 +2851,16 @@
 /// get the next entry in the sequence
 psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, //!< Metadata set to get from
-				  const char *restrict match //!< Match this
+                                  const char *restrict match //!< Match this
     );
 
 /// find the metadata with the specified key
 psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, //!< Metadata set to look up
-				 const char *restrict key //!< Key to find
+                                 const char *restrict key //!< Key to find
     );
 
 /// print metadata item to the specified stream
-void psMetaDataItemPrint(FILE *fd,		//!< file descriptor to write to
-			 const psMetaDataItem *restrict ms, //!< item of metadata to print
-			 const char *prefix	   //!< print this at the beginning of each line
+void psMetaDataItemPrint(FILE *fd,              //!< file descriptor to write to
+                         const psMetaDataItem *restrict ms, //!< item of metadata to print
+                         const char *prefix        //!< print this at the beginning of each line
     );
 \end{verbatim}
@@ -2927,6 +2927,6 @@
 /** apply the coordinate transformation to the given coordinate */
 psCoord *psCoordXformApply (psCoord *out, //!< Output coordinates, or NULL
-			    const psCoordXform *frame, ///< coordinate transformation
-			    const psCoord *coords ///< input coordiate
+                            const psCoordXform *frame, ///< coordinate transformation
+                            const psCoord *coords ///< input coordiate
     );
 \end{verbatim}
@@ -2935,8 +2935,8 @@
 /** apply the optical distortion to the given coordinate, magnitude, color */
 psCoord *psDistortionApply (psCoord *out, //!< Output coordinates, or NULL
-			    const psdistortion *pattern, ///< optical distortion pattern
-			    const psCoord *coords, ///< input coordinate
-			    float mag,	///< magnitude of object
-			    float color ///< color of object
+                            const psdistortion *pattern, ///< optical distortion pattern
+                            const psCoord *coords, ///< input coordinate
+                            float mag,  ///< magnitude of object
+                            float color ///< color of object
     );
 \end{verbatim}
@@ -2952,6 +2952,6 @@
 psCoord *
 psGetOffset(const psCoord *restrict position1, //!< Position 1
-	    const psCoord *restrict position2, //!< Position 2
-	    const char *type		//!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
+            const psCoord *restrict position2, //!< Position 2
+            const char *type            //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     );
 \end{verbatim}
@@ -2961,6 +2961,6 @@
 psCoord *
 psApplyOffset(const psCoord *restrict position, //!< Position
-	      const psCoord *restrict offset, //!< Offset
-	      const char *type		//!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
+              const psCoord *restrict offset, //!< Offset
+              const char *type          //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     );
 \end{verbatim}
@@ -2975,5 +2975,5 @@
 /** Get Sun Position */
 psCoord *
-psGetSunPos(float mjd			//!< MJD to get position for
+psGetSunPos(float mjd                   //!< MJD to get position for
     );
 \end{verbatim}
@@ -2982,7 +2982,7 @@
 /** Get Moon position */
 psCoord *
-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
     );
 \end{verbatim}
@@ -2991,5 +2991,5 @@
 /** Get Moon phase */
 float
-psGetMoonPhase(float mjd		//!< MJD to get phase for
+psGetMoonPhase(float mjd                //!< MJD to get phase for
     );
 \end{verbatim}
@@ -2999,5 +2999,5 @@
 psCoord *
 psGetSolarSystemPos(const char *solarSystemObject, //!< Named S.S. object
-		    float mjd		//!< MJD to get position for
+                    float mjd           //!< MJD to get position for
     );
 \end{verbatim}
