Index: unk/doc/pslib/psAstroGroup.tex
===================================================================
--- /trunk/doc/pslib/psAstroGroup.tex	(revision 5039)
+++ 	(revision )
@@ -1,200 +1,0 @@
-\begin{CompactItemize}
-\item 
-{\bf ps\-Cell} $\ast$ {\bf ps\-Cell\-In\-FPA} ({\bf ps\-Cell} $\ast$out, const {\bf ps\-Plane} $\ast$coord, const {\bf ps\-FPA} $\ast$fpa)
-\begin{CompactList}\small\item\em Return the cell in FPA which contains the given FPA coordinates.\item\end{CompactList}\item 
-{\bf ps\-Chip} $\ast$ {\bf ps\-Chip\-In\-FPA} ({\bf ps\-Chip} $\ast$out, const {\bf ps\-Plane} $\ast$coord, const {\bf ps\-FPA} $\ast$fpa)
-\begin{CompactList}\small\item\em returns Chip in FPA which contains the given FPA coordinate\item\end{CompactList}\item 
-{\bf ps\-Cell} $\ast$ {\bf ps\-Cell\-In\-Chip} ({\bf ps\-Cell} $\ast$out, const {\bf ps\-Plane} $\ast$coord, const {\bf ps\-Chip} $\ast$chip)
-\begin{CompactList}\small\item\em returns Cell in Chip which contains the given chip coordinate\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Cellto\-Chip} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em converts the specified Cell coord to the coord on the parent Chip\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Chipto\-FPA} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Chip} $\ast$chip)
-\begin{CompactList}\small\item\em converts the specified Chip coord to the coord on the parent FPA\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-FPATo\-TP} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-FPA} $\ast$fpa)
-\begin{CompactList}\small\item\em Convert focal plane coords to tangent plane coordinates.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Coord\-TPto\-Sky} ({\bf ps\-Sphere} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Grommit} $\ast$grommit)
-\begin{CompactList}\small\item\em Convert tangent plane coords to (RA,Dec).\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Cell\-To\-FPA} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em Convert Cell coords to FPA coordinates.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Coord\-Cell\-To\-Sky} ({\bf ps\-Sphere} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em Convert cell and cell coordinate to (RA,Dec).\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Coord\-Cell\-To\-Sky\-QD} ({\bf ps\-Sphere} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em Convert cell and cell coordinate to (RA,Dec).\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Sky\-To\-TP} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Sphere} $\ast$in, const {\bf ps\-Grommit} $\ast$grommit)
-\begin{CompactList}\small\item\em Convert (RA,Dec) to tangent plane coords.\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-TPto\-FPA} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-FPA} $\ast$fpa)
-\begin{CompactList}\small\item\em Convert tangent plane coords to focal plane coordinates.\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-FPAto\-Chip} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Chip} $\ast$chip)
-\begin{CompactList}\small\item\em converts the specified FPA coord to the coord on the given Chip\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Chipto\-Cell} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em converts the specified Chip coord to the coord on the given Cell\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Sky\-To\-Cell} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Sphere} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em Convert (RA,Dec) to cell and cell coordinates.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Coord\-Sky\-To\-Cell\-QD} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Sphere} $\ast$in, const {\bf ps\-Cell} $\ast$cell)
-\begin{CompactList}\small\item\em Quick and dirty cell to (RA,Dec) --- employs cell\-To\-Sky transformation.\item\end{CompactList}\item 
-float {\bf ps\-Get\-Airmass} (const {\bf ps\-Sphere} $\ast$coord, double sidereal\-Time, float height)
-\begin{CompactList}\small\item\em Get the airmass for a given position and sidereal time.\item\end{CompactList}\item 
-float {\bf ps\-Get\-Parallactic} (const {\bf ps\-Sphere} $\ast$coord, double sidereal\-Time)
-\begin{CompactList}\small\item\em Get the parallactic angle for a given position and sidereal time.\item\end{CompactList}\item 
-float {\bf ps\-Get\-Refraction} (float colour, {\bf ps\-Phot\-System} color\-Plus, {\bf ps\-Phot\-System} color\-Minus, const {\bf ps\-Exposure} $\ast$exp)
-\begin{CompactList}\small\item\em Estimate atmospheric refraction, along the parallactic.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Get\-Parallax\-Factor} (const {\bf ps\-Exposure} $\ast$exp)
-\begin{CompactList}\small\item\em Calculate the parallax factor.\item\end{CompactList}\item 
-{\bf ps\-Exposure} $\ast$ {\bf ps\-Exposure\-Alloc} (double ra, double dec, double ha, double zd, double az, double lst, float mjd, float rot\-Angle, float temp, float pressure, float humidity, float exptime)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Exposure\-Free} ({\bf ps\-Exposure} $\ast$restrict my\-Exp)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Grommit} $\ast$ {\bf ps\-Grommit\-Alloc} (const {\bf ps\-Exposure} $\ast$exp)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Grommit\-Free} ({\bf ps\-Grommit} $\ast$grommit)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-double {\bf ps\-Get\-MJD} (void)
-\begin{CompactList}\small\item\em Get current MJD, for a timestamp.\item\end{CompactList}\item 
-double {\bf ps\-Get\-Sidereal} (float mjd, float longitude)
-\begin{CompactList}\small\item\em Get current sidereal time at longitude.\item\end{CompactList}\item 
-char $\ast$ {\bf ps\-Time\-To\-ISOTime} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS).\item\end{CompactList}\item 
-double {\bf ps\-Time\-To\-UTC} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to UTC.\item\end{CompactList}\item 
-double {\bf ps\-Time\-To\-MJD} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to MJD.\item\end{CompactList}\item 
-double {\bf ps\-Time\-To\-JD} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to JD.\item\end{CompactList}\item 
-timeval $\ast$ {\bf ps\-Time\-To\-Timeval} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to timeval (struct timeval).\item\end{CompactList}\item 
-tm $\ast$ {\bf ps\-Time\-To\-Tm} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to broken-down time (struct tm).\item\end{CompactList}\item 
-float {\bf ps\-Time\-To\-Lunation} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Convert {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})} to lunation number.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-ISOTime\-To\-Time} (char $\ast$input)
-\begin{CompactList}\small\item\em Convert ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS) to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-UTCTo\-Time} (double input)
-\begin{CompactList}\small\item\em Convert UTC to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-MJDTo\-Time} (double input)
-\begin{CompactList}\small\item\em Convert MJD to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-JDTo\-Time} (double input)
-\begin{CompactList}\small\item\em Convert JD to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-Timeval\-To\-Time} (struct timeval $\ast$input)
-\begin{CompactList}\small\item\em Convert timeval (struct timeval) to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-TMTo\-Time} (struct tm $\ast$input)
-\begin{CompactList}\small\item\em Convert broken-down time (struct tm) to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Time} $\ast$ {\bf ps\-Lunation\-To\-Time} (float lunation)
-\begin{CompactList}\small\item\em Convert lunation number to {\bf ps\-Time} {\rm (p.\,\pageref{structpsTime})}.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Alloc} (int width, int height, {\bf ps\-Elem\-Type} type)
-\begin{CompactList}\small\item\em Create an image of the specified size and type.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Subset} (const {\bf ps\-Image} $\ast$image, int width, int height, int x0, int y0)
-\begin{CompactList}\small\item\em Create a subimage of the specified area.\item\end{CompactList}\item 
-void {\bf ps\-Image\-Free} ({\bf ps\-Image} $\ast$restrict image)
-\begin{CompactList}\small\item\em Destroy the specified image (destroy children if they exist).\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Free\-Pixels} ({\bf ps\-Image} $\ast$restrict image)
-\begin{CompactList}\small\item\em Destroy the pixels of the specified image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Copy} ({\bf ps\-Image} $\ast$output, const {\bf ps\-Image} $\ast$input, {\bf ps\-Elem\-Type} type)
-\begin{CompactList}\small\item\em Create a copy of the specified image.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Image\-Slice} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Image} $\ast$input, int x, int y, int nx, int ny, int direction, const {\bf ps\-Stats} $\ast$stats)
-\begin{CompactList}\small\item\em Extract pixels from rectlinear region to a vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Image\-Cut} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Image} $\ast$input, float xs, float ys, float xe, float ye, float dw, const {\bf ps\-Stats} $\ast$stats)
-\begin{CompactList}\small\item\em Extract pixels along a line to a vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Image\-Radial\-Cut} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Image} $\ast$input, float x, float y, const {\bf ps\-Vector} $\ast$radii, const {\bf ps\-Stats} $\ast$stats)
-\begin{CompactList}\small\item\em Extract radial annulii data to a vector.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Rebin} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$input, float scale, const {\bf ps\-Stats} $\ast$stats)
-\begin{CompactList}\small\item\em Rebin image to new scale.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Rotate} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$input, float angle)
-\begin{CompactList}\small\item\em Rotate image by given angle.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Shift} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$input, float dx, float dy, float exposed)
-\begin{CompactList}\small\item\em Shift image by an arbitrary number of pixels in either direction.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Roll} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$input, int dx, int dy)
-\begin{CompactList}\small\item\em Roll image by an integer number of pixels in either direction.\item\end{CompactList}\item 
-{\bf ps\-Stats} $\ast$ {\bf ps\-Image\-Get\-Stats} ({\bf ps\-Stats} $\ast$stats, const {\bf ps\-Image} $\ast$input)
-\begin{CompactList}\small\item\em Determine statistics for image (or subimage).\item\end{CompactList}\item 
-{\bf ps\-Histogram} $\ast$ {\bf ps\-Image\-Histogram} ({\bf ps\-Histogram} $\ast$hist, const {\bf ps\-Image} $\ast$input)
-\begin{CompactList}\small\item\em Construct a histogram from an image (or subimage).\item\end{CompactList}\item 
-{\bf ps\-Polynomial2D} $\ast$ {\bf ps\-Image\-Fit\-Polynomial} ({\bf ps\-Polynomial2D} $\ast$coeffs, const {\bf ps\-Image} $\ast$input)
-\begin{CompactList}\small\item\em Fit a 2-D polynomial surface to an image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Eval\-Polynomial} (const {\bf ps\-Image} $\ast$input, const {\bf ps\-Polynomial2D} $\ast$coeffs)
-\begin{CompactList}\small\item\em Evaluate a 2-D polynomial surface to image pixels.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Read\-Section} ({\bf ps\-Image} $\ast$output, int x, int y, int nx, int ny, int z, const char $\ast$extname, int extnum, const char $\ast$filename)
-\begin{CompactList}\small\item\em Read an image or subimage from a named file.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-FRead\-Section} ({\bf ps\-Image} $\ast$output, int x, int y, int nx, int ny, int z, const char $\ast$extname, int extnum, FILE $\ast$f)
-\begin{CompactList}\small\item\em Read an image or subimage from file descriptor.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Write\-Section} (const {\bf ps\-Image} $\ast$input, int x, int y, int z, const char $\ast$extname, int extnum, const char $\ast$filename)
-\begin{CompactList}\small\item\em Write an image section to named file (which may exist).\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-FWrite\-Section} (const {\bf ps\-Image} $\ast$input, int x, int y, int z, const char $\ast$extname, int extnum, FILE $\ast$f)
-\begin{CompactList}\small\item\em Write an image section to named file (which may exist).\item\end{CompactList}\item 
-int {\bf ps\-Image\-Clip} ({\bf ps\-Image} $\ast$input, float min, float vmin, float max, float vmax)
-\begin{CompactList}\small\item\em Clip image values outside of range to given values. Return number of clipped pixels.\item\end{CompactList}\item 
-int {\bf ps\-Image\-Clip\-Na\-N} ({\bf ps\-Image} $\ast$input, float value)
-\begin{CompactList}\small\item\em Clip Na\-N image pixels to given value. Return number of clipped pixels.\item\end{CompactList}\item 
-int {\bf ps\-Image\-Overlay\-Section} ({\bf ps\-Image} $\ast$image, const {\bf ps\-Image} $\ast$overlay, int x0, int y0, const char $\ast$op)
-\begin{CompactList}\small\item\em Overlay subregion of image with another image. Return number of pixels replaced.\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Item\-Alloc} (const char $\ast$name, int format, const char $\ast$comment,...)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Item\-Alloc} (const char $\ast$name, int format, const char $\ast$comment, va\_\-list ap)
-\item 
-void {\bf ps\-Metadata\-Item\-Free} ({\bf ps\-Metadata\-Item} $\ast$ms)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Metadata} $\ast$ {\bf ps\-Metadata\-Alloc} (void)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Metadata\-Free} ({\bf ps\-Metadata} $\ast$md)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Append\-Item} ({\bf ps\-Metadata} $\ast$restrict md, {\bf ps\-Metadata\-Item} $\ast$restrict item)
-\begin{CompactList}\small\item\em Add item to the end of the metadata.\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Append} ({\bf ps\-Metadata} $\ast$restrict md, const char $\ast$name, int format, const char $\ast$comment,...)
-\begin{CompactList}\small\item\em Add item to the end of the metadata. Combines ps\-Metadata\-Item\-Alloc and ps\-Metadata\-Append\-Item.\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Remove} ({\bf ps\-Metadata} $\ast$restrict md, const char $\ast$restrict key)
-\begin{CompactList}\small\item\em delete item from the metadata\item\end{CompactList}\item 
-void {\bf ps\-Metadata\-Set\-Iterator} ({\bf ps\-Metadata} $\ast$md)
-\begin{CompactList}\small\item\em reset the iterator to the start of the list\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Get\-Next} ({\bf ps\-Metadata} $\ast$restrict md, const char $\ast$restrict match, int which)
-\begin{CompactList}\small\item\em get the next item in the sequence\item\end{CompactList}\item 
-{\bf ps\-Metadata\-Item} $\ast$ {\bf ps\-Metadata\-Lookup} (const {\bf ps\-Metadata} $\ast$restrict md, const char $\ast$restrict key)
-\begin{CompactList}\small\item\em find the metadata with the specified key\item\end{CompactList}\item 
-void {\bf ps\-Metadata\-Item\-Print} (FILE $\ast$fd, const {\bf ps\-Metadata\-Item} $\ast$restrict md, const char $\ast$prefix)
-\begin{CompactList}\small\item\em print metadata item to the specified stream\item\end{CompactList}\item 
-{\bf ps\-Metadata} $\ast$ {\bf ps\-Metadata\-Read\-Header} ({\bf ps\-Metadata} $\ast$out, const char $\ast$ext, int extnum, const char $\ast$file)
-\begin{CompactList}\small\item\em Read only header from image file.\item\end{CompactList}\item 
-{\bf ps\-Metadata} $\ast$ {\bf ps\-Metadata\-FRead\-Header} ({\bf ps\-Metadata} $\ast$out, const char $\ast$ext, int extnum, FILE $\ast$f)
-\begin{CompactList}\small\item\em Read only header from image file descriptor.\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Plane\-Transform\-Apply} ({\bf ps\-Plane} $\ast$out, const {\bf ps\-Plane\-Transform} $\ast$frame, const {\bf ps\-Plane} $\ast$coords)
-\begin{CompactList}\small\item\em apply the coordinate transformation to the given coordinate\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Plane\-Distort\-Apply} ({\bf ps\-Plane} $\ast$out, const ps\-Plane\-Distortion $\ast$pattern, const {\bf ps\-Plane} $\ast$coords, float mag, float color)
-\begin{CompactList}\small\item\em apply the optical distortion to the given coordinate, magnitude, color\item\end{CompactList}\item 
-{\bf ps\-Sphere\-Transform} $\ast$ {\bf ps\-Sphere\-Transform\-Alloc} (double pole1, double pole2, double rotation)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Sphere\-Transform\-Free} ({\bf ps\-Sphere\-Transform} $\ast$trans)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sphere\-Transform\-Apply} (const {\bf ps\-Sphere} $\ast$coord, const {\bf ps\-Sphere\-Transform} $\ast$sys)
-\begin{CompactList}\small\item\em Apply general spherical transformation.\item\end{CompactList}\item 
-{\bf ps\-Sphere\-Transform} $\ast$ {\bf ps\-Sphere\-Transform\-Ito\-E} (void)
-\begin{CompactList}\small\item\em Return transformation structure to convert ICRS to Ecliptic.\item\end{CompactList}\item 
-{\bf ps\-Sphere\-Transform} $\ast$ {\bf ps\-Sphere\-Transform\-Eto\-I} (void)
-\begin{CompactList}\small\item\em Return transformation structure to convert Ecliptic to ICRS.\item\end{CompactList}\item 
-{\bf ps\-Sphere\-Transform} $\ast$ {\bf ps\-Sphere\-Transform\-Ito\-G} (void)
-\begin{CompactList}\small\item\em Return transformation structure to convert ICRS to Galactic.\item\end{CompactList}\item 
-{\bf ps\-Sphere\-Transform} $\ast$ {\bf ps\-Sphere\-Transform\-Gto\-I} (void)
-\begin{CompactList}\small\item\em Return transformation structure to convert Galactic to ICRS.\item\end{CompactList}\item 
-{\bf ps\-Plane} $\ast$ {\bf ps\-Coord\-Project} (const {\bf ps\-Sphere} $\ast$coord, const {\bf ps\-Projection} $\ast$projection)
-\begin{CompactList}\small\item\em Project spherical system onto a plane.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Coord\-Deproject} (const {\bf ps\-Plane} $\ast$coord, const {\bf ps\-Projection} $\ast$projection)
-\begin{CompactList}\small\item\em Deproject plane onto spherical system.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sphere\-Get\-Offset} (const {\bf ps\-Sphere} $\ast$restrict position1, const {\bf ps\-Sphere} $\ast$restrict position2, const char $\ast$type)
-\begin{CompactList}\small\item\em Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sphere\-Apply\-Offset} (const {\bf ps\-Sphere} $\ast$restrict position, const {\bf ps\-Sphere} $\ast$restrict offset, const char $\ast$type)
-\begin{CompactList}\small\item\em Apply an offset to a position.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sun\-Get\-Pos} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Sun Position.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sun\-Get\-Rise} ({\bf ps\-Time} $\ast$twi15, {\bf ps\-Time} $\ast$twi18, {\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Sun Rise time.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Sun\-Get\-Set} ({\bf ps\-Time} $\ast$twi15, {\bf ps\-Time} $\ast$twi18, {\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Sun Set time.\item\end{CompactList}\item 
-float {\bf ps\-Night\-Length} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Length of closest night.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Moon\-Get\-Pos} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Moon Position.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Moon\-Get\-Rise} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Moon Rise time.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Moon\-Get\-Set} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Moon Set time.\item\end{CompactList}\item 
-float {\bf ps\-Moon\-Get\-Phase} ({\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Moon phase.\item\end{CompactList}\item 
-{\bf ps\-Sphere} $\ast$ {\bf ps\-Planet\-Get\-Pos} (const char $\ast$solar\-System\-Object, {\bf ps\-Time} time)
-\begin{CompactList}\small\item\em Get Planet positions.\item\end{CompactList}\end{CompactItemize}
Index: unk/doc/pslib/psDataGroup.tex
===================================================================
--- /trunk/doc/pslib/psDataGroup.tex	(revision 5039)
+++ 	(revision )
@@ -1,46 +1,0 @@
-\begin{CompactItemize}
-\item 
-{\bf ps\-Dlist} $\ast$ {\bf ps\-Dlist\-Alloc} (void $\ast$data)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Dlist\-Free} ({\bf ps\-Dlist} $\ast$list, void($\ast$elem\-Free)(void $\ast$))
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Dlist} $\ast$ {\bf ps\-Dlist\-Add} ({\bf ps\-Dlist} $\ast$list, void $\ast$data, int where)
-\begin{CompactList}\small\item\em Add to list.\item\end{CompactList}\item 
-{\bf ps\-Dlist} $\ast$ {\bf ps\-Dlist\-Append} ({\bf ps\-Dlist} $\ast$list, void $\ast$data)
-\begin{CompactList}\small\item\em Append to a list.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Dlist\-Remove} ({\bf ps\-Dlist} $\ast$list, void $\ast$data, int which)
-\begin{CompactList}\small\item\em Remove from a list.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Dlist\-Get} (const {\bf ps\-Dlist} $\ast$list, int which)
-\begin{CompactList}\small\item\em Retrieve from a list.\item\end{CompactList}\item 
-void {\bf ps\-Dlist\-Set\-Iterator} ({\bf ps\-Dlist} $\ast$list, int where, int which)
-\begin{CompactList}\small\item\em Set the iterator.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Dlist\-Get\-Next} ({\bf ps\-Dlist} $\ast$list, int which)
-\begin{CompactList}\small\item\em Get next element relative to iter.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Dlist\-Get\-Prev} ({\bf ps\-Dlist} $\ast$list, int which)
-\begin{CompactList}\small\item\em Get prev element relative to iter.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Dlist\-To\-Vector} ({\bf ps\-Dlist} $\ast$dlist)
-\begin{CompactList}\small\item\em Convert doubly-linked list to a vector of (void $\ast$).\item\end{CompactList}\item 
-{\bf ps\-Dlist} $\ast$ {\bf ps\-Array\-To\-Dlist} ({\bf ps\-Vector} $\ast$vector)
-\begin{CompactList}\small\item\em Convert array to a doubly-linked list.\item\end{CompactList}\item 
-{\bf ps\-Dlist} $\ast$ {\bf ps\-Dlist\-Sort} ({\bf ps\-Dlist} $\ast$list, int($\ast$compare)(const void $\ast$a, const void $\ast$b))
-\begin{CompactList}\small\item\em Sort a list.\item\end{CompactList}\item 
-{\bf ps\-Hash} $\ast$ {\bf ps\-Hash\-Alloc} (void)
-\begin{CompactList}\small\item\em Allocate hash buckets in table.\item\end{CompactList}\item 
-void {\bf ps\-Hash\-Free} ({\bf ps\-Hash} $\ast$table, void($\ast$item\-Free)(void $\ast$item))
-\begin{CompactList}\small\item\em Free hash buckets from table.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Hash\-Insert} ({\bf ps\-Hash} $\ast$table, const char $\ast$key, void $\ast$data, void($\ast$item\-Free)(void $\ast$item))
-\begin{CompactList}\small\item\em Insert entry into table.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Hash\-Lookup} ({\bf ps\-Hash} $\ast$table, const char $\ast$key)
-\begin{CompactList}\small\item\em Lookup key in table.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Hash\-Remove} ({\bf ps\-Hash} $\ast$table, const char $\ast$key)
-\begin{CompactList}\small\item\em Remove key from table.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Alloc} (int nalloc, {\bf ps\-Elem\-Type} type)
-\begin{CompactList}\small\item\em Create a vector of the specified size and type.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Realloc} (const {\bf ps\-Vector} $\ast$vector, int nalloc)
-\begin{CompactList}\small\item\em Extend a vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Subset} (const {\bf ps\-Vector} $\ast$vector, int start, int end)
-\begin{CompactList}\small\item\em Create a subvector of the specified range.\item\end{CompactList}\item 
-void {\bf ps\-Vector\-Free} ({\bf ps\-Vector} $\ast$restrict vector, void($\ast$elem\-Free)(void $\ast$))
-\begin{CompactList}\small\item\em Destroy the specified vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Transpose} ({\bf ps\-Vector} $\ast$out, {\bf ps\-Vector} $\ast$my\-Vector)
-\begin{CompactList}\small\item\em Transpose a vector.\item\end{CompactList}\end{CompactItemize}
Index: unk/doc/pslib/psLibSDRS_Astrom.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS_Astrom.tex	(revision 5039)
+++ 	(revision )
@@ -1,648 +1,0 @@
-\subsection{Astronomical Images}
-
-\subsubsection{Overview}
-
-Above, we have defined a basic container for a single 2D collection of
-pixels (\code{psImage}), along with basic operations to manipulate the
-image pixels.  For astronomical applications, this data structure is
-insufficient for two reasons.  First, it does provide sufficient
-additional metadata to describe the data in detail.  Second, astronomy
-applications frequent involve multiple, related images.  For
-Pan-STARRS, and for general astronomical applications, we require a
-richer collection of data structures which describe a very general
-image concept.  We have defined several layers in the hierarchy which
-are necessary to describe the image data which will be produced by the
-Pan-STARRS Gigapixel cameras as well as other standard astronomical
-images.  
-
-A simple 2D image is a basic data unit for much of astronomical
-imaging.  If we consider various optical and IR array cameras, a
-single readout of the detector produces a collection of pixels
-measurements which is well represented as a single 2D image.  We
-define our lowest-level astronomical image structure,
-\code{psReadout}, to contain the pixels produced by a single readout
-of the detector, along with metadata needed to define that readout:
-the origin and binning of the image relative to the original detector
-pixels explicitly in the structure, and pointers to the general
-metadata and derived objects, if any.
-
-A single detector may be read multiple times in sequence.  For
-example, infrared detectors frequently produce an image immediately
-after the detector is reset followed by an image after the basic
-exposure is complete.  Both readouts correspond to the same pixels,
-though the binning or rastering may be different between the two
-readouts.  Another example is the video sequence produced by the
-Pan-STARRS Gigapix camera guide cells, each of which represents a
-series of many images from a subraster of pixels in the detector
-readout portion.  The second level of our image container hierarchy,
-\code{psCell}, consists of a collection of readouts from a single
-detector.
-
-In the Pan-STARRS Gigapix camera, the basic readout region is a
-fraction of the full imaging area of a single CCD chip.  The chip is
-divided into 64 cells, any fraction of which may have been readout
-for a given exposure.  In other cameras, such as Megacam at CFHT, the
-individual CCDs have multiple amplifiers addressing contiguous
-portions of the detector.  In such cameras, each amplifier produces a
-separate collection of pixels.  In the third level of our image
-container hierarchy, the data structure \code{psChip} represents a
-collection of different cells.   
-
-The top level of our image container hierarchy is a complete focal
-plane array (\code{psFPA}).  This structure represents the collection
-of chips in the camera, all of which are read out in a given
-exposure.  
-
-For example, take a mosaic camera consisting of eight $2k\times 4k$
-CCDs, each of which is read out through two amplifiers.  Then there
-would be sixteen cells in total, each of which is presumably $2k\times
-2k$.  There would be eight chips, each consisting of two cells, and
-the focal plane consists of these eight chips.
-
-As another example, consider an observation by PS-1.  The focal plane
-would consist of 60 chips, each of which consist of 64 cells (or less;
-a few cells may be dead).  Some cells (those containing guide stars
-for the orthogonal transfer) will contain multiple readouts.
-
-These data structures represent containers with which to carry around
-the collection of related image data.  There is no requirement on the
-functions or the structures that each instance of one of these data
-structures represent the physical hardware.  For example, it is not
-necessary that an instance of \code{psFPA} always carry the data for
-all 60 (or 64) Gigapixel camera OTAs.  The usage of these structures
-is such that all astronomical operations which apply to a CCD image
-should be performed on an instance of \code{psFPA}.  If a particular
-circumstance only requires a single 2D image, then that is represented
-by an instance of \code{psFPA} with one \code{psChip}, which in turn
-has one \code{psCell}, which in turn has one \code{psReadout}.  
-
-The data structures defined below provide two additional features
-beyond the hierarchy of relationships.  First, each level of the
-hierarchy includes a generic \code{psMetadata} pointer to provide
-whatever metadata would be appropriate for that level.  The functions
-within PSLib do not specify the contents of those metadata containers.
-One example of their usage is provided in the documentation for the
-Pan-STARRS IPP collection of data processing modules.  
-
-While the \code{psMetadata} pointers provide a mechanism to carry
-generic information about the image, the hierarchy of data structures
-also provides an explicit set of information defining the geometrical
-relationships between the levels of the hierarchy.  Two types of
-information are provided.  In the first case, basic offsets (and in
-the case of the readouts, binning and flips) are defined to specify
-the location of a given \code{psCell} with respect to its containing
-\code{psChip} in the assumption that the pixels in the entire focal
-plane array are laid out on a uniform grid.  This is a crude
-approximation, and cannot be assumed for careful astrometric analysis,
-but it can be used as a starting point or to place the the pixels in a
-test image.  For higher precision, detailed astrometric
-transformations between one frame and the next are also provided.
-
-\tbd{in the future, it may be worthwhile to migrate all of these
-additional pieces to the psMetadata since there is no pressing need to
-have them visible in the data structures}
-
-\subsubsection{Image Data Container Hierarchy}
-
-\subsubsubsection{A Readout}
-
-A readout is the result of a single read of a cell (or a portion
-thereof).  It contains a pointer to the pixel data, and additional
-pointers to the objects found in the readout, and the readout
-metadata.  It also contains the offset from the lower-left corner of
-the chip, in the case that the CCD was windowed.
-
-\begin{verbatim}
-typedef struct {
-    const int col0;                    ///< Offset from the left of cell.
-    const int row0;                    ///< Offset from the bottom of cell.
-    const int colParity;               ///< Readout Direction X
-    const int rowParity;               ///< Readout Direction Y
-    const unsigned int colBins;        ///< Amount of binning in x-dimension
-    const unsigned int rowBins;        ///< Amount of binning in y-dimension
-    psImage* image;                    ///< imaging area of Readout
-    psMetadata* metadata;              ///< readout-level metadata
-} psReadout;
-\end{verbatim}    
-
-The constructor for \code{psReadout} shall be:
-\begin{verbatim}
-psReadout *psReadoutAlloc();
-\end{verbatim}
-All pointers in the structure shall be initialized to \code{NULL}.
-
-\subsubsubsection{A Cell}
-
-A cell consists of one or more readouts (usually only one except in the
-case that the cell has been used for fast guiding).  It also contains
-a pointer to the cell metadata, and a pointer to its parent chip.  On
-the astrometry side, it also contains coordinate transforms from the
-cell to the chip and, as a convenience, from the cell to the focal
-plane.  It is expected that these transforms will consist of two
-first-order 2D polynomials, simply specifying a translation, rotation
-and magnification; hence they are easily inverted, and there is no
-need to add reverse transformations.  We also add an additional
-transformation, which is intended to provide a ``quick and dirty''
-transform from the cell coordinates to the sky; this transformation
-not guaranteed to be as precise as the ``standard'' transformation of
-Cell $\rightarrow$ Chip $\rightarrow$ Focal Plane $\rightarrow$
-Tangent Plane $\rightarrow$ Sky, but will be faster.
-
-\begin{verbatim}
-typedef struct {
-    const int col0;                    ///< Offset from the left of chip.
-    const int row0;                    ///< Offset from the bottom of chip.
-    psArray* readouts;                 ///< readouts from the cell
-    psMetadata* metadata;              ///< cell-level metadata
-    psPlaneTransform* toChip;          ///< transformations from cell to chip coordinates
-    psPlaneTransform* toFPA;           ///< transformations from cell to FPA coordinates
-    psPlaneTransform* toSky;           ///< transformations from cell to sky coordinates
-    psChip *parent;
-} psCell;
-\end{verbatim}
-
-The constructor for \code{psCell} shall be:
-\begin{verbatim}
-psCell *psCellAlloc(int nReadouts, struct psChip *parentChip);
-\end{verbatim}
-The constructor shall make an empty \code{psCell}, with the
-\code{nReadouts} allocated pointers to \code{psReadout}s being set to
- \code{NULL}.  If \code{nreadouts} is zero or less, then 1 readout
-shall be allocated.  In either case, the value of
-\code{psCell.readouts.n} should be initially set to 0.  If the
-\code{parentChip} is not NULL, this link is made, otherwise it is set
-to \code{NULL}. All other pointers in the structure shall be
-initialized to \code{NULL}.
-
-\subsubsubsection{A Chip}
-
-A chip consists of one or more cells (according to the number of
-amplifiers on the CCD).  It contains a pointer to the chip metadata,
-and a pointer to the parent focal plane.  For astrometry, it contains
-a coordinate transform from the chip to the focal plane.  It is
-expected that this transforms will consist of two second-order 2D
-polynomials; hence we think that it is prudent to include a reverse
-transformation which will be derived from numerically inverting the
-forward transformation.
-
-\begin{verbatim}
-typedef struct {
-    const int col0;                    ///< Offset from the left of FPA.
-    const int row0;                    ///< Offset from the bottom of FPA.
-    psArray* cells;                    ///< cells in the chip
-    psMetadata* metadata;              ///< chip-level metadata
-    psPlaneTransform* toFPA;           ///< transformation from chip to FPA coordinates
-    psPlaneTransform* fromFPA;         ///< transformation from FPA to chip coordinates
-    psFPA *parent;
-} psChip;
-\end{verbatim}
-
-The constructor for \code{psChip} shall be:
-\begin{verbatim}
-psChip *psChipAlloc(int nCells, psFPA *parentFPA);
-\end{verbatim}
-The constructor shall make an empty \code{psChip}, with the
- \code{nCells} allocated pointers to \code{psCell}s being set to
- \code{NULL}.  If \code{nCells} is zero or less, then 1 cell shall be
- allocated.  In either case, the value of \code{psChip.cells.n} should
- be initially set to 0.  If the \code{parentFPA} is not NULL, this
- link is made, otherwise it is set to \code{NULL}. All other pointers
- in the structure shall be initialized to \code{NULL}.
-
-\subsubsubsection{A Focal Plane}
-
-A focal plane consists of one or more chips (according to the number
-of pieces of contiguous silicon).  It contains pointers to the focal
-plane metadata and the exposure information.  For astrometry, it
-contains a transformation from the focal plane to the tangent plane
-and the fixed pattern residuals.  It is expected that the
-transformation will consist of two 4D polynomials (i.e.\ a function of
-two coordinates in position, the magnitude of the object, and the
-color of the object) in order to correct for optical distortions and
-the effects of the atmosphere; hence we think that it is prudent to
-include a reverse transformation which will be derived from
-numerically inverting the forward transformation.  Since colors are
-involved in the transformation, it is necessary to specify the color
-the transformation is defined for.  We also include some values to
-characterize the quality of the transformation: the root mean square
-deviation for the x and y transformation fits, and the $\chi^2$ for
-the transformation fit.
-
-\begin{verbatim}
-typedef struct {
-    psArray* chips;                    ///< chips in the focal plane array
-    psMetadata* metadata;              ///< focal-plane's metadata
-    psPlaneDistort* fromTangentPlane;  ///< transformation from tangent plane to focal plane
-    psPlaneDistort* toTangentPlane;    ///< transformation from focal plane to tangent plane
-    psFixedPattern* pattern;           ///< fixed pattern residual offsets
-    const struct psExposure* exposure; ///< information about this exposure
-    const psGrommit* grommit;          ///< grommit allows conversion from tangent plane to sky
-    psPhotSystem* colorPlus;           ///< Color reference
-    psPhotSystem* colorMinus;          ///< Color reference
-    float rmsX;                        ///< RMS for x transformation fits
-    float rmsY;                        ///< RMS for y transformation fits
-    float chi2;                        ///< chi^2 of astrometric solution
-} psFPA;
-\end{verbatim}
-
-The constructor for \code{psFPA} shall be:
-\begin{verbatim}
-psFPA *psFPAAlloc(int nChips, const psExposure *exp);
-\end{verbatim}
-The constructor shall make an empty \code{psFPA}, with the
-\code{nChips} allocated pointers to \code{psChip}s being set to
-\code{NULL}.  If \code{nChips} is zero or less, then 1 chip shall be
- allocated.  In either case, the value of \code{psFPA.chips.n} should
- be initially set to 0.  If the value of \code{exp} is not
- \code{NULL}, this value shall be assigned an used to set the value of
- \code{grommit}.  Otherwise both shall be set to \code{NULL}.  All
- other pointers in the structure shall be initialized to \code{NULL}.
-
-Two utility functions are defined to manage the collection of
-backward-pointing links:
-\begin{verbatim}
-bool psFPASetLinks (psFPA *fpa);
-bool psFPATestLinks (psFPA *fpa);
-\end{verbatim}
-The first of these functions constructs the \code{parent} pointers for
-all entries in a \code{psFPA} structure.  The second structure checks
-the validity of the links in an \code{psFPA} structure and returns
-\code{TRUE} if they are all correctly assigned, otherwise \code{FALSE}.
-
-\subsubsection{Detector Coordinate Transformations}
-
-\begin{figure}
-\psfig{file=CameraLayout,width=5.5in}
-\caption{Camera Pixel Layout\label{CameraLayout}}
-\end{figure}
-
-These container levels also include in their definition the
-information needed to transform the coordinates in one of the levels
-to the coordinate system relevant at the higher levels.
-
-The data structures define the basic coordinate relationships between
-all of these data elements.  A set of offsets for each level in the
-data hierarchy specifies the location of the particular set of pixels
-in the next level of the hierarchy.  This is illustrated in
-Figure~\ref{CameraLayout}.  These offsets may be used to define the
-complete camera layout in the approximating assumption that all pixels
-in the camera are laid out on a single linear pixel grid.  This
-approximate is sufficient for many basic operations.  For more detail,
-the precise astrometric relationship between each level of the
-hierarchy may also be made available in the metadata of the data
-structures.
-
-In practice, a single readout from a detector may represent only a
-subset of the complete set of pixels addressed by the {\it cell}.  The
-readout may also have binning applied in both of the two dimensions.
-There may also be overscan and pre-scan regions in the set of pixels.
-Finally, the readout direction is not always the same for all detector
-amplifiers.  As shown in Figure~\ref{CameraLayout}, these different
-concepts are represented in the data hierarchy.  The coordinate of the
-origin of the data grid for one level of the hierarchy in the grid of
-the containing hierarchy is defined for each data level.  For example,
-the origin of the coordinates for a single chip are located in the
-camera grid at \code{psChip.cell0,row0}.  The \code{psReadout} data
-level has additional information to specify the details of the readout
-process.  The elements \code{psReadout.colParity,rowParity} specify
-the parity of the specific readout (readout direction), while the
-elements \code{psReadout.colBins,rowBins} specify the binning factor
-in the two dimensions.  Note that the value of
-\code{psReadout.col0,row0} must be assigned in such a way that it
-represents the coordinate of the origin pixel in the actual image: the
-overscan or pre-scan pixels must be accounted for.  Putting all of
-these element together, we can see that the pixel coordinates in the
-camera grid may be determined from the pixel coordinates in the image
-grid from the following relationship:
-
-\begin{verbatim}
-psFPA(cell,row) = psChip.cell0,row0 + psCell.cell0,row0 + psReadout.cell0,row0 + 
-                  psReadout.cellParity,rowParity * psReadout.cellBins,rowBins * 
-                  psImage.data(cell,row)
-\end{verbatim}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\subsection{Astrometry}
-
-Astrometry is a basic functionality required for the IPP that will be
-used repeatedly, both for low-precision (roughly where is my favorite
-object?) and high-precision (what is the proper motion of this star?).
-As such, it must be flexible, yet robust.
-
-\subsubsection{Coordinate frames}
-\label{sec:coordinateFrames}
-
-There are five coordinate frames that we need to worry about for the
-purposes of astrometry:
-\begin{itemize}
-\item Cell: $(x,y)$ in pixels --- raw coordinates;
-\item Chip: $(X,Y)$ in pixels --- the location on the silicon;
-\item Focal Plane: $(p,q)$ in microns --- the location on the focal plane;
-\item Tangent Plane: $(l,m)$ in arcsec from the telescope boresight; and
-\item Sky: (RA,Dec) --- ICRS.
-\end{itemize}
-
-The following steps are required to convert from the cell coordinates to
-the sky:
-\begin{itemize}
-\item Cell $\longleftrightarrow$ Chip: two 2D polynomials, $(X,Y) = f(x,y)$;
-\item Chip $\longleftrightarrow$ FP: two 2D polynomials, $(p,q) = g(X,Y)$;
-\item FP $\longleftrightarrow$ TP: two 4D polynomials, $(l,m) =
-h(p,q,m,c)$, where $m$ and $c$ are the magnitude and color of the
-object, respectively; and
-\item TP $\longleftrightarrow$ Sky:  transformation to the sky using
-pre-computed coefficients for each pointing.
-\end{itemize}
-
-Note that the transformation between the Focal Plane and the Tangent
-Plane is a four-dimensional polynomial, in order to account for any
-possible dependencies in the astrometry on the stellar magnitude and
-color; the former serves as a check for charge transfer
-inefficiencies, while the latter will correct chromatic refraction,
-both through the atmosphere and the corrector lenses.
-
-We require structures to contain each of the above transformations as
-well as the pixel data.
-
-\subsubsection{Position Finding}
-
-We require functions to return the structure containing given
-coordinates.  For example, we want the chip that corresponds to the
-focal plane coordinates $(p,q) = (-1.234,+5.678)$.  These routines
-handle the one-to-many problem --- i.e., for one given focal plane
-coordinate, there are many chips that this coordinate may be
-correspond to; these functions will select the correct one. 
-%
-\begin{verbatim}
-psCell *psCellInFPA (const psPlane *coord, const psFPA *fpa);
-psChip *psChipInFPA (const psPlane *coord, const psFPA *fpa);
-psCell *psCellInChip(const psPlane *coord, const psChip *chip);
-\end{verbatim}
-
-\subsubsection{Conversion Functions}
-
-We require functions to convert between the various coordinate frames
-(Section~\ref{sec:coordinateFrames}).  The hierarchy of the coordinate
-frames and the transformations between each are shown in
-Figure~\ref{fig:coco}.  The functions that employ the transformations
-are shown in Figure~\ref{fig:cocoFunc}.  In addition to
-transformations between each adjoining coordinate frame in the
-hierarchy, we also require higher-level functions to convert between
-the Cell and Sky coordinate frames; these will simply perform the
-intermediate steps.
-
-\begin{figure}
-\psfig{file=coordinateFrames,height=7in,angle=-90}
-\caption{The coordinate systems in the \PS{} IPP, and the relation
-between each by transformations contained in the appropriate
-structures.}
-\label{fig:coco}
-\end{figure}
-
-\begin{figure}
-\psfig{file=coordinateConv,height=7in,angle=-90}
-\caption{Conversion between coordinate systems by PSLib.}
-\label{fig:cocoFunc}
-\end{figure}
-
-We specify the following functions to convert between coordinates in
-one type of frame to another type of frame.  The first group consist
-of unambiguous transformations: from the coordinates in a low-level
-frame to the coordinates in the containing higher-level frame, of
-which only one exists.  In all of these functions, the output
-coordinate structure may be \code{NULL} or may be supplied by the
-calling function.  In the former case, the structure must be
-allocated; in the latter case, the supplied structure must be used.
-
-\begin{verbatim}
-psPlane *psCoordCellToChip (psPlane *out, const psPlane *in, const psCell *cell);
-% astrometry comes from cell (no need for parent)
-\end{verbatim}
-which converts coordindates \code{in} on the specified \code{cell} to
-the coordinates on the parent chip.
-
-\begin{verbatim}
-psPlane *psCoordChipToFPA (psPlane *out, const psPlane *in, const psChip *chip);
-% astrometry comes from chip (no need for parent)
-\end{verbatim}
-which converts the coordinates \code{in} on the specified \code{chip}
-to the coordinates on the parent FPA.
-
-\begin{verbatim}
-psPlane *psCoordFPAToTP(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa);
-% astrometry comes from FPA (no need for parent)
-\end{verbatim}
-which converts coordinates \code{in} on the specified focal plane
-\code{fpa} to tangent plane coordinates, applying the appropriate
-distortion terms.  The \code{color} and magnitude (\code{mag}) of the
-source is necessary in order to perform the distortion between the
-focal plane and the tangent plane.
-
-\begin{verbatim}
-psSphere *psCoordTPToSky(psSphere *out, const psPlane *in, const psGrommit *grommit);
-\end{verbatim}
-which converts the tangent plane coordinates \code{in} to (RA,Dec) on
-the sky, based on the environmental information specified by
-\code{grommit}.
-
-% astrometry comes from cell
-\begin{verbatim}
-psPlane *psCoordCellToFPA(psPlane *out, const psPlane *in, const psCell *cell);
-\end{verbatim}
-which performs the single-step conversion between Cell coordinates
-\code{in} and FPA coordinates.
-
-% astrometry comes from cell,chip,fpa (PARENT IS NEEDED HERE)
-\begin{verbatim}
-psSphere *psCoordCellToSky(psSphere *out, const psPlane *in, float color, float mag, const psCell *cell);
-\end{verbatim}
-which converts coordinates on the specified cell to (RA,Dec).  This
-transformation must be performed using the intermediate stage
-transformations of Cell to Chip, Chip to FPA, FPA to Tangent Plane,
-Tangent Plane to Sky.  The information needed for each of these
-transformations is available in the \code{.parent} elements of
-\code{psCell} and \code{psChip}, and the \code{psFPA.exposure}
-element.  The \code{color} and magnitude (\code{mag}) of the source is
-necessary in order to perform the distortion between the focal plane
-and the tangent plane.
-
-% astrometry comes from cell (no need for parent)
-\begin{verbatim}
-psSphere *psCoordCellToSkyQuick(psSphere *out, const psPlane *in, const psCell *cell);
-\end{verbatim}
-which uses the 'quick-and-dirty' transformation to convert coordinates
-on the specified cell to (RA,Dec).  This transformation should use the
-locally linear transformation specified by the element
-\code{psCell.toTP}.  Although the accuracy of this transformation
-is lower than the complete transformation above, the calculation is
-substantially faster as it only involves linear transformations.
-
-The following functions convert from high-level frames to the
-coordinates of contained lower-level frames.  
-
-\begin{verbatim}
-psPlane *psCoordSkyToTP(psPlane *out, const psSphere *in, const psGrommit *grommit);
-\end{verbatim}
-which converts (RA,Dec) coordinates \code{in} to tangent plane coords
-based on the enviromental information supplied by \code{grommit}.
-
-\begin{verbatim}
-psPlane *psCoordTPToFPA(psPlane *out, const psPlane *in, float color, float mag, const psFPA *fpa);
-\end{verbatim}
-which converts the tangent plane coordinates \code{in} to focal plane
-coordinates.  The \code{color} and magnitude (\code{mag}) of the
-source is necessary in order to perform the distortion between the
-focal plane and the tangent plane.
-
-\begin{verbatim}
-psPlane *psCoordFPAToChip (psPlane *out, const psPlane *in, const psChip *chip);
-\end{verbatim}
-which converts the specified FPA coordinates \code{in} to the
-coordinates on the given Chip.  The specified chip need not contain
-the input coordinate.  To find the chip which contains a particular
-coordinate, the function \code{psChipInFPA}, defined above, should be
-used.
-
-\begin{verbatim}
-psPlane *psCoordChipToCell (psPlane *out, const psPlane *in, const psCell *cell);
-\end{verbatim}
-which converts the specified Chip coordinate \code{in} to the
-coordinate on the given Cell.  The specified Cell need not contain the
-input coordinate.  To find the cell which contains a particular
-coordinate, the function \code{psCellInChip}, defined above, should be
-used.
-
-\begin{verbatim}
-psPlane *psCoordSkyToCell(psPlane *out, const psSphere *in, float color, float mag, psCell *cell);
-\end{verbatim}
-which directly converts (RA,Dec) \code{in} to coordinates on the
-specified cell.  The specified cell need not contain the input
-coordinates.  The \code{color} and magnitude (\code{mag}) of the
-source is necessary in order to perform the distortion between the
-focal plane and the tangent plane.
-
-\begin{verbatim}
-psPlane *psCoordSkyToCellQuick(psPlane *out, const psSphere *in, psCell *cell);
-\end{verbatim}
-which directly converts (RA,Dec) \code{in} to coordinates on the
-specified cell.  The specified cell need not contain the input
-coordinates.  This transformation should use the locally linear
-transformation specified by the element \code{psCell.toTP}.
-Although the accuracy of this transformation is lower than the
-complete transformation above, the calculation is substantially faster
-as it only involves linear transformations.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\subsection{Astrometry and World Coordinate System}
-
-The FITS World Coordinate System (WCS) headers are commonly employed
-with astronomical images in order to relate pixels to celestial (or
-otherwise) coordinates.  Since it is a FITS standard, we must be able
-to read and write from WCS into our internal format.  For the time
-being, we will consider only celestial WCS (i.e., no spectral
-wavelength calibrations, etc).  Because WCS does not support the
-multiple layers that we have built for \PS{}, we will use a simple
-internal representation: a transformation, which handles any
-distortions (i.e., goes directly from the coordinate frame of the
-image to the tangent plane); and the projection.
-
-\begin{verbatim}
-bool psAstrometryReadWCS(psPlaneTransform **transform, // Output transformation
-                         psProjection **projection, // Output projection
-                         psMetadata *header // Input FITS header
-                         );
-bool psAstrometryWriteWCS(psMetadata *header, // Output FITS header
-                          psPlaneTransform *transform, // Input transformation
-		          psProjection *projection, // Input projection
-			  double color, // Mean color to use
-			  double magnitude, // Mean magnitude to use
-                          );
-bool psAstrometrySimplify(psPlaneTransform **transform, // Output transformation
-                          psProjection **projection, // Output projection
-			  psCell *cell // Cell for which to generate transform and projection
-                          );
-\end{verbatim}			
-
-\code{pmReadAstrometry} shall parse the specified FITS \code{header},
-returning new instances of the \code{transform} and \code{projection}
-that represent the WCS.  The function shall return \code{true} if it
-was able to successfully generate the outputs; otherwise it shall
-return \code{false}.
-
-\code{pmWriteAstrometry} shall add WCS keywords to the supplied FITS
-\code{header} that implement the given \code{transform} and
-\code{projection}.  The function shall return \code{true} if it was
-able to successfully generate the output; otherwise it shall return
-\code{false}.
-
-\code{pmSimplifyAstrometry} shall take a \code{cell} and simplify the
-internal astrometric representation (\code{cell->toFPA} or equivalent,
-\code{cell->parent->parent->toTangentPlane} and
-\code{cell->parent->parent->grommit}) to a single \code{transform} and
-\code{projection}.  This allows the subsequent use of
-\code{pmWriteAstrometry} in the case that we have only the
-multi-layered \PS{} internal astrometric representation.  The function
-shall return \code{true} if it was able to successfully generate the
-output; otherwise it shall return \code{false}.
-
-\subsection{Observatory data}
-
-We need a container for the observatory data that doesn't change per
-exposure.
-
-\begin{verbatim}
-typedef struct {
-    const char *name;                   ///< Name of observatory
-    const double latitude;              ///< Latitude of observatory, east positive
-    const double longitude;             ///< Longitude of observatory
-    const double height;                ///< Height of observatory
-    const double tlr;                   ///< Tropospheric Lapse Rate
-} psObservatory;
-\end{verbatim}
-
-The constructor for \code{psObservatory} shall be:
-\begin{verbatim}
-psObservatory *psObservatoryAlloc(const char *name, double latitude, double longitude,
-                                  double height, double tlr);
-\end{verbatim}
-
-\subsection{Exposure information}
-
-We need several quantities from the telescope in order to make a
-first guess at the astrometric solution.  From these quantities,
-further quantities can be derived and stored for later use.
-
-\begin{verbatim}
-typedef struct {
-    const double ra, dec;               ///< Telescope boresight
-    const double ha;                    ///< Hour angle
-    const double zd;                    ///< Zenith distance
-    const double az;                    ///< Azimuth
-    const psTime *time;                 ///< Time of observation
-    const float rotAngle;               ///< Rotator position angle
-    const float temp;                   ///< Air temperature, for estimating refraction
-    const float pressure;               ///< Air pressure, for calculating refraction
-    const float humidity;               ///< Relative humidity, for calculating refraction
-    const float exptime;                ///< Exposure time
-    const float wavelength;             ///< Wavelength of observation
-    const psObservatory *observatory;   ///< Observatory data
-    /* Derived quantities */
-    const psTime lst;                   ///< Local Sidereal Time
-    const float posAngle;               ///< Position angle
-    const float parallactic;            ///< Parallactic angle
-    const float airmass;                ///< Airmass, calculated from zenith distance
-    const float pf;                     ///< Parallactic factor
-    const char *cameraName;             ///< name of camera which provided exposure
-    const char *telescopeName;          ///< name of telescope which provided exposure
-} psExposure;
-\end{verbatim}
-
-The constructor for \code{psExposure} shall be:
-\begin{verbatim}
-psExposure *psExposureAlloc(double ra, double dec, double ha, double zd, double az,
-                            const psTime *time, float rotAngle, float temp, float pressure, float humidity,
-                            float exptime, float wavelength, const psObservatory *observatory);
-\end{verbatim}
-
Index: unk/doc/pslib/psMathGroup.tex
===================================================================
--- /trunk/doc/pslib/psMathGroup.tex	(revision 5039)
+++ 	(revision )
@@ -1,132 +1,0 @@
-\begin{CompactItemize}
-\item 
-{\bf ps\-Bitset} $\ast$ {\bf ps\-Bitset\-Alloc} (int n)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Bitset\-Free} ({\bf ps\-Bitset} $\ast$restrict my\-Bits)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Bitset} $\ast$ {\bf ps\-Bitset\-Set} ({\bf ps\-Bitset} $\ast$restrict my\-Bits, int bit)
-\begin{CompactList}\small\item\em Set a bitset.\item\end{CompactList}\item 
-int {\bf ps\-Bitset\-Test} (const {\bf ps\-Bitset} $\ast$restrict check\-Bits, int bit)
-\begin{CompactList}\small\item\em Check a bitset.\item\end{CompactList}\item 
-{\bf ps\-Bitset} $\ast$ {\bf ps\-Bitset\-Op} ({\bf ps\-Bitset} $\ast$out\-Bits, const {\bf ps\-Bitset} $\ast$restrict in\-Bits1, char $\ast$operator, const {\bf ps\-Bitset} $\ast$restrict in\-Bits2)
-\begin{CompactList}\small\item\em apply the given operator to two bitsets\item\end{CompactList}\item 
-{\bf ps\-Bitset} $\ast$ {\bf ps\-Bitset\-Not} ({\bf ps\-Bitset} $\ast$out, {\bf ps\-Bitset} $\ast$in)
-\begin{CompactList}\small\item\em Apply unary NOT to a bitset.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-FFT} (const {\bf ps\-Vector} $\ast$vector) int dir)
-\begin{CompactList}\small\item\em $<$ FFT direction (1: forward, -1: reverse)\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Power\-Spectrum} (const {\bf ps\-Vector} $\ast$vector)
-\begin{CompactList}\small\item\em Calculate power spectrum of a vector of floating-point numbers.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Real} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Vector} $\ast$in)
-\begin{CompactList}\small\item\em Get the real part of a vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Imaginary} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Vector} $\ast$in)
-\begin{CompactList}\small\item\em Get the imaginary part of a vector.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Complex} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Vector} $\ast$real) const {\bf ps\-Vector} $\ast$imag)
-\begin{CompactList}\small\item\em $<$ imaginary part of vector\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Vector\-Conjugate} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Vector} $\ast$in)
-\begin{CompactList}\small\item\em Get the complex conjugate of an vector of complex floating-point numbers.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-FFT} (const {\bf ps\-Image} $\ast$image, int dir)
-\begin{CompactList}\small\item\em FFT an image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Power\-Spectrum} (const {\bf ps\-Image} $\ast$image)
-\begin{CompactList}\small\item\em Calculate power spectrum of an image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Real} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em Get the real part of an image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Imaginary} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em Get the imaginary part of an image.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Complex} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$real, const {\bf ps\-Image} $\ast$imag)
-\begin{CompactList}\small\item\em Construct a complex image from real \& imaginary parts.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Image\-Conjugate} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em Get the complex conjugate of an image.\item\end{CompactList}\item 
-{\bf ps\-Polynomial1D} $\ast$ {\bf ps\-Polynomial1DAlloc} (int n)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-Polynomial2D} $\ast$ {\bf ps\-Polynomial2DAlloc} (int n\-X, int n\-Y)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-Polynomial3D} $\ast$ {\bf ps\-Polynomial3DAlloc} (int n\-X, int n\-Y, int n\-Z)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-Polynomial4D} $\ast$ {\bf ps\-Polynomial4DAlloc} (int n\-W, int n\-X, int n\-Y, int n\-Z)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-Polynomial1DFree} ({\bf ps\-Polynomial1D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-Polynomial2DFree} ({\bf ps\-Polynomial2D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-Polynomial3DFree} ({\bf ps\-Polynomial3D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-Polynomial4DFree} ({\bf ps\-Polynomial4D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-float {\bf ps\-Polynomial1DEval} (float x, const {\bf ps\-Polynomial1D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 1D polynomial.\item\end{CompactList}\item 
-float {\bf ps\-Polynomial2DEval} (float x, float y, const {\bf ps\-Polynomial2D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 2D polynomial.\item\end{CompactList}\item 
-float {\bf ps\-Polynomial3DEval} (float x, float y, float z, const {\bf ps\-Polynomial3D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 3D polynomial.\item\end{CompactList}\item 
-float {\bf ps\-Polynomial4DEval} (float w, float x, float y, float z, const {\bf ps\-Polynomial4D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 4D polynomial.\item\end{CompactList}\item 
-{\bf ps\-DPolynomial1D} $\ast$ {\bf ps\-DPolynomial1DAlloc} (int n)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-DPolynomial2D} $\ast$ {\bf ps\-DPolynomial2DAlloc} (int n\-X, int n\-Y)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-DPolynomial3D} $\ast$ {\bf ps\-DPolynomial3DAlloc} (int n\-X, int n\-Y, int n\-Z)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-DPolynomial4D} $\ast$ {\bf ps\-DPolynomial4DAlloc} (int n\-W, int n\-X, int n\-Y, int n\-Z)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-void {\bf ps\-DPolynomial1DFree} ({\bf ps\-DPolynomial1D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-DPolynomial2DFree} ({\bf ps\-DPolynomial2D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-DPolynomial3DFree} ({\bf ps\-DPolynomial3D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-void {\bf ps\-DPolynomial4DFree} ({\bf ps\-DPolynomial4D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-double {\bf ps\-DPolynomial1DEval} (double x, const {\bf ps\-DPolynomial1D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 1D polynomial (double precision).\item\end{CompactList}\item 
-double {\bf ps\-DPolynomial2DEval} (double x, double y, const {\bf ps\-DPolynomial2D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 2D polynomial (double precision).\item\end{CompactList}\item 
-double {\bf ps\-DPolynomial3DEval} (double x, double y, double z, const {\bf ps\-DPolynomial3D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 3D polynomial (double precision).\item\end{CompactList}\item 
-double {\bf ps\-DPolynomial4DEval} (double w, double x, double y, double z, const {\bf ps\-DPolynomial4D} $\ast$restrict my\-Poly)
-\begin{CompactList}\small\item\em Evaluate 4D polynomial (double precision).\item\end{CompactList}\item 
-{\bf ps\-Type} $\ast$ {\bf ps\-Binary\-Op} (void $\ast$out, void $\ast$in1, char $\ast$op, void $\ast$in2)
-\begin{CompactList}\small\item\em Perform a binary operation on two data items ({\bf ps\-Image} {\rm (p.\,\pageref{structpsImage})}, {\bf ps\-Vector} {\rm (p.\,\pageref{structpsVector})}, ps\-Scalar).\item\end{CompactList}\item 
-{\bf ps\-Type} $\ast$ {\bf ps\-Unary\-Op} (void $\ast$out, void $\ast$in, char $\ast$op)
-\begin{CompactList}\small\item\em Perform a unary operation on two data items ({\bf ps\-Image} {\rm (p.\,\pageref{structpsImage})}, {\bf ps\-Vector} {\rm (p.\,\pageref{structpsVector})}, ps\-Scalar).\item\end{CompactList}\item 
-{\bf p\_\-ps\-Scalar} $\ast$ {\bf ps\-Scalar} (double value)
-\begin{CompactList}\small\item\em create a {\bf ps\-Type} {\rm (p.\,\pageref{structpsType})}-ed structure from a constant double value.\item\end{CompactList}\item 
-{\bf p\_\-ps\-Scalar} $\ast$ {\bf ps\-Scalar\-Type} (char $\ast$mode,...)
-\begin{CompactList}\small\item\em create a {\bf ps\-Type} {\rm (p.\,\pageref{structpsType})}-ed structure from a specified type\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Matrix\-Invert} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$my\-Matrix, float $\ast$restrict determinant)
-\begin{CompactList}\small\item\em Invert matrix.\item\end{CompactList}\item 
-float {\bf ps\-Matrix\-Determinant} (const {\bf ps\-Image} $\ast$restrict my\-Matrix)
-\begin{CompactList}\small\item\em Matrix determinant.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Matrix\-Multiply} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$in1, const {\bf ps\-Image} $\ast$in2)
-\begin{CompactList}\small\item\em Matrix operation: addition, subtraction, multiplication.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Matrix\-Transpose} ({\bf ps\-Image} $\ast$out, const {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em Transpose Matrix.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Matrix\-LUD} ({\bf ps\-Image} $\ast$out, {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em LU Decomposition of a matrix.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Matrix\-LUSolve} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Image} $\ast$LU, const {\bf ps\-Vector} $\ast$RHS)
-\begin{CompactList}\small\item\em LU Solution.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Matrix\-Eigenvectors} ({\bf ps\-Image} $\ast$my\-Matrix)
-\begin{CompactList}\small\item\em Eigenvectors of a matrix.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Matrix\-To\-Vector} ({\bf ps\-Vector} $\ast$out, {\bf ps\-Image} $\ast$in)
-\begin{CompactList}\small\item\em Convert matrix to vector.\item\end{CompactList}\item 
-{\bf ps\-Image} $\ast$ {\bf ps\-Vector\-To\-Matrix} ({\bf ps\-Image} $\ast$out, {\bf ps\-Vector} $\ast$in)
-\begin{CompactList}\small\item\em Convert vector to matrix.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Minimize} ({\bf ps\-Vector} $\ast$restrict initial\-Guess, float($\ast$my\-Function)(const {\bf ps\-Vector} $\ast$restrict, const {\bf ps\-Vector} $\ast$restrict), float($\ast$my\-Func\-Deriv)(const {\bf ps\-Vector} $\ast$restrict, const {\bf ps\-Vector} $\ast$restrict), const {\bf ps\-Vector} $\ast$restrict param\-Mask)
-\begin{CompactList}\small\item\em Find the minimum of a particular non-linear function.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Minimize\-Chi2} ({\bf ps\-Vector} $\ast$restrict initial\-Guess, float($\ast$eval\-Model)(const {\bf ps\-Vector} $\ast$restrict, const {\bf ps\-Vector} $\ast$restrict), const {\bf ps\-Vector} $\ast$restrict domain, const {\bf ps\-Vector} $\ast$restrict data, const {\bf ps\-Vector} $\ast$restrict errors, const {\bf ps\-Vector} $\ast$restrict param\-Mask, float Chi\-Sq)
-\begin{CompactList}\small\item\em Minimize chi$^\wedge$2 for input data.\item\end{CompactList}\item 
-{\bf ps\-Polynomial1D} $\ast$ {\bf ps\-Vector\-Fit\-Polynomial} ({\bf ps\-Polynomial1D} my\-Poly, const {\bf ps\-Vector} $\ast$restrict x, const {\bf ps\-Vector} $\ast$restrict y, const {\bf ps\-Vector} $\ast$restrict y\-Err)
-\begin{CompactList}\small\item\em Derive a polynomial fit by chi$^\wedge$2 minimisation --- can be done analytically.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Sort} ({\bf ps\-Vector} $\ast$out, const {\bf ps\-Vector} $\ast$restrict in)
-\begin{CompactList}\small\item\em Sort an array.\item\end{CompactList}\item 
-{\bf ps\-Vector} $\ast$ {\bf ps\-Sort\-Index} ({\bf ps\-Vector} $\ast$restrict out, const {\bf ps\-Vector} $\ast$restrict in)
-\begin{CompactList}\small\item\em Sort an array, along with some other stuff.\item\end{CompactList}\item 
-{\bf ps\-Stats} $\ast$ {\bf ps\-Vector\-Stats} ({\bf ps\-Stats} $\ast$stats, const {\bf ps\-Vector} $\ast$restrict my\-Array, const {\bf ps\-Vector} $\ast$restrict mask\-Array, unsigned int mask\-Val)
-\begin{CompactList}\small\item\em Do Statistics on a vector.\item\end{CompactList}\item 
-{\bf ps\-Histogram} $\ast$ {\bf ps\-Histogram\-Alloc} (float lower, float upper, int n)
-\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
-{\bf ps\-Histogram} $\ast$ {\bf ps\-Histogram\-Alloc\-Generic} (const {\bf ps\-Vector} $\ast$restrict bounds)
-\begin{CompactList}\small\item\em Generic constructor.\item\end{CompactList}\item 
-void {\bf ps\-Histogram\-Free} ({\bf ps\-Histogram} $\ast$restrict my\-Hist)
-\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
-{\bf ps\-Histogram} $\ast$ {\bf ps\-Histogram\-Vector} ({\bf ps\-Histogram} $\ast$restrict my\-Hist, const {\bf ps\-Vector} $\ast$restrict my\-Array)
-\begin{CompactList}\small\item\em Calculate a histogram.\item\end{CompactList}\end{CompactItemize}
Index: unk/doc/pslib/psStructures.tex
===================================================================
--- /trunk/doc/pslib/psStructures.tex	(revision 5039)
+++ 	(revision )
@@ -1,45 +1,0 @@
-\begin{CompactList}
-\item\contentsline{section}{{\bf p\_\-ps\-Scalar} (Private structure used to pass constant values into the math operators)}{\pageref{structp__psScalar}}{}
-\item\contentsline{section}{{\bf ps\-Bitset} (A bitset of arbitrary length)}{\pageref{structpsBitset}}{}
-\item\contentsline{section}{{\bf ps\-Catalogue\-Objects} (Objects from a catalogue)}{\pageref{structpsCatalogueObjects}}{}
-\item\contentsline{section}{{\bf ps\-Cell} (A Cell: a collection of readouts)}{\pageref{structpsCell}}{}
-\item\contentsline{section}{{\bf ps\-Chip} (A Chip: a collection of cells)}{\pageref{structpsChip}}{}
-\item\contentsline{section}{{\bf ps\-Dlist} (Doubly-linked list)}{\pageref{structpsDlist}}{}
-\item\contentsline{section}{{\bf ps\-Dlist\-Elem} (Doubly-linked list element)}{\pageref{structpsDlistElem}}{}
-\item\contentsline{section}{{\bf ps\-DPolynomial1D} (Double-precision one-dimensional polynomial)}{\pageref{structpsDPolynomial1D}}{}
-\item\contentsline{section}{{\bf ps\-DPolynomial2D} (Double-precision two-dimensional polynomial)}{\pageref{structpsDPolynomial2D}}{}
-\item\contentsline{section}{{\bf ps\-DPolynomial3D} (Double-precision three-dimensional polynomial)}{\pageref{structpsDPolynomial3D}}{}
-\item\contentsline{section}{{\bf ps\-DPolynomial4D} (Double-precision four-dimensional polynomial)}{\pageref{structpsDPolynomial4D}}{}
-\item\contentsline{section}{{\bf ps\-Err} }{\pageref{structpsErr}}{}
-\item\contentsline{section}{{\bf ps\-Error\-Description} }{\pageref{structpsErrorDescription}}{}
-\item\contentsline{section}{{\bf ps\-Exposure} (Exposure information from the telescope)}{\pageref{structpsExposure}}{}
-\item\contentsline{section}{{\bf ps\-Fixed\-Pattern} (The fixed pattern residual offsets)}{\pageref{structpsFixedPattern}}{}
-\item\contentsline{section}{{\bf ps\-FPA} (A Focal plane array: a collection of chips)}{\pageref{structpsFPA}}{}
-\item\contentsline{section}{{\bf ps\-Grommit} (Information needed (by SLALIB) to convert Apparent to Observed Position)}{\pageref{structpsGrommit}}{}
-\item\contentsline{section}{{\bf ps\-Histogram} (Histograms)}{\pageref{structpsHistogram}}{}
-\item\contentsline{section}{{\bf ps\-Image} (Basic image data structure)}{\pageref{structpsImage}}{}
-\item\contentsline{section}{{\bf ps\-Image\-Objects} (Associates objects on an image with the image)}{\pageref{structpsImageObjects}}{}
-\item\contentsline{section}{{\bf ps\-Mem\-Block} (Book-keeping data for storage allocator)}{\pageref{structpsMemBlock}}{}
-\item\contentsline{section}{{\bf ps\-Metadata} (A set of metadata)}{\pageref{structpsMetadata}}{}
-\item\contentsline{section}{{\bf ps\-Metadata\-Item} (A struct to define a single item of metadata)}{\pageref{structpsMetadataItem}}{}
-\item\contentsline{section}{{\bf ps\-Object} (Object definition, to handle both objects we detect, and catalogues)}{\pageref{structpsObject}}{}
-\item\contentsline{section}{{\bf ps\-Object\-Array} (An assembly of objects)}{\pageref{structpsObjectArray}}{}
-\item\contentsline{section}{{\bf ps\-Phot\-System} (Photometry system definition)}{\pageref{structpsPhotSystem}}{}
-\item\contentsline{section}{{\bf ps\-Phot\-Transform} (Photometry transformations)}{\pageref{structpsPhotTransform}}{}
-\item\contentsline{section}{{\bf ps\-Plane} (A point in 2-D space, with errors)}{\pageref{structpsPlane}}{}
-\item\contentsline{section}{{\bf ps\-Plane\-Distort} (The optical distortion terms)}{\pageref{structpsPlaneDistort}}{}
-\item\contentsline{section}{{\bf ps\-Plane\-Transform} (A polynomial transformation between coordinate frames)}{\pageref{structpsPlaneTransform}}{}
-\item\contentsline{section}{{\bf ps\-Polynomial1D} (One-dimensional polynomial)}{\pageref{structpsPolynomial1D}}{}
-\item\contentsline{section}{{\bf ps\-Polynomial2D} (Two-dimensional polynomial)}{\pageref{structpsPolynomial2D}}{}
-\item\contentsline{section}{{\bf ps\-Polynomial3D} (Three-dimensional polynomial)}{\pageref{structpsPolynomial3D}}{}
-\item\contentsline{section}{{\bf ps\-Polynomial4D} (Four-dimensional polynomial)}{\pageref{structpsPolynomial4D}}{}
-\item\contentsline{section}{{\bf ps\-Projection} (Spherical $<$-$>$ Linear projections)}{\pageref{structpsProjection}}{}
-\item\contentsline{section}{{\bf ps\-Readout} (A Readout: a collection of pixels)}{\pageref{structpsReadout}}{}
-\item\contentsline{section}{{\bf ps\-Sphere} (A point on the surface of a sphere, with errors)}{\pageref{structpsSphere}}{}
-\item\contentsline{section}{{\bf ps\-Sphere\-Transform} (General spherical transformation)}{\pageref{structpsSphereTransform}}{}
-\item\contentsline{section}{{\bf ps\-Stats} (Generic statistics structure)}{\pageref{structpsStats}}{}
-\item\contentsline{section}{{\bf ps\-Super\-Object} (A \char`\"{}super\char`\"{} object --- an object with multiple detections in different images)}{\pageref{structpsSuperObject}}{}
-\item\contentsline{section}{{\bf ps\-Time} (Ps\-Time is the time structure we will use throughout)}{\pageref{structpsTime}}{}
-\item\contentsline{section}{{\bf ps\-Type} (The type of a data type)}{\pageref{structpsType}}{}
-\item\contentsline{section}{{\bf ps\-Vector} (Basic vector data structure)}{\pageref{structpsVector}}{}
-\end{CompactList}
Index: unk/doc/pslib/psSystemGroup.tex
===================================================================
--- /trunk/doc/pslib/psSystemGroup.tex	(revision 5039)
+++ 	(revision )
@@ -1,60 +1,0 @@
-\begin{CompactItemize}
-\item 
-int {\bf ps\-Log\-Set\-Destination} (int dest)
-\begin{CompactList}\small\item\em Sets the log destination.\item\end{CompactList}\item 
-int {\bf ps\-Log\-Set\-Level} (int level)
-\begin{CompactList}\small\item\em Sets the log level.\item\end{CompactList}\item 
-void {\bf ps\-Log\-Set\-Format} (const char $\ast$fmt)
-\begin{CompactList}\small\item\em sets the log format\item\end{CompactList}\item 
-void {\bf ps\-Log\-Msg} (const char $\ast$name, int my\-Level, const char $\ast$fmt,...)
-\begin{CompactList}\small\item\em Logs a message.\item\end{CompactList}\item 
-void {\bf ps\-Log\-Msg\-V} (const char $\ast$name, int my\-Level, const char $\ast$fmt, va\_\-list ap)
-\begin{CompactList}\small\item\em Logs a message from varargs.\item\end{CompactList}\item 
-void $\ast$ {\bf p\_\-ps\-Alloc} (size\_\-t size, const char $\ast$file, int lineno)
-\begin{CompactList}\small\item\em Memory allocation. Underlying private function called by macro ps\-Alloc.\item\end{CompactList}\item 
-void $\ast$ {\bf p\_\-ps\-Realloc} (void $\ast$ptr, size\_\-t size, const char $\ast$file, int lineno)
-\begin{CompactList}\small\item\em Memory re-allocation. Underlying private function called by macro ps\-Realloc.\item\end{CompactList}\item 
-void {\bf p\_\-ps\-Free} (void $\ast$ptr, const char $\ast$file, int lineno)
-\begin{CompactList}\small\item\em Free memory. Underlying private function called by macro ps\-Free.\item\end{CompactList}\item 
-int {\bf ps\-Mem\-Check\-Leaks} (int id0, {\bf ps\-Mem\-Block} $\ast$$\ast$$\ast$arr, FILE $\ast$fd)
-\begin{CompactList}\small\item\em Check for memory leaks.\item\end{CompactList}\item 
-int {\bf ps\-Mem\-Check\-Corruption} (int abort\_\-on\_\-error)
-\begin{CompactList}\small\item\em Check for memory corruption.\item\end{CompactList}\item 
-int {\bf ps\-Mem\-Get\-Ref\-Counter} (void $\ast$vptr)
-\begin{CompactList}\small\item\em Return reference counter.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Mem\-Incr\-Ref\-Counter} (void $\ast$vptr)
-\begin{CompactList}\small\item\em Increment reference counter and return the pointer.\item\end{CompactList}\item 
-void $\ast$ {\bf ps\-Mem\-Decr\-Ref\-Counter} (void $\ast$vptr)
-\begin{CompactList}\small\item\em Decrement reference counter and return the pointer.\item\end{CompactList}\item 
-{\bf ps\-Mem\-Problem\-Callback} {\bf ps\-Mem\-Problem\-Callback\-Set} ({\bf ps\-Mem\-Problem\-Callback} func)
-\begin{CompactList}\small\item\em Set callback for problems.\item\end{CompactList}\item 
-{\bf ps\-Mem\-Exhausted\-Callback} {\bf ps\-Mem\-Exhausted\-Callback\-Set} ({\bf ps\-Mem\-Exhausted\-Callback} func)
-\begin{CompactList}\small\item\em Set callback for out-of-memory.\item\end{CompactList}\item 
-{\bf ps\-Mem\-Allocate\-Callback} {\bf ps\-Mem\-Allocate\-Callback\-Set} ({\bf ps\-Mem\-Allocate\-Callback} func)
-\begin{CompactList}\small\item\em Set call back for when a particular memory block is allocated.\item\end{CompactList}\item 
-{\bf ps\-Mem\-Free\-Callback} {\bf ps\-Mem\-Free\-Callback\-Set} ({\bf ps\-Mem\-Free\-Callback} func)
-\begin{CompactList}\small\item\em Set call back for when a particular memory block is freed.\item\end{CompactList}\item 
-int {\bf ps\-Mem\-Get\-Id} (void)
-\begin{CompactList}\small\item\em get next memory ID\item\end{CompactList}\item 
-long {\bf ps\-Mem\-Allocate\-IDSet} (long id)
-\begin{CompactList}\small\item\em set p\_\-ps\-Mem\-Allocate\-ID to id\item\end{CompactList}\item 
-long {\bf ps\-Mem\-Free\-IDSet} (long id)
-\begin{CompactList}\small\item\em set p\_\-ps\-Mem\-Free\-ID to id\item\end{CompactList}\item 
-void {\bf ps\-Abort} (const char $\ast$name, const char $\ast$fmt,...)
-\begin{CompactList}\small\item\em Prints an error message and aborts.\item\end{CompactList}\item 
-char $\ast$ {\bf ps\-String\-Copy} (const char $\ast$str)
-\begin{CompactList}\small\item\em Allocates and returns a copy of a string.\item\end{CompactList}\item 
-char $\ast$ {\bf ps\-String\-NCopy} (const char $\ast$str, int n\-Char)
-\begin{CompactList}\small\item\em Allocates n\-Char and returns a copy of the string or segment.\item\end{CompactList}\item 
-void {\bf p\_\-ps\-Trace} (const char $\ast$facil, int my\-Level,...)
-\begin{CompactList}\small\item\em Send a trace message.\item\end{CompactList}\item 
-int {\bf ps\-Trace\-Set\-Level} (const char $\ast$facil, int level)
-\begin{CompactList}\small\item\em Set trace level.\item\end{CompactList}\item 
-int {\bf ps\-Trace\-Get\-Level} (const char $\ast$facil)
-\begin{CompactList}\small\item\em Get the trace level.\item\end{CompactList}\item 
-void {\bf ps\-Trace\-Reset} (void)
-\begin{CompactList}\small\item\em turn off all tracing, and free trace's allocated memory\item\end{CompactList}\item 
-void {\bf ps\-Trace\-Print\-Levels} (void)
-\begin{CompactList}\small\item\em print trace levels\item\end{CompactList}\item 
-void {\bf ps\-Trace\-Set\-Destination} (FILE $\ast$fp)
-\begin{CompactList}\small\item\em Set destination for tracing.\item\end{CompactList}\end{CompactItemize}
