Index: trunk/doc/ipptools/pstask.tex
===================================================================
--- trunk/doc/ipptools/pstask.tex	(revision 4900)
+++ trunk/doc/ipptools/pstask.tex	(revision 4902)
@@ -508,3 +508,275 @@
 above, the 'process' stage is a null operation.
 
+\section{Metadata Database Tables used for IPP Job Flow}
+\label{sec:MetadataTableContents}
+
+The tables presented here define in greater detail the contents of the
+Metadata tables show in the figures above.  In some cases, the
+quantities (eg, the analysis result statistics) are illustrative, not
+definitive.  In certain tables, data is provided which is redundant
+(non-normal) for ease of use.  In some cases, we may decide not to
+keep this redundant information.  In cases where the choice to
+replicate the redundant information is uncertain, the field names are
+written in {\it italics}.
+
+\begin{table}[bh]
+\begin{center}
+\caption{Pending Image Files\label{tab:PendingImageFiles}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+URL               & string          & file location	       & http://data/file001.fits  \\
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+{\it camera}	  & string	    & camera name	       & MegaPrime / GPC           \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+class ID	  & string	    & identify for class       & chip00 / cell0102	   \\
+state		  & string	    & state of transfer?       & ready / copied		   \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{New Image Files\label{tab:NewImageFiles}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+URL               & string          & file location	       & neb://file001.fits        \\
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+class ID	  & string	    & identify for class       & chip00 / cell0102	   \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{Raw Image Files\label{tab:RawImageFiles}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+URL               & string          & file location	       & neb://file001.fits        \\
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+class ID	  & string	    & identify for class       & chip00 / cell0102	   \\
+type		  & string	    & exposure type	       & bias / flat / science	   \\
+Nreadout	  & int		    & number of readouts       & 1 / 5 / 100		   \\
+Treadout	  & float	    & readout exposure time    & 1.0 (sec)		   \\
+ccdtemp		  & float	    & detector temperature     & 90 (K)			   \\
+\hline
+background	  & float	    & data area median	       & 5.0 (sec)		   \\
+FHWM		  & float	    & average image quality    & 2.5 (arcsec)		   \\
+\hline
+\multicolumn{3}{l}{note: stats below the line are measured, perhaps they go elsewhere?}	   \\
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{Pending Metadata Tables\label{tab:PendingTables}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+URL               & string          & file location	       & neb://file001.fits        \\
+table ID	  & string	    & unique table identifier  & table-654321 		   \\
+table type	  & string	    & table content type       & temps / skyprobe data     \\
+state    	  & string	    & copied?                  & ready / copied		   \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{Copied Metadata Tables\label{tab:CopiedTables}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+URL               & string          & file location	       & neb://file001.fits        \\
+table ID	  & string	    & unique table identifier  & table-654321 		   \\
+table type	  & string	    & table content type       & temps / skyprobe data     \\
+state    	  & string	    & copied?                  & ready / copied		   \\
+time		  & int		    & table arrival time       & 13243413 (s)		   \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{New Exposures\label{tab:NewExp}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+telescope	  & string	    & telescope name	       & CFHT / PS-1 / SP-1        \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+Nfiles		  & int		    & number image files       & 64			   \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{Raw SCIENCE Exposure\label{tab:RawScienceExp}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+telescope	  & string	    & telescope name	       & CFHT / PS-1 / SP-1        \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+Nfiles		  & int		    & number of image files    & 1 / 64			   \\
+\hline
+exptime		  & float	    & exposure time	       & 10.0 (seconds)		   \\
+filter.ID	  & string	    & filter ID (glass)	       & g.PS1.01		   \\
+filter.Band	  & string	    & filter bandpass name     & g			   \\
+airmass		  & float	    & sec(zenith angle)	       & 1.35			   \\
+RA		  & float	    & boresite RA	       & 125.01 (degrees)	   \\
+DEC		  & float	    & boresite DEC	       & 35.01 (degrees)	   \\
+PA		  & float	    & FPA position angle       & 10.1 (degrees)		   \\
+obstime.sec	  & float	    & observation start	       & 123423422 (TAI)	   \\
+obstime.nsec	  & float	    & observation start (nsec) & 1234			   \\
+telfocus	  & float	    & focus distance	       & 1.50 (mm)		   \\
+FPAtemp		  & float	    & FPA temperature	       & 90 (K)			   \\
+dometemp	  & float	    & dome air temperature     & 290 (K)		   \\
+airtemp		  & float	    & outside air temperature  & 285 (K)		   \\
+mirrortemp	  & float	    & primary mirror temp      & 286 (K)		   \\
+teltemp		  & float	    & telescope structure temp & 283 (K)		   \\
+group ID	  & string	    & observation group name   & target-seq-01		   \\
+group seq	  & int		    & sequence number in group & 3			   \\
+\hline
+background	  & float	    & average of file skies    & 5.0			   \\
+dbackground	  & float	    & stdev of file skies      & 1.0			   \\
+FHWM		  & float	    & \\
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{Raw Detrend Exposures\label{tab:RawDetrendExp}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+telescope	  & string	    & telescope name	       & CFHT / PS-1 / SP-1        \\
+type		  & string	    & exposure type	       & bias / domeflat / dark    \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+Nfiles		  & int		    & number of image files    & 1 / 64			   \\
+\hline
+exptime		  & float	    & exposure time	       & 10.0 (seconds)		   \\
+filter.ID	  & string	    & filter ID (glass)	       & g.PS1.01		   \\
+filter.Band	  & string	    & filter bandpass name     & g			   \\
+Alt		  & float	    & boresite Alt	       & 125.01 (degrees)	   \\
+Az		  & float	    & boresite Az	       & 35.01 (degrees)	   \\
+PA		  & float	    & FPA position angle       & 10.1 (degrees)		   \\
+obstime.sec	  & float	    & observation start	       & 123423422 (TAI)	   \\
+obstime.nsec	  & float	    & observation start (nsec) & 1234			   \\
+telfocus	  & float	    & focus distance	       & 1.50 (mm)		   \\
+FPAtemp		  & float	    & FPA temperature	       & 90 (K)			   \\
+dometemp	  & float	    & dome air temperature     & 290 (K)		   \\
+airtemp		  & float	    & outside air temperature  & 285 (K)		   \\
+mirrortemp	  & float	    & primary mirror temp      & 286 (K)		   \\
+teltemp		  & float	    & telescope structure temp & 283 (K)		   \\
+group ID	  & string	    & observation group name   & target-seq-01		   \\
+group seq	  & int		    & sequence number in group & 3			   \\
+callamp.state     & string          & calibration lamp state   & on / off		   \\
+callamp.mode      & string          & calibration lamp mode    & continuum / line / ??	   \\
+\hline
+background	  & float	    & average of file back    & 5.0			   \\
+dbackground	  & float	    & stdev of file back      & 1.0			   \\
+FHWM		  & float	    & \\
+hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\begin{table}[bh]
+\begin{center}
+\caption{P1 Exposures\label{tab:P1-Exp}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+camera		  & string	    & camera name	       & MegaPrime / GPC           \\
+version		  & int		    & P1 version number	       & 01			   \\
+recipe		  & string	    & analysis recipe name     & basic / flattest	   \\
+state		  & string	    & P1 analysis state	       & new / done		   \\
+\hline
+output		  & string	    & location of output file  & rootname.P1.01.smf        \\
+P1-log		  & string	    & location of P1 logfile   & rootname.P1.01.log        \\
+Nstars		  & int		    & number of astrom stars   & 50			   \\
+sigma.X		  & float	    & astrom scatter in X      & 1.0 (arcsec)		   \\
+sigma.Y		  & float	    & astrom scatter in Y      & 1.2 (arcsec)		   \\
+Mcal		  & float	    & nominal zeropoint        & 25.2 (mag)		   \\
+Moff		  & float	    & measure ZP offset        & 0.5 (mag)		   \\
+dMoff		  & float	    & scatter in Moff	       & 0.1 (mag)		   \\
+
+\begin{table}[bh]
+\begin{center}
+\caption{P2 Images\label{tab:P2-Images}}
+\begin{tabular}{lll}
+\hline
+\hline
+{\bf Field Name} & {\bf Datatype }  & {\bf Description}        & {\bf Examples} \\
+\hline
+exp ID		  & string	    & exposure ID	       & 654321o		   \\
+class		  & string	    & file data class	       & Cell / Chip / FPA	   \\ 
+class ID	  & string	    & identify for class       & chip00 / cell0102	   \\
+version		  & int		    & P1 version number	       & 01			   \\
+recipe		  & string	    & analysis recipe name     & basic / flattest	   \\
+state		  & string	    & P1 analysis state	       & new / done		   \\
+input.url         & string          & file location	       & rootname.fits		   \\
+output.image.url  & string          & file location	       & rootname.P2.01.fits       \\
+output.obj.url    & string          & file location	       & rootname.P2.01.smf        \\
+output.log.url    & string          & file location	       & rootname.P2.01.log	   \\
+\hline
+bias		  & float	    & measured bias value      & 5.0			   \\
+dbias		  & float	    & bias residual scatter    & 5.0			   \\
+Nstars		  & int		    & number of astrom stars   & 50			   \\
+sigma.X		  & float	    & astrom scatter in X      & 1.0 (arcsec)		   \\
+sigma.Y		  & float	    & astrom scatter in Y      & 1.2 (arcsec)		   \\
+Mcal		  & float	    & nominal zeropoint        & 25.2 (mag)		   \\
+Moff		  & float	    & measure ZP offset        & 0.5 (mag)		   \\
+dMoff		  & float	    & scatter in Moff	       & 0.1 (mag)		   \\
+\hline
+bias-image
+dark-image
+flat-image
+\hline
+\end{tabular}
+\end{center}
+\end{table}
+
+
+
+
 \end{document}
