Index: trunk/ippTasks/simtest.auto
===================================================================
--- trunk/ippTasks/simtest.auto	(revision 16570)
+++ trunk/ippTasks/simtest.auto	(revision 16610)
@@ -4,5 +4,5 @@
 automate METADATA
   name       STR BIAS
-  block      STR "dettool -runs -det_type BIAS -dbname eamtest"
+  block      STR "dettool -runs -active -det_type BIAS -dbname eamtest"
   check      STR NONE
   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type BIAS -select_exp_type BIAS -dbname eamtest"
@@ -11,5 +11,5 @@
 automate METADATA
   name       STR DARK
-  block      STR "dettool -runs -det_type DARK -dbname eamtest"
+  block      STR "dettool -runs -active -det_type DARK -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type BIAS -dbname eamtest"
   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type DARK -select_exp_type DARK -dbname eamtest"
@@ -18,5 +18,5 @@
 automate METADATA
   name       STR SHUTTER
-  block      STR "dettool -runs -det_type SHUTTER -dbname eamtest"
+  block      STR "dettool -runs -active -det_type SHUTTER -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type DARK -dbname eamtest"
   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type SHUTTER -filter r -select_exp_type FLAT -select_filter r -dbname eamtest"
@@ -25,5 +25,5 @@
 automate METADATA
   name       STR FLAT-r
-  block      STR "dettool -runs -det_type FLAT -filter r -dbname eamtest"
+  block      STR "dettool -runs -active -det_type FLAT -filter r -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type SHUTTER -dbname eamtest"
   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type FLAT -filter r -select_exp_type FLAT -select_filter r -dbname eamtest"
@@ -32,5 +32,5 @@
 automate METADATA
   name       STR FLAT-i
-  block      STR "dettool -runs -det_type FLAT -filter i -dbname eamtest"
+  block      STR "dettool -runs -active -det_type FLAT -filter i -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type SHUTTER -dbname eamtest"
   launch     STR "dettool -definebyquery -workdir path://EAMWORK -inst SIMTEST -det_type FLAT -filter i -select_exp_type FLAT -select_filter i -dbname eamtest"
@@ -39,5 +39,5 @@
 automate METADATA
   name       STR OBJECT-r
-  block      STR "chiptool -block -label object.r -dbname eamtest"
+  block      STR "chiptool -unmasked -label object.r -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type FLAT -dbname eamtest -filter r"
   launch     STR "chiptool -unblock -label object.r -dbname eamtest"
@@ -46,7 +46,30 @@
 automate METADATA
   name       STR OBJECT-i
-  block      STR "chiptool -block -label object.i -dbname eamtest"
+  block      STR "chiptool -unmasked -label object.i -dbname eamtest"
   check      STR "detselect -search -inst SIMTEST -det_type FLAT -dbname eamtest -filter i"
   launch     STR "chiptool -unblock -label object.i -dbname eamtest"
 END
 
+### there is a weakness in the label / block business: the labels are
+### generic, and the blocks are against those fairly generic words.
+### that makes it difficult to block and unblock science exposures
+### based on different detrend types that are available.  For example,
+### to block the r-band against the absence of the desired r-band
+### flat, we would need to specify a label specific to the r-band
+### images and remove that block when ready.
+
+### a better approach might be to modify the labels rather than the
+### blocks.  we can define, eg, chiptool -set_label -definebyquery to
+### turn assign the label names based on various properties of the
+### interesting images.
+
+### here is what the automate element might look like for such a circumstance:
+
+### automate METADATA
+###   name       STR OBJECT-i
+###   block      STR "chiptool -dbname eamtest -unmasked -label wait -filter i -time_begin 2008/1/1 -time_end 2008/1/2"
+###   check      STR "detselect -dbname eamtest -search -inst SIMTEST -det_type FLAT -dbname eamtest -filter i -time_begin 2008/1/1 -time_end 2008/1/2" 
+###   launch     STR "chiptool -dbname eamtest -set_label proc -label wait -dbname eamtest -time_begin 2008/1/1 -time_end 2008/1/2"
+### END
+
+### XXX still not quite there....
