Index: branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo
===================================================================
--- branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo	(revision 37220)
+++ branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo	(revision 37221)
@@ -8,8 +8,20 @@
 $OUTDIR = sasdata
 
+if (not($?KEEPDVO)) set KEEPDVO = 0
+
+list expfiles
+  sasdata/o5745g0495o.356867.cm.982612
+  sasdata/o5745g0507o.356882.cm.982626
+  sasdata/o5745g0517o.356892.cm.982636
+  sasdata/o5745g0527o.356909.cm.982650
+end
+
 macro mkfull
   init.db
   mkcatdir.cam
-  # mkcatdir.stk
+  mkcatdir.stk
+  mkcal
+  mkgpc1.cam
+  mkgpc1.stk
 end
 
@@ -48,16 +60,30 @@
   $catdirbase = catdir.sas.cam
   $catdir = $OUTDIR/$catdirbase
+
   exec rm -rf $catdir
-
-  list expfiles
-    sasdata/o5745g0495o.356867.cm.982612
-    sasdata/o5745g0507o.356882.cm.982626
-    sasdata/o5745g0517o.356892.cm.982636
-    sasdata/o5745g0527o.356909.cm.982650
-  end
 
   for i 0 $expfiles:n
     $expfile = $expfiles:$i
-    exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf
+
+    exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf -update
+  end
+  exec addstar -D CATDIR $catdir -region 330 340 -10 0 -resort
+
+  echo relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits
+  exec relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits
+end
+
+# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
+macro mkgpc1.cam
+  if ($0 != 1)
+    echo "mkgpc1.cam"
+    break
+  end
+
+  local catdirbase
+  $catdirbase = catdir.sas.cam
+
+  for i 0 $expfiles:n
+    $expfile = $expfiles:$i
 
     # are these used to find the exposures in any way?
@@ -86,7 +112,4 @@
     dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)
   end
-
-  echo relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update
-  exec relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update
 end
 
@@ -109,4 +132,26 @@
   $DEC = -5.0
 
+  # a single stack
+  $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960
+  exec addstar -D CAMERA gpc1 -D CATFORMAT PS1_V5 -D CATDIR $catdir $stkfile.cmf
+
+  # echo relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
+  # exec relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
+end
+
+# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
+macro mkgpc1.stk
+  if ($0 != 1)
+    echo "mkgpc1.stk"
+    break
+  end
+
+  local catdirbase
+  $catdirbase = catdir.sas.cam
+
+  # are these used to find the exposures in any way?
+  $RA = 333.5
+  $DEC = -5.0
+
   $TIMEFORMAT = mjd
   $TIMEREF = 2001/01/01,00:00:00
@@ -115,8 +160,4 @@
   # a single stack
   $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960
-  exec addstar -D CAMERA gpc1 -D CATFORMAT PS1_V5 -D CATDIR $catdir $stkfile.cmf
-
-  # echo relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
-  # exec relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
 
   break -auto off
Index: branches/eam_branches/ipp-20140717/ippToPsps/test/sastest.sh
===================================================================
--- branches/eam_branches/ipp-20140717/ippToPsps/test/sastest.sh	(revision 37220)
+++ branches/eam_branches/ipp-20140717/ippToPsps/test/sastest.sh	(revision 37221)
@@ -267,5 +267,5 @@
 
   rm -rf $OUTDIR/P2
-  ippjython loader.py -test $queuename once < /dev/null
+  ippjython loader.py -test $queuename once -one-batch < /dev/null
   if ($status) exit
 endif
@@ -283,6 +283,6 @@
   echo "IPP_PSPS	      " >> stackbatch.dat # datastore_type
   echo "0		      " >> stackbatch.dat # datastore_publish
-  echo "catdir.sas.stk	      " >> stackbatch.dat # dvo_label
-  echo "$OUTDIR/catdir.sas.stk" >> stackbatch.dat # dvo_location
+  echo "catdir.sas.cam	      " >> stackbatch.dat # dvo_label
+  echo "$OUTDIR/catdir.sas.cam" >> stackbatch.dat # dvo_location
   echo "332		      " >> stackbatch.dat # min_ra
   echo "335		      " >> stackbatch.dat # max_ra
@@ -380,6 +380,6 @@
   rm -rf $OUTDIR/OB
 
-  ippjython loader.py -test $objectqueuename once < /dev/null
-  if ($status) exit
-endif
-
+  ippjython loader.py -test $objectqueuename once -one-batch < /dev/null
+  if ($status) exit
+endif
+
