Index: /trunk/doc/design/specs.tex
===================================================================
--- /trunk/doc/design/specs.tex	(revision 413)
+++ /trunk/doc/design/specs.tex	(revision 414)
@@ -1,3 +1,3 @@
-%%% $Id: specs.tex,v 1.2 2004-04-10 01:14:49 eugene Exp $
+%%% $Id: specs.tex,v 1.3 2004-04-12 19:21:27 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -572,4 +572,93 @@
 
 \paragraph{Scheduler}
+
+The IPP is responsible for a variety of analysis tasks: several stages
+of processing of the science images; routine assessment of the detrend
+images used in processing the science images; construction of
+replacement detrend images when needed; generation of astrometric and
+photometric reference catalogs based on the collected dataset; and the
+performance of test analysis programs.  At any point, decisions need
+to be made about which of these tasks should be performed, based on an
+analysis of the contents of the image database tables, the
+requirements of the people monitoring the IPP, and the near-term
+observing plans.  The IPP Scheduler is a mechanism to manage these
+various inputs to guide the decisions and initiate the actions.
+
+The Scheduler acts as an intermediate between several components of
+the IPP and also between the IPP and external agents such as the OATS
+system and the users who must monitor the behavior of the IPP.  
+
+The Scheduler must send commands to the Controller for execution.  It
+is the Controller's responsibility to manage the specific analysis
+jobs executing on a given processing node.  These analysis may include
+the process of copying of moving data from OATS to the pixel server
+nodes, or it may involve image processing stages performed on the
+science images by the apporpriate processing nodes, or it may involve
+analysis of the data in the PnA object database.  In order to isolate
+and encapsulate the responsibilities of the Scheduler and the
+Controller, the Scheduler must initiate the tasks which the controller
+manages; in this way, the controller does not need to have any
+information about the details of the tasks which it executes.
+Communication between the Scheduler and the Controller must be
+bi-directional; the Scheduler must send tasks to the Controller which
+the Controller must inform the Scheduler of the outcome of those
+tasks.  \tbd{it is not specified whether the scheduler and controller
+are components of a single software system or interacting but distinct
+software components.}
+
+The Scheduler must take as input the current list of pending images,
+both science and calibration, and a description of the current
+observing plan or strategy on some time-scale.  The Scheduler must
+also take input from humans who manage the IPP.  
+
+The Scheduler must choose between several types of analysis stages
+based on the contents of those lists and on the requirements of the
+users.  The list of tasks which the Scheduler must decide between
+includes: 
+\begin{itemize}
+\item moving data to and from the pixel server ($\sim 30$ second timescales)
+\item running the science analysis stages ($\sim 30$ second timescales)
+\item testing the validity of the current detrend images ($\sim$
+  nightly)
+\item constructing new detrend images ($\sim$ weekly)
+\item updating and improving the photometric and astrometric reference
+  catalogs ($\sim$ yearly).
+\end{itemize}
+
+The Scheduler must choose between tasks which are relevant on several
+different time-scales.  The time-scale range from 2 times per minute
+to once or twice a year, as noted in the list above.  The Scheduler
+must make use of the human input to manage such choices.  
+
+The Scheduler must maintain a set of rules defining the dependency of
+one type of analysis stage on other analysis products.  For example,
+the nightly science image processing depends on the existence of valid
+detrend images.  The Scheduler must be able to recognize the
+dependency and initiate the required analysis needed to perform other
+analysis tasks.  The Scheduler must have the ability to decide between
+postponing an analysis task until the depending data are available or
+to initial the task using a lower-quality or less appropriate
+substitute.  For example, a science image should not be processed
+until the corresponding detrend frame has been produced.  However, it
+such a frame is unlikely to appear and the pressure to process the
+science image it too high, then the frame could be processed with an
+older detrend frame of known lower quality.  The Scheduler must have
+the ability to choose the best, if not ideal, reference data for a
+particular circumstance.
+
+The Scheduler is responsible for setting the operating mode of the
+IPP.  When the IPP is in the automatic operating mode, this implies
+that the Scheduler is performing the most appropriate tasks at a
+particular time.  When the IPP is in the interactive mode, the
+Scheduler must perform the requested action regardless of the outcome
+of the decision trees.  In addition, the Scheduler must only perform
+the requested actions and not attempt to perform the other
+normally-required actions.  The only exception to this exclusion is
+that, in the interactive mode, data must still be copyed from the
+summit system.  A human-sent command must be able to change the
+Scheduler priorities from the automatic to the interactive modes.  An
+additional IPP mode is the {\em paused mode}, in which case the
+Scheulder does not perform even the data copy tasks.  Every task is
+performed on demand by the user.
 
 \subsubsection{Analysis Stages}
