Index: /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.auto
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.auto	(revision 43058)
+++ /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.auto	(revision 43058)
@@ -0,0 +1,71 @@
+
+automate MULTI
+
+# we run in the sequence BLOCK -> CHECK -> LAUNCH -> BLOCK -> CHECK
+# success on CHECK -> LAUNCH
+# failure on BLOCK -> CHECK
+
+# a stage starts in state INIT.BLOCK.
+
+# the "automate.block" task runs the 'block' command regularly.  if it
+# returns a valid result, the block is set and the state remains in
+# block.  if there is no result (ie, no matching BIAS, etc), the stage
+# is put to state INIT.CHECK.
+
+# the "automate.check" tasks runs the 'check' command regularly.  if
+# it returns ncheck valid entries (default ncheck = 1), the state goes
+# to INIT.LAUNCH.
+
+# the "automate.launch" tasks runs the 'launch' command once.  if it returns
+# ncheck valid entries (default ncheck = 1), the state goes to
+# INIT.LAUNCH.
+
+# XXX these steps all refer to "@DBNAME@"; they need to be more generic, even for the basic simtest analysis
+
+automate METADATA
+  name       STR BIAS
+  check      STR "regtool -dbname @DBNAME@ -processedexp -exp_type BIAS -inst @CAMERA@"
+  ncheck     S32 3
+  launch     STR "dettool -dbname @DBNAME@ -definebyquery -time_begin 2010/01/01 -workdir file://@CWD@/detwork -inst @CAMERA@ -det_type BIAS -select_exp_type BIAS"
+  block      STR "dettool -dbname @DBNAME@ -runs -active -det_type BIAS"
+END
+
+automate METADATA
+  name       STR DARK
+  check      STR "detselect -dbname @DBNAME@ -search -inst @CAMERA@ -det_type BIAS -time 2010/01/01"
+  launch     STR "dettool -dbname @DBNAME@ -definebyquery -time_begin 2010/01/01  -workdir file://@CWD@/detwork -inst @CAMERA@ -det_type DARK -select_exp_type DARK"
+  block      STR "dettool -dbname @DBNAME@ -runs -active -det_type DARK"
+END
+ 
+automate METADATA
+  name       STR FLAT-r
+  check      STR "detselect -dbname @DBNAME@ -search -inst @CAMERA@ -det_type DARK -time 2010/01/01"
+  launch     STR "dettool -dbname @DBNAME@ -definebyquery -time_begin 2010/01/01  -workdir file://@CWD@/detwork -inst @CAMERA@ -det_type FLAT -filter r -select_exp_type SKYFLAT -select_filter r"
+  block      STR "dettool -dbname @DBNAME@ -runs -active -det_type FLAT -filter r"
+END
+
+automate METADATA
+  name       STR OBJECT-r
+  check      STR "detselect -dbname @DBNAME@ -search -inst @CAMERA@ -det_type FLAT -filter r -time 2010/01/01"
+  launch     STR "chiptool  -dbname @DBNAME@ -definebyquery -inst @CAMERA@ -filter r -set_label proc -set_data_group simtest_r -set_dist_group simtest -set_workdir file://@CWD@/chip" 
+  block      STR "chiptool  -dbname @DBNAME@ -listrun -filter r -label proc" 
+END
+
+### ### Stack automation
+### automate METADATA
+###   name       STR STACK
+###   regular    STR "stacktool -dbname @DBNAME@ -definebyquery  -set_label proc -set_data_group simtest_r -set_dist_group simtest -set_workdir file://@CWD@/stack -min_new 4 -min_frac 2 -select_good_frac_min 0.2 -min_num 4"
+### END
+### 
+### ### Diff automation
+### automate METADATA
+###   name       STR DIFF
+###   regular    STR "difftool -dbname @DBNAME@ -definewarpstack -set_label proc -set_workdir file://@CWD@/diff -good_frac 0.2"
+### END
+
+### automate METADATA
+###   name       STR OBJECT-i
+###   block      STR "chiptool -dbname @DBNAME@ -unmasked -label wait -filter i -time_begin 2008/1/1 -time_end 2008/1/2"
+###   check      STR "detselect -dbname @DBNAME@ -search -inst @CAMERA@ -det_type FLAT -filter i -time_begin 2008/1/1 -time_end 2008/1/2" 
+###   launch     STR "chiptool -dbname @DBNAME@ -set_label proc -label wait -time_begin 2008/1/1 -time_end 2008/1/2"
+### END
Index: /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.config
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.config	(revision 43058)
+++ /branches/eam_branches/ipp-pstamp-20260421/ippTasks/simtest.quickmos.config	(revision 43058)
@@ -0,0 +1,62 @@
+
+CAMERA     STR SIMMOSAIC
+
+# allows for multi-file outputs to be selected by ppSimSequence
+FILERULE STR *fits
+
+# define the simulated data to be generated
+SEQUENCE MULTI
+
+SEQUENCE METADATA
+  OBSTYPE    STR BIAS
+  NIMAGES    S32  3
+END
+
+SEQUENCE METADATA
+  OBSTYPE    STR DARK
+  @EXPTIMES  F32  30.0, 300.0
+  @NIMAGES   S32  2,    2
+END
+
+SEQUENCE METADATA
+  OBSTYPE    STR FLAT
+
+  FILTERS    STR r
+  @EXPTIMES  F32 30.0
+
+  NSETUP     S32 3
+END
+
+SEQUENCE METADATA
+  OBSTYPE    STR OBJECT
+
+  CENTER.RA  F32 270.0
+  CENTER.DEC F32  30.0
+
+  OFFSET.RA  F32 3600.0 # linear offset in arcsec (do not include cos(DEC) correction)
+  OFFSET.DEC F32 3600.0 # linear offset in arcsec (do not include cos(DEC) correction)
+  OFFSET.NR  S32 1
+  OFFSET.ND  S32 1
+
+  DITHER.RA  F32 60.0   # linear offset in arcsec (do not include cos(DEC) correction)
+  DITHER.DEC F32 60.0   # linear offset in arcsec (do not include cos(DEC) correction)
+  DITHER.NR  S32 3
+  DITHER.ND  S32 2
+
+  DVODB      STR NONE
+  FILTERS    STR r
+  @EXPTIMES  F32 10.00
+  @SKYMAGS   F32 20.86
+
+  # XXX use a more realistic IQ distribution...
+  IQ_MIN     F32 0.9
+  IQ_MAX     F32 1.2
+  
+  # rotation sequence
+  POS_MIN    F32 0.0
+  POS_MAX    F32 0.0
+  POS_DELTA  F32 1.0
+
+  MJD_MIN    F32 60000.0
+  MJD_MAX    F32 60010.0
+END
