Index: /trunk/ippTools/doc/detexample.sh
===================================================================
--- /trunk/ippTools/doc/detexample.sh	(revision 8039)
+++ /trunk/ippTools/doc/detexample.sh	(revision 8039)
@@ -0,0 +1,42 @@
+./dettool -define -exp_id 850131b -det_type bias
+./dettool -runs
+./dettool -input
+./dettool -raw
+./dettool -addprocessed -det_id 1 -exp_id 850131b -class_id 0 -uri file:///850131b-processed.fits -stats foostats -recip number1
+./dettool -processed
+./dettool -raw
+./dettool -processed
+./dettool -processed -chip
+./dettool -processed -det_id 1 -chip
+./dettool -processed -det_id 1 -chip -class_id 2
+./dettool -processed -det_id 1 -chip -class_id 0
+./dettool -addstacked -det_id 1 -class_id 0 -uri file://alala/850131b-stacked.fits -stats mystats -recip myrecip
+./dettool -processed
+./dettool -stacked
+./dettool -stacked
+./dettool -stackedframe
+./dettool -stackedframe -det_id 1
+./dettool -addnormalized -det_id 1 -class_id 0 -uri file:///alala/850131b-normalized -stats mystats -recip myrecip
+./dettool -normalized
+./dettool -normalized -det_id 1
+./dettool -processed
+./dettool -processed -unmask
+./dettool -processed -unmask -det_id 1 -class_id 0
+./dettool -processed -unmask -det_id 1 -class_id 0 | mdc-dump
+./dettool
+./dettool -resid
+./dettool -addresid -det_id 1 -exp_id 850131b -class_id 0 -stats mystats -recip myrecip
+./dettool -resid
+./dettool -addresidexp -det_id 1 -exp_id 850131b -stats mystats -recip myrecip -accept
+./dettool
+./dettool -residexp -det_id 1
+./dettool -masterframe
+./dettool -declaremasterframe -det_id 1 -iteration 0
+./dettool -masterframe
+./dettool -masterframe
+./dettool -master
+./dettool -master -det_id 1
+./dettool -masterframe
+./dettool -rerun -det_id 1 -exp_id 850131b
+./dettool -runs
+./dettool -selectrun -inst megacam -det_type bias
Index: /trunk/ippTools/doc/dettest.sh
===================================================================
--- /trunk/ippTools/doc/dettest.sh	(revision 8039)
+++ /trunk/ippTools/doc/dettest.sh	(revision 8039)
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+#
+# the default value for -iteration (e.g., you didn't specify -iteration) is 0
+# it may make sense to make it default to the latest iteration number for a
+# given det run
+#
+# so of the sanity checking still needs to be improved/tested 
+#
+# also worth noting is that the validity of the iteration value isn't yet
+# checked
+#
+
+# create a new detrun
+det_id=`dettool -define -exp_id 1 -exp_id 2 -exp_id 3 -det_type flat`
+
+# list detruns (active only?)
+dettool -runs
+
+# get detrun status (iteration #)
+
+# list the input exposures in a detRun
+dettool -input -det_id $det_id
+
+# list raw imfiles
+dettool -raw -det_id $det_id
+
+# register a processed imfile
+dettool -addprocessed -det_id $det_id ...
+
+# processed imfiles should mask out raw imfiles
+dettool -raw -det_id $det_id
+
+# list processed imfiles 
+dettool -processed -det_id $det_id [-iteration]
+
+# list processed imfiles for a chip (all or none)
+dettool -processed -chip -det_id $det_id [-iteration]
+
+# list all processed imfiles (even those that have been stacked)
+dettool -processed -unmask -det_id $det_id [-iteration]
+
+# register a stacked imfile
+dettool -addstacked -det_id $det_id [-iteration] -class_id ...
+
+# stacked imfiles should mask out processed imfiles
+dettool -processed -det_id $det_id [-iteration]
+
+# list stacked imfiles
+dettool -stacked -det_id $det_id [-iteration]
+# list stacked imfiles only for complete frames
+dettool -stackedframe -det_id $det_id [-iteration]
+
+# register a normalized imfile
+dettool -addnormalized -det_id $det_id [-iteration] ...
+
+# normalized imfiles should mask out stacked imfiles
+dettool -stacked -det_id $det_id [-iteration]
+# does a single normalized imfile mask out the entire frame?
+dettool -stackedframe -det_id $det_id [-iteration]
+
+# list normalized imfiles 
+dettool -normalized -det_id $det_id[ -iteration]
+
+# register a residual result
+dettool -addresid -det_id $det_id [-iteration] -exp_id ... -class_id ... -stats ...
+
+# residuals mask out normalized imfiles
+dettool -normalized -det_id $det_id [-iteration]
+
+# list residual imfile analyses
+dettool -resid -det_id $det_id [iteration] -exp_id ... -class_id ... -stats ...
+
+# register a residual exp XXX not sanity checked against all input class_ids having a resid registered
+dettool -addresidexp -det_id $det_id [iteration] -stats ... -accept
+
+# list residual exps
+dettool -residexp -det_id $det_id [iteration]  
+
+# register a/the master
+dettool -declaremasterframe -det_id $det_id [-iteration ...]
+
+# list masters
+dettool -masterframe -det_id
+
+# list imfiles in a master frame
+dettool -master -det_id $det_id [-iteration ...]
+
+# start another iteration but use only these input exps (must be a subset of
+# the original input exps)
+dettool -rerun -det_id $det_id -exp_id 1 -exp_id 2 -exp_id 3 
+
+
+# always print out the det_type in the output for imfiles
+
+# -addresid -uri
+# -addresidexp -uri (big/small jpeg)
+
+# -updatedresid for -accept
+# -masterframe needs 'class'
+# -nukemaster
