Index: trunk/doc/stamps/stampsICD.tex
===================================================================
--- trunk/doc/stamps/stampsICD.tex	(revision 27211)
+++ trunk/doc/stamps/stampsICD.tex	(revision 27212)
@@ -83,8 +83,7 @@
 The postage stamp server supports three types of "postage stamp" job specified by the value
 the column \code{JOB_TYPE}. If the value is \emph{stamp} postage stamp images will be extracted
-from the images of interest.  If the value of \code{JOB_TYPE} is \emph{get\_image} a copy
-of the selected image(s) with (satellite streaks removed) will be placed on the output file set.
-Finally if the \code{JOB_TYPE} is \emph{list} the results file will list the input selected images
-but no postage stamps will be made.
+from the images of interest.  If the value of \code{JOB_TYPE} is \emph{get\_image} 
+the data from the selected images' "runs"  with (satellite streaks removed) are bundled
+in and placed on the output file set.
 
 \begin{table}[h]
@@ -97,5 +96,5 @@
 \hline
 \code{ROWNUM}   & U32       &                           &        must be unique in file\\
-\code{PROJECT}  & string    & TBD                       &        \\
+\code{PROJECT}  & string    & gpc1                      &        \\
 \code{JOB_TYPE} & string    & stamp or get\_image       &        \\
 \\
@@ -114,8 +113,10 @@
 \code{HEIGHT}   &  F64      & see text                  &        not null if \code{JOB_TYPE} = stamp \\
 \\
-\code{REQFILT}  &   string  & any                       &        used only for \code{REQ_TYPE} = bycoord \\
-\code{MJD_MIN}  &   F64     & Modified Julian Day       &        used only for \code{REQ_TYPE} = bycoord \\
-\code{MJD_MAX}  &   F64     &                           &        used only for \code{REQ_TYPE} = bycoord \\
-\\
+\code{DATA_GROUP} &   string  & any                      & \\
+\code{REQFILT}  &   string  & any                       & \\
+\code{MJD_MIN}  &   F64     & Modified Julian Day       & \\
+\code{MJD_MAX}  &   F64     &                           & \\
+\\
+\code{COMMENT}  &   string  & copied to the results flie & \\
 \hline
 \end{tabular}
@@ -138,5 +139,5 @@
 IMG\_TYPE that contain the center.
 The set of images of interest may be limited by specifying certain criteria as described
-in Section \ref{ImageFilters}. NOTE: this request type is not yet implemented.
+in Section \ref{ImageCuts}. NOTE: this request type is not yet implemented.
 
 \item{\textbf{byexp}}  The image of interest is the image resulting from a particular exposure 
@@ -153,9 +154,11 @@
 value for COMPONENT from the tessellation identified by TESS\_ID. This request type may be
 used only with IMG\_TYPE warp, stack, and diff.
-The set of images may be limited by filter and date as described in Section \ref{ImageFilters}.
+The set of images may be limited by filter and date as described in Section \ref{ImageCuts}.
 NOTE: this request type is not yet implemented.
 
 \end{itemize}
 
+Note that at this time the REQ\_TYPE byexp is not implemented for IMG\_TYPE stack.
+
 COMPONENT must also be supplied for request specifications where all of the following are true
 
@@ -172,12 +175,16 @@
 The special value 'all' may be used to select all component images but this is not recommended.
 
-\subsubsection{Image Selection Filters}\label{ImageFilters}
-
-A request for given celestial coordinates may refer to many images. The scope of the search can be
+\subsubsection{Image Selection Cuts}\label{ImageCuts}
+
+A request specification may refer to many images. The scope of the search can be
 limited to certain dates with the parameters MJD\_MIN and MJD\_MAX. The specified range is inclusive.
+Note: these cuts have no effect for stack stage requests.
+
+DATA\_GROUP restricts the search to runs with the given value. Note that the SQL database lookups
+are done with a "LIKE" comparison so SQL wild cards may be used.
 
 The REQFILT parameter may be used to restrict the search for images taken with a given filter.
-XXX: What is the name space for filter names.  For example Megacam has filter names like U.9301 which
-IPP maps to u.  Which name do we allow?  Perhaps use a LIKE query.
+If the filter is a single character (g, r, i, z, y) the server appends a '\%' character to the
+sql query.
 
 
@@ -224,8 +231,8 @@
 the stamps are created the cells are mosaicked into a single image.) 
 
-Any fractional parts in pixel coordinate values are ignored.
-
-The value of \code{OPTION\_MASK} is used to select various other options. It is a bitwise or of the following
-values.
+Any fractional parts in pixel coordinate values are ignored. (XXX: is that true?)
+
+For JOB\_TYPE stamp the value of \code{OPTION\_MASK} is used to select various other options.
+It is a bitwise OR of the following values.
 
 \begin{table}[h]
@@ -240,16 +247,23 @@
 2                       &   create postage stamp of the mask pixels \\
 4                       &   create postage stamp of the variance pixels \\
-1024                    &   select images based on inverse difference images \\
-\hline
-\end{tabular}
-\end{center}
-\end{table}
-
-Note that bit zero is currently ignored. A stamp of the image pixels is always included.
-
-For requests with IMG\_TYPE diff or if \code{REQ_TYPE} is bydiff \code{if (OPTION_MASK & 1024)} and
-the corresponding difference run is a warp versus warp diff (bothways) the images
-are selected based on the 'inverse' difference images. If this bit is zero the 'positive'
-images are selected;
+8                       &   return the sources file (.cmf) for the images' run \\
+16                      &   return the psf file for the images' run \\
+32                      &   return the background model file for the images chipRun (applies only for chip) \\
+1024                    &   make stamps from inverse difference images (applies only for diff) \\
+2048                    &   make stamps from unconvolved stack images (applies only for stack) \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+If a bit is set in the OPTION\_MASK that doesn't apply to a particular IMG\_TYPE it is silently ignored.
+
+Note that bit zero is also currently ignored. A stamp of the image pixels is always included in the
+results.
+
+For requests with IMG\_TYPE diff or if \code{REQ_TYPE} is bydiff and 
+the corresponding difference run is a 'bothways' diff the images are selected based on the inverse difference
+images if \code{(OPTION_MASK & 1024)} is non-zero. Otherwise from the images are selected based
+on the 'positive' images.
 
 
@@ -322,4 +336,6 @@
 \code{MJD_MIN}  &   F64     & \\
 \code{MJD_MAX}  &   F64     & \\
+\code{DATA_GROUP}  &   string     & \\
+\code{COMMENT}  &   string     & \\
 \\
 \hline
@@ -372,4 +388,5 @@
 PSTAMP\_GONE              & 26 &     Image is no longer available \\
 PSTAMP\_NO\_JOBS\_QUEUED  & 27 &   Request specification yielded no jobs. See parse\_error.txt \\
+PSTAMP\_NO\_OVERLAP       & 28 &   Center not contained in any image of interest \\
 
 \hline
