Index: trunk/ippToPsps/test/mkgpc1data.dr2.dvo
===================================================================
--- trunk/ippToPsps/test/mkgpc1data.dr2.dvo	(revision 40261)
+++ trunk/ippToPsps/test/mkgpc1data.dr2.dvo	(revision 40264)
@@ -91,4 +91,9 @@
   exec dvomerge -matched-tables testdata/catdir.stk into testdata/catdir.mrg
   exec dvomerge -matched-tables testdata/catdir.wrp into testdata/catdir.mrg
+
+  exec cp RegionHost.dat testdata/catdir.mrg
+
+# test parallel-regions version:
+# exec relphot -parallel-regions -region-hosts RegionHost.dat -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits -cloud-limit 0.1 -imfreeze -mosfreeze -only-stacks-and-warps -update-catformat PS1_V6
 
   echo relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits -cloud-limit 0.1
@@ -720,4 +725,8 @@
 
 macro check.mags
+  if ($0 != 3)
+    echo "USAGE: check.mags (catdir) (ver)"
+    break
+  end
 
   # NOTE: relphot refuses to set the warp averages if there is no boundary tree: otherwise it cannot choose the correct subset of measurements
@@ -725,5 +734,5 @@
   # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits 
 
-  catdir testdata/catdir.mrg
+  catdir $1
   skyregion 8 12 18 22
   avextract ra dec g:psf:chp g:kron:chp g:psf:stk g:kron:stk g:psf:wrp g:kron:wrp
@@ -739,9 +748,15 @@
   set dg:psf:kron:wrp = g:psf:wrp - g:kron:wrp
 
-  lim -n 0 g:psf:chp -0.2 0.2; clear; box; plot g:psf:chp dg:psf:chp:stk -c blue -pt 7; plot g:psf:chp dg:psf:chp:wrp -c red -pt 2
-
-  lim -n 1 g:kron:chp -0.2 0.2; clear; box; plot g:kron:chp dg:kron:chp:stk -c blue -pt 7; plot g:kron:chp dg:kron:chp:wrp -c red -pt 2
-
-  lim -n 2 g:psf:chp -0.2 0.2; clear; box; plot g:psf:chp dg:psf:kron:chp -c blue -pt 7; plot g:psf:chp dg:psf:kron:stk -c red -pt 2; plot g:psf:chp dg:psf:kron:wrp -c green -pt 2
+  lim -n 0$2 g:psf:chp -0.2 0.2; clear; box; plot g:psf:chp dg:psf:chp:stk -c blue -pt 7; plot g:psf:chp dg:psf:chp:wrp -c red -pt 2
+  label -x "g:psf:chp" -y "g:psf:chp - g:psf:stk(blue),wrp(red)"
+  resize 600 400
+
+  lim -n 1$2 g:kron:chp -0.2 0.2; clear; box; plot g:kron:chp dg:kron:chp:stk -c blue -pt 7; plot g:kron:chp dg:kron:chp:wrp -c red -pt 2
+  label -x "g:kron:chp" -y "g:kron:chp - g:kron:stk(blue),wrp(red)"
+  resize 600 400
+
+  lim -n 2$2 g:psf:chp -0.2 0.2; clear; box; plot g:psf:chp dg:psf:kron:chp -c green -pt 7; plot g:psf:chp dg:psf:kron:stk -c blue -pt 2; plot g:psf:chp dg:psf:kron:wrp -c red -pt 2
+  label -x "g:psf:chp" -y "g:psf:chp - g:kron:chp(green),stk(blue),wrp(red)"
+  resize 600 400
 
 # for i 0 10 
@@ -751,4 +766,8 @@
 
 macro check.mags.meas
+  if ($0 != 3)
+    echo "USAGE: check.mags.meas (catdir) (ver)"
+    break
+  end
 
   # NOTE: relphot refuses to set the warp averages if there is no boundary tree: otherwise it cannot choose the correct subset of measurements
@@ -756,19 +775,22 @@
   # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits 
 
-  catdir testdata/catdir.mrg
+  catdir $1
   skyregion 8 12 18 22
 
   mextract ra dec mag:rel:psf mag:rel:kron mag:ave:psf mag:ave:kron photcode
   set dM:psf = mag:ave:psf - mag:rel:psf
-  lim -n 0 mag:ave:psf dM:psf; clear; box; plot mag:ave:psf dM:psf
+  lim -n 0$2 mag:ave:psf dM:psf; clear; box; plot mag:ave:psf dM:psf
   label -x "mag:ave:psf" -y "mag:ave:psf - mag:rel:psf"
+  resize 600 400
 
   set dM:kron = mag:ave:kron - mag:rel:kron
-  lim -n 1 mag:ave:kron dM:kron; clear; box; plot mag:ave:kron dM:kron
+  lim -n 1$2 mag:ave:kron dM:kron; clear; box; plot mag:ave:kron dM:kron
   label -x "mag:ave:kron" -y "mag:ave:kron - mag:rel:kron"
+  resize 600 400
 
   set dM:psf:kron = mag:rel:psf - mag:rel:kron
-  lim -n 2 mag:rel:kron dM:psf:kron; clear; box; plot mag:rel:kron dM:psf:kron
+  lim -n 2$2 mag:rel:kron dM:psf:kron; clear; box; plot mag:rel:kron dM:psf:kron
   label -x "mag:rel:kron" -y "mag:rel:psf - mag:rel:kron"
+  resize 600 400
 end
 
@@ -783,2 +805,3 @@
   exit 0
 end
+
