
Phase 2 pipeline tools:

p2search -quick 
  * search for images which match in raw.exp,raw.imfiles
  * output in format which can be used by ppImage pantasks script

p2search -define [options]
  * input: searches mddb:raw_exposures,raw_images
        - compares against p2Pending[Exp|Imfiles]
        - compares against p2Done[Exp|Imfiles]
        - XXX should be implimented as a special wrapper function that
          impliments this comparision as a SQL query
  * output: updates mddb:P2_exposures_pending,P2_images_pending
  * alternative output: identical to p2pending
 
p2search -pending 
  * input: searches mddb:P2_exposures_pending,P2_images_pending
  * output: Nlines consisting of:
    (URL) (expID) (class)
  * options: ?

p2search -update
  * examine the imfiles and identify any completed exposures

p2search -done
  * add completed exposures to the p2.done tables
  * remove corresponding entries from the p2.pending table
  * send new entry to the pending p3 table

ppImage file://path/filename file://path/outroot -recipe (recipe) 
ppImage neb://nebname neb://outroot -recipe (recipe)

restriction options:
  -time (start) (stop)
  -camera (camera) 
  -region (ra,dec) (ra,dec)

