Index: /trunk/doc/design/ippSSDD.tex
===================================================================
--- /trunk/doc/design/ippSSDD.tex	(revision 6048)
+++ /trunk/doc/design/ippSSDD.tex	(revision 6049)
@@ -1,3 +1,3 @@
-%%% $Id: ippSSDD.tex,v 1.3 2006-01-19 01:05:28 eugene Exp $
+%%% $Id: ippSSDD.tex,v 1.4 2006-01-19 03:51:41 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -2750,7 +2750,66 @@
 
 \subsection{psastro}
-Like psphot, psastro may be run as a stand-alone program or as a
-library.  This 
-
+
+This section discusses the design of psastro in general terms.  For
+more specific usage information, see the document on psastro.  Like
+psphot, psastro may be run as a stand-alone program or as a library.
+This routine performs astrometric calibration of a collection of
+sources from an image or a set of images.  As a stand-alone program,
+the input to psastro is an image file or set of images files
+representing data from single FPA.  Like ppImage, the input image or
+images may be specified as a single file, a glob, or Nebulous storage
+object IDs.  The heart of the psastro routine is wrapped with a loop
+similar to the one used for ppImage.  The primary difference between
+the two is that psastro expect a collection of files representing
+sources detected in an image, rather than the pixels from an image.
+Several standard source file formats, discussed in the psphot
+documentation may be read.  The sources which are loaded are added to
+the FPA heirarchy at the appropriate level, as part of the metadata
+collection associated with a given level.  As a library function,
+psastro is passed an assembled FPA structure with the sources already
+placed in the appropriate locations in the metadata containers.
+
+Psastro has three major modes, which are used in each of Phases 1, 2,
+and 3.
+
+In the conceptualy most straightforeward mode, each readout contained
+in the incoming FPA structure is treated independently.  The metadata
+describing the approximate astrometry of the readout are used to guess
+the coordinates of the sources and to select likely reference sources
+from the selected reference catalog.  The observed sources are matched
+to the reference sources, using either a two-point grid search or
+optionally a \tbd{triangle match}.  Once an approximate match is
+found, a linear fit between detector coordinates an projected
+celestial coordinates is attempted.  The projected coordinate system
+may optionally make use of the default telescope distortion model, if
+it is known.  The radius of the match between observed and reference
+sources is reduced to improve the statistics of the match.  This
+anaysis mode is used in the Phase 2 processing.
+
+The second type of psastro analysis is used by Phase 3 to improve the
+solution determined in Phase 3.  In this analysis, psastro expects
+detections from a complete mosaic FPA of chips.  A complete mosaic
+solution is performed in which a single distortion model is used for
+the telescope optics and additional linear or higher order terms.
+This analysis breaks the degeneracy of the chip position / telescope
+distortion by fitting the local gradient of the distortion on chips to
+model the telescope distortion.  The result of this analysis is a
+complete mosaic astrometry model, consisting of (at the moment) 3rd
+order polynomials for the telescope distortion and up to 3rd order
+polynomials for each of the individual chips.
+
+In the third mode, a collection of detections from across a full
+mosaic are used, in conjunction with a model for the chip positions
+and the telescope / optical distortion, to determine a single
+low-order model for the complete FPA.  In this model, only the
+boresite coordinates, rotation, and X and Y plate scales are allowed
+to vary.  This analysis is used for the Phase 1 analysis, in
+conjunction with an implementation of psphot. 
+
+For any complete mosaic, there are three complementary representations
+of the astrometric solution which are used within the IPP.  The most
+basic description of the astrometry is the collection of header
+keywords which define the boresite center coordinates (RA, DEC), the
+rotation and platescales
 
 \section{Interfaces}
@@ -3758,5 +3817,5 @@
 ------
 
-* top-level routines
+* poisub / stack
 * re-org the Phase 4 stuff to discuss Magic
 * astrometry calibration data formats
