Index: trunk/ippToPsps/test/mkgpc1.sh
===================================================================
--- trunk/ippToPsps/test/mkgpc1.sh	(revision 40218)
+++ trunk/ippToPsps/test/mkgpc1.sh	(revision 40221)
@@ -12,4 +12,14 @@
 
   mysql -h $dbhost -u root -p -e "grant all on *.* to $dbuser@"$dbhost" identified by '$dbpass'"
+  exit 0;
+endif
+
+if ("$1" == "user.sudo") then
+  if ($#argv != 4) goto usage;
+  set dbhost = $2
+  set dbuser = $3
+  set dbpass = $4
+
+  sudo mysql -h $dbhost -u root -p -e "grant all on *.* to $dbuser@"$dbhost" identified by '$dbpass'"
   exit 0;
 endif
@@ -118,6 +128,13 @@
   echo "      delete an existing test db (enter pass 3x)"
   echo ""
+  echo "  mkgpc1.sh forcedelete (dbhost) (dbname) (dbuser) [dbpass]"
+  echo "      delete an existing test db (enter pass 3x), even if the number of tables is wrong"
+  echo ""
   echo "  mkgpc1.sh user (dbhost) (dbuser) (password)"
   echo "      create a new user and password for the test db"
   echo ""
+  echo "  mkgpc1.sh user.sudo (dbhost) (dbuser) (password)"
+  echo "      create a new user and password for the test db, using sudo mysql"
+  echo "      (this option is needed if your mysql installation uses the auth_socket plugin"
+  echo ""
   exit 2
Index: trunk/ippToPsps/test/mkgpc1data.dvo
===================================================================
--- trunk/ippToPsps/test/mkgpc1data.dvo	(revision 40218)
+++ trunk/ippToPsps/test/mkgpc1data.dvo	(revision 40221)
@@ -75,7 +75,11 @@
   $dbuser = dvo
   $dbpass = dvo
-#  $dbuser = czw
-#  $dbpass = czw
-
+
+  $gscfile = `gconfig GSCFILE`
+  if ("$gscfile" == "not found")
+    echo "problem with dvo / ptolemy configuration.  check ~/.ptolemyrc"
+    break
+  end
+   
   exec mkgpc1.sh delete $dbhost $dbname $dbuser $dbpass
   exec mkgpc1.sh create $dbhost $dbname $dbuser $dbpass
@@ -193,4 +197,5 @@
     end
 
+    echo "*****"
     echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
     exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
@@ -198,12 +203,12 @@
 
   if ($SMALLTEST)
-    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
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update
+
+    echo relastro -v -D CATDIR $catdir -D CAMERA simtest -images -update-chips -region 8 12 18 22 -update -apply-offsets
+    exec relastro -v -D CATDIR $catdir -D CAMERA simtest -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
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
   end
 
@@ -267,9 +272,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 -D CAMERA simtest -region 8 12 18 22 -averages -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update
   else
-    echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
   end
 
@@ -352,18 +357,18 @@
     exec mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL
 
-    echo loadgalphot -D CATDIR $catdir -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile 
-    exec loadgalphot -D CATDIR $catdir -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile
+    echo loadgalphot -D CATDIR $catdir -D CAMERA simtest -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile 
+    exec loadgalphot -D CATDIR $catdir -D CAMERA simtest -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile
   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 -D CAMERA simtest -region 8 12 18 22 -averages -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update
   else
-    echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
-  end
-
-  echo dvolens -D CATDIR $catdir -region 8 12 18 22 -update-objects -update
-  exec dvolens -D CATDIR $catdir -region 8 12 18 22 -update-objects -update
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
+  end
+
+  echo dvolens -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -update-objects -update
+  exec dvolens -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -update-objects -update
 
   if ($PARALLEL)
@@ -557,9 +562,9 @@
   end
   if ($SMALLTEST)
-    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
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -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 -D CAMERA simtest -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
-    exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
+    echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
+    exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update
   end
 
