Index: trunk/ippToPsps/test/mkgpc1data.dvo
===================================================================
--- trunk/ippToPsps/test/mkgpc1data.dvo	(revision 39104)
+++ trunk/ippToPsps/test/mkgpc1data.dvo	(revision 39105)
@@ -198,6 +198,9 @@
 
   if ($SMALLTEST)
-    echo relphot -D CATDIR $catdir -region 8 12 18 22 -averages -update
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -averages -update
+    echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update
+    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update
+
+    echo relastro -v -D CATDIR $catdir -images -update-chips -region 8 12 18 22 -update -apply-offsets
+    exec relastro -v -D CATDIR $catdir -images -update-chips -region 8 12 18 22 -update -apply-offsets
   else
     echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
@@ -554,6 +557,6 @@
   end
   if ($SMALLTEST)
-    echo relphot -D CATDIR $catdir -region 8 12 18 22 -averages -update
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -averages -update
+    echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN 
+    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN
   else
     echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
Index: trunk/ippToPsps/test/mksasdata.dvo
===================================================================
--- trunk/ippToPsps/test/mksasdata.dvo	(revision 39104)
+++ trunk/ippToPsps/test/mksasdata.dvo	(revision 39105)
@@ -36,9 +36,9 @@
 # supply it explicitly here:
 list galfiles
-  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40278.cmf  3942577  g.00000
-  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40279.cmf  3942578  i.00000
-  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40280.cmf  3942579  r.00000
-  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40281.cmf  3942580  y.00000
-  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40282.cmf  3942581  z.00000
+  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40278.cmf  3942577  g
+  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40279.cmf  3942578  i
+  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40280.cmf  3942579  r
+  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40281.cmf  3942580  y
+  sasdata.v39/RINGS.V3.skycell.1315.090.ff.40282.cmf  3942581  z
 end
 
@@ -160,6 +160,6 @@
   for i 0 $wrpfiles:n
     $wrpfile = $wrpfiles:$i
-    echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom
-    exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom
+    echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom -D ZERO_POINT_OPTION CHIP_HEADER -D ZERO_POINT_KEYWORD FPA.ZP
+    exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom -D ZERO_POINT_OPTION CHIP_HEADER -D ZERO_POINT_KEYWORD FPA.ZP
   end
 
@@ -181,9 +181,9 @@
   # run relphot
   # echo relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -update -boundary-tree tess.3pi.fits
-  echo relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -nloop 0 g,r,i,z,y -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits
-  exec relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -nloop 0 g,r,i,z,y -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits
-
-  echo relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update
-  exec relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update
+  echo relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits
+  exec relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits
+
+  echo relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update -apply-offsets
+  exec relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update -apply-offsets
 
   echo dvolens -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update-objects -update
@@ -200,6 +200,6 @@
   for i 0 $diffiles:n
     $diffile = $diffiles:$i
-    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -accept-astrom
-    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -accept-astrom
+    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP
+    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP
     # echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $stkfile -update -quick-airmass -D ZERO_POINT_OPTION CHIP_HEADER
   end
@@ -211,6 +211,6 @@
 
   # run relphot
-  echo relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -averages -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN
-  exec relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -averages -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN
+  echo relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN
+  exec relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN
 
   echo relastro -v -D CATDIR $catdir_diff -update-objects -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update -D RELASTRO_SRC_MEAS_TOOFEW 0 -D RELASTRO_SIGMA_LIM 0.05 -statmode WTMEAN
