Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 12023)
+++ /trunk/dbconfig/config.md	(revision 12024)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     1.1.10
+    pkg_version     STR     1.1.11
 END
Index: /trunk/dbconfig/p4.md
===================================================================
--- /trunk/dbconfig/p4.md	(revision 12023)
+++ /trunk/dbconfig/p4.md	(revision 12024)
@@ -1,3 +1,3 @@
-# $Id: p4.md,v 1.15 2007-02-22 01:54:56 jhoblitt Exp $
+# $Id: p4.md,v 1.16 2007-02-24 01:40:38 jhoblitt Exp $
 
 #
@@ -8,7 +8,7 @@
 #
 
-# define a new p4run for a single skycell
-p4Run METADATA
-    p4_id       S32         0       # Primary Key AUTO_INCREMENT
+# define a new warprun for a single skycell
+warpRun METADATA
+    warp_id     S32         0       # Primary Key AUTO_INCREMENT
     mode        STR         64      # Key
     state       STR         64      # Key
@@ -23,19 +23,19 @@
 
 # the list of imfiles in our skycell keyed against phase 3
-# only allow one p3_version of an exp_tag per p4Run
-p4InputExp METADATA
-    p4_id       S32         0       # Primary Key
+# only allow one cam_version of an exp_tag per warpRun
+warpInputExp METADATA
+    warp_id     S32         0       # Primary Key
     exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Key
+    cam_version  S32         0       # Key
 # if magic is T then look for the exp_tag in the magic output tables
     magiced     BOOL        f       # Key
 END
 
-p4SkyCellMap METADATA
-    p4_id       S32         0       # Primary Key
+warpSkyCellMap METADATA
+    warp_id     S32         0       # Primary Key
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
     exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Primary Key
+    cam_version  S32         0       # Primary Key
 # class is not yet consistently carried through pXtools
 #    class       STR         64      # Primary Key
@@ -43,6 +43,6 @@
 END
 
-p4Skyfile METADATA
-    p4_id       S32         0       # Primary Key
+warpSkyfile METADATA
+    warp_id     S32         0       # Primary Key
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
Index: /trunk/dbconfig/p5.md
===================================================================
--- /trunk/dbconfig/p5.md	(revision 12023)
+++ /trunk/dbconfig/p5.md	(revision 12024)
@@ -1,6 +1,6 @@
-# $Id: p5.md,v 1.6 2007-02-22 01:54:56 jhoblitt Exp $
+# $Id: p5.md,v 1.7 2007-02-24 01:40:38 jhoblitt Exp $
 
-p5Run METADATA
-    p5_id       S32         0       # Primary Key AUTO_INCREMENT
+diffRun METADATA
+    diff_id     S32         0       # Primary Key AUTO_INCREMENT
     state       STR         64      # Key
     workdir     STR         255
@@ -16,7 +16,7 @@
 
 # only ever 2 per run
-p5InputSkyfile METADATA
-    p5_id       S32         0       # Primary Key
-    p4_id       S32         0       # Primary Key
+diffInputSkyfile METADATA
+    diff_id     S32         0       # Primary Key
+    warp_id     S32         0       # Primary Key
     skycell_id  STR         64      # Primary Key
     tess_id     STR         64      # Primary Key
@@ -26,6 +26,6 @@
 END
 
-p5DiffSkyfile METADATA
-    p5_id       S32         0       # Primary Key
+diffSkyfile METADATA
+    diff_id     S32         0       # Primary Key
     uri         STR         255
     bg          F64         0.0
Index: /trunk/dbconfig/p6.md
===================================================================
--- /trunk/dbconfig/p6.md	(revision 12023)
+++ /trunk/dbconfig/p6.md	(revision 12024)
@@ -1,6 +1,6 @@
-# $Id: p6.md,v 1.6 2007-02-22 01:54:56 jhoblitt Exp $
+# $Id: p6.md,v 1.7 2007-02-24 01:40:38 jhoblitt Exp $
 
-p6Run METADATA
-    p6_id       S32         0       # Primary Key AUTO_INCREMENT
+stackRun METADATA
+    stack_id    S32         0       # Primary Key AUTO_INCREMENT
     state       STR         64      # Key
     workdir     STR         255
@@ -11,11 +11,11 @@
 END
 
-p6InputSkyfile METADATA
-    p6_id       S32         0       # Primary Key
-    p4_id       S32         0       # Primary Key
+stackInputSkyfile METADATA
+    stack_id    S32         0       # Primary Key
+    warp_id     S32         0       # Primary Key
 END
 
-p6SumSkyfile METADATA
-    p6_id       S32         0       # Primary Key
+stackSumSkyfile METADATA
+    stack_id    S32         0       # Primary Key
     uri         STR         255
     bg          F64         0.0
Index: /trunk/dbconfig/tasks.md
===================================================================
--- /trunk/dbconfig/tasks.md	(revision 12023)
+++ /trunk/dbconfig/tasks.md	(revision 12024)
@@ -1,3 +1,3 @@
-# $Id: tasks.md,v 1.119 2007-02-17 04:14:23 jhoblitt Exp $
+# $Id: tasks.md,v 1.120 2007-02-24 01:40:38 jhoblitt Exp $
 
 # this table records all exposure ID ever seen from the summit
@@ -154,7 +154,7 @@
 #
 
-p1PendingExp METADATA
-    exp_tag     STR         64      # Primary Key
-    p1_version  S32         0       # Primary Key 
+guidePendingExp METADATA
+    exp_tag     STR         64      # Primary Key
+    guide_version  S32         0       # Primary Key 
     recipe      STR         64
 END
@@ -163,8 +163,8 @@
 # class is missing
 
-p2PendingExp METADATA
-    exp_tag     STR         64      # Primary Key
-    p2_version  S32         0       # Primary Key
-    p1_version  S32         0
+chipPendingExp METADATA
+    exp_tag     STR         64      # Primary Key
+    chip_version  S32         0       # Primary Key
+    guide_version  S32         0
     label       STR         64      # key
     recipe      STR         64
@@ -175,8 +175,8 @@
 # uris in & out ?
 
-p2PendingImfile METADATA
-    exp_tag     STR         64      # Primary Key
-    p2_version  S32         0       # Primary Key
-    p1_version  S32         0
+chipPendingImfile METADATA
+    exp_tag     STR         64      # Primary Key
+    chip_version  S32         0       # Primary Key
+    guide_version  S32         0
     class_id    STR         64      # Primary Key
     recipe      STR         64
@@ -187,8 +187,8 @@
 # and/or logging imfile done better?
 
-p2ProcessedExp METADATA
-    exp_tag     STR         64      # Primary Key
-    p2_version  S32         0       # Primary Key
-    p1_version  S32         0
+chipProcessedExp METADATA
+    exp_tag     STR         64      # Primary Key
+    chip_version  S32         0       # Primary Key
+    guide_version  S32         0
     label       STR         64      # key
     expgroup       STR         64      # key
@@ -196,5 +196,5 @@
 END
 
-p2Mask METADATA
+chipMask METADATA
     label       STR         64      # Primary Key
 END
@@ -203,8 +203,8 @@
 # state?
 
-p2ProcessedImfile METADATA
-    exp_tag     STR         64      # Primary Key
-    p2_version  S32         0       # Primary Key
-    p1_version  S32         0
+chipProcessedImfile METADATA
+    exp_tag     STR         64      # Primary Key
+    chip_version  S32         0       # Primary Key
+    guide_version  S32         0
     class_id    STR         64      # Primary Key
     recipe      STR         64
@@ -220,8 +220,8 @@
 # imfiles is not here... is it needed?
 
-p3PendingExp METADATA
-    exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Primary Key
-    p2_version  S32         0
+camPendingExp METADATA
+    exp_tag     STR         64      # Primary Key
+    cam_version  S32         0       # Primary Key
+    chip_version  S32         0
     label       STR         64      # key
     expgroup       STR         64      # key
@@ -229,8 +229,8 @@
 END
 
-p3ProcessedExp METADATA
-    exp_tag     STR         64      # Primary Key
-    p3_version  S32         0       # Primary Key
-    p2_version  S32         0
+camProcessedExp METADATA
+    exp_tag     STR         64      # Primary Key
+    cam_version  S32         0       # Primary Key
+    chip_version  S32         0
     label       STR         64      # key
     uri         STR         255
@@ -251,5 +251,5 @@
 END
 
-p3Mask METADATA
+camMask METADATA
     label       STR         64      # Primary Key
 END
Index: /trunk/ippTools/scripts/camtest.sh
===================================================================
--- /trunk/ippTools/scripts/camtest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/camtest.sh	(revision 12024)
@@ -3,9 +3,9 @@
 set -o verbose
 
-p2test.sh || exit 1
+chiptest.sh || exit 1
 
-p3tool -pendingexp || exit 1
-p3tool -pendingimfile || exit 1
+camtool -pendingexp || exit 1
+camtool -pendingimfile || exit 1
 
-p3tool -addprocessedexp -exp_tag t10.1 -uri file://p3p -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -sigma_ra 1 -sigma_dec 2 -nastro 42 -b1_uri file:///foo -b2_uri file://bar -zp_mean 1 -zp_stdev 2 || exit 1
-p3tool -addprocessedexp -exp_tag t11.2 -uri file://p3p -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -sigma_ra 1 -sigma_dec 2 -nastro 42 -b1_uri file:///foo -b2_uri file://bar -zp_mean 1 -zp_stdev 2 || exit 1
+camtool -addprocessedexp -exp_tag t10.1 -uri file://camp -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -sigma_ra 1 -sigma_dec 2 -nastro 42 -b1_uri file:///foo -b2_uri file://bar -zp_mean 1 -zp_stdev 2 || exit 1
+camtool -addprocessedexp -exp_tag t11.2 -uri file://camp -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -sigma_ra 1 -sigma_dec 2 -nastro 42 -b1_uri file:///foo -b2_uri file://bar -zp_mean 1 -zp_stdev 2 || exit 1
Index: /trunk/ippTools/scripts/chiptest.sh
===================================================================
--- /trunk/ippTools/scripts/chiptest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/chiptest.sh	(revision 12024)
@@ -3,15 +3,15 @@
 set -o verbose
 
-p0test.sh || exit 1
+regtest.sh || exit 1
 
-p2tool -pendingimfile || exit 1
+chiptool -pendingimfile || exit 1
 
 for ID in `seq 0 3`; do
-    p2tool -addprocessedimfile -exp_tag t10.1 -class_id $ID -uri file://p2p-t10.$ID -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -b1_uri file:///foo -b2_uri file://bar || exit 1
+    chiptool -addprocessedimfile -exp_tag t10.1 -class_id $ID -uri file://chipp-t10.$ID -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -b1_uri file:///foo -b2_uri file://bar || exit 1
 done;
 
 for ID in `seq 0 3`; do
-    p2tool -addprocessedimfile -exp_tag t11.2 -class_id $ID -uri file://p2p-t11.$ID -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -b1_uri file:///foo -b2_uri file://bar || exit 1
+    chiptool -addprocessedimfile -exp_tag t11.2 -class_id $ID -uri file://chipp-t11.$ID -recip myrecipe -bg 1 -bg_stdev 2 -bg_mean_stdev 3 -b1_uri file:///foo -b2_uri file://bar || exit 1
 done;
 
-p2tool -pendingimfile || exit 1
+chiptool -pendingimfile || exit 1
Index: /trunk/ippTools/scripts/dettest.sh
===================================================================
--- /trunk/ippTools/scripts/dettest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/dettest.sh	(revision 12024)
@@ -5,5 +5,5 @@
 det_id=1
 
-./p0test.sh -detrend || exit 1
+./regtest.sh -detrend || exit 1
 
 det_id=`dettool -definebyquery -det_type flat -exp_type fooflat -filter foo -airmass_min 1 -airmass_max 10 -exp_time_min 10 -exp_time_max 30.0 -workdir file::///some/path -simple | cut -f1 -d" "` || exit 1
Index: /trunk/ippTools/scripts/difftest.sh
===================================================================
--- /trunk/ippTools/scripts/difftest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/difftest.sh	(revision 12024)
@@ -3,14 +3,14 @@
 set -o verbose
 
-p4test.sh || exit 1
+warptest.sh || exit 1
 
 
-p5tool -definerun -workdir file:///tmp/p5 -skycell_id foo -tess_id bar || exit 1
-p5tool -addinputskyfile -p5_id 2 -p4_id 1 -skycell_id foo1 -tess_id bar1 -kind warped -template || exit 1
-p5tool -addinputskyfile -p5_id 2 -p4_id 1 -skycell_id foo2 -tess_id bar2 -kind warped || exit 1
-p5tool -updaterun -state run -p5_id 1 || exit 1
-p5tool -todiffskyfile || exit 1
-p5tool -inputskyfile || exit 1
-p5tool -adddiffskyfile -p5_id 1 -uri file:///tmp/p5/skyfile -bg 1 -bg_mean_stdev 2 || exit 1
-p5tool -diffskyfile -p5_id 1 || exit 1
-p5tool -updaterun -state stop -p5_id 1 || exit 1
+difftool -definerun -workdir file:///tmp/diff -skycell_id foo -tess_id bar || exit 1
+difftool -addinputskyfile -diff_id 2 -warp_id 1 -skycell_id foo1 -tess_id bar1 -kind warped -template || exit 1
+difftool -addinputskyfile -diff_id 2 -warp_id 1 -skycell_id foo2 -tess_id bar2 -kind warped || exit 1
+difftool -updaterun -state run -diff_id 1 || exit 1
+difftool -todiffskyfile || exit 1
+difftool -inputskyfile || exit 1
+difftool -adddiffskyfile -diff_id 1 -uri file:///tmp/diff/skyfile -bg 1 -bg_mean_stdev 2 || exit 1
+difftool -diffskyfile -diff_id 1 || exit 1
+difftool -updaterun -state stop -diff_id 1 || exit 1
Index: /trunk/ippTools/scripts/mapfile.txt
===================================================================
--- /trunk/ippTools/scripts/mapfile.txt	(revision 12023)
+++ /trunk/ippTools/scripts/mapfile.txt	(revision 12024)
@@ -1,19 +1,19 @@
-p4SkyCellMap MULTI
+warpSkyCellMap MULTI
 
-p4SkyCellMap METADATA
-    p4_id           S32     1
-    skycell_id      STR     foo
-    tess_id         STR     bar2
-    exp_tag         STR     baz2
-    p3_version      S32     0
-    class_id        STR     quix
+warpSkyCellMap METADATA
+    warp_id           S32     1
+    skycell_id      STR     foo1
+    tess_id         STR     bar
+    exp_tag         STR     t10.1
+    cam_version      S32     0
+    class_id        STR     quix1
 END
 
-p4SkyCellMap METADATA
-    p4_id           S32     1
+warpSkyCellMap METADATA
+    warp_id           S32     1
     skycell_id      STR     foo2
-    tess_id         STR     bar2
-    exp_tag         STR     baz
-    p3_version      S32     0
-    class_id        STR     quix
+    tess_id         STR     bar
+    exp_tag         STR     t10.1
+    cam_version      S32     0
+    class_id        STR     quix2
 END
Index: /trunk/ippTools/scripts/regtest.sh
===================================================================
--- /trunk/ippTools/scripts/regtest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/regtest.sh	(revision 12024)
@@ -4,5 +4,5 @@
 
 inject="pxinject"
-p0tool="p0tool"
+regtool="regtool"
 
 echo -e "YES\nipp\n\n" | pxadmin -recreate || exit 1
@@ -20,21 +20,21 @@
 done;
 
-$p0tool -pendingimfile || exit 1
+$regtool -pendingimfile || exit 1
 
 for ID in `seq 0 3`; do
-    $p0tool -addprocessedimfile -exp_tag $exp_tag1 -class OTA -class_id $ID -filter r -airmass 10 -ra 1 -decl 2 -exp_time 0 -bg 1 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 10 -posang 10 -object dog -dateobs 2006-10-20T10:10:10Z || exit 1
+    $regtool -addprocessedimfile -exp_tag $exp_tag1 -class OTA -class_id $ID -filter r -airmass 10 -ra 1 -decl 2 -exp_time 0 -bg 1 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 10 -posang 10 -object dog -dateobs 2006-10-20T10:10:10Z || exit 1
 done;
 
-$p0tool -pendingexp|| exit 1
+$regtool -pendingexp|| exit 1
 
-$p0tool -addprocessedexp -exp_tag $exp_tag1 -filter r -airmass 10 -ra 1 -decl 2 -exp_type bias -exp_time 0 -bg 10 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 45 -posang 10 -object dog -dateobs "2006-10-20T10:10:10Z" -label foobar $* || exit 1
+$regtool -addprocessedexp -exp_tag $exp_tag1 -filter r -airmass 10 -ra 1 -decl 2 -exp_type bias -exp_time 0 -bg 10 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 45 -posang 10 -object dog -dateobs "2006-10-20T10:10:10Z" -label foobar $* || exit 1
 
-$p0tool -pendingimfile || exit 1
+$regtool -pendingimfile || exit 1
 
 for ID in `seq 0 3`; do
-    $p0tool -addprocessedimfile -exp_tag $exp_tag2 -exp_type object -class OTA -class_id $ID -filter r -airmass 10 -ra 1 -decl 2 -exp_time 0 -bg 1 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 10 -posang 10 -object dog -dateobs 2006-10-20T10:10:10Z || exit 1
+    $regtool -addprocessedimfile -exp_tag $exp_tag2 -exp_type object -class OTA -class_id $ID -filter r -airmass 10 -ra 1 -decl 2 -exp_time 0 -bg 1 -bg_stdev 1 -bg_mean_stdev 10 -alt 10 -az 10 -ccd_temp 10 -posang 10 -object dog -dateobs 2006-10-20T10:10:10Z || exit 1
 done;
 
-$p0tool -pendingexp|| exit 1
+$regtool -pendingexp|| exit 1
 
-$p0tool -addprocessedexp -exp_tag $exp_tag2 -filter r -airmass 11 -ra 1 -decl 2 -exp_type bias -exp_time 0 -bg 11 -bg_stdev 1 -bg_mean_stdev 11 -alt 11 -az 11 -ccd_temp 45 -posang 11 -object dog -dateobs 2006-10-20T10:10:10Z -label foobar $* || exit 1
+$regtool -addprocessedexp -exp_tag $exp_tag2 -filter r -airmass 11 -ra 1 -decl 2 -exp_type bias -exp_time 0 -bg 11 -bg_stdev 1 -bg_mean_stdev 11 -alt 11 -az 11 -ccd_temp 45 -posang 11 -object dog -dateobs 2006-10-20T10:10:10Z -label foobar $* || exit 1
Index: /trunk/ippTools/scripts/warptest.sh
===================================================================
--- /trunk/ippTools/scripts/warptest.sh	(revision 12023)
+++ /trunk/ippTools/scripts/warptest.sh	(revision 12024)
@@ -3,28 +3,28 @@
 set -o verbose
 
-p3test.sh || exit 1
+camtest.sh || exit 1
 
-p4tool -definerun -mode warp -workdir file:///foo || exit 1
+warptool -definerun -mode warp -workdir file:///foo || exit 1
 
-p4tool -addinputexp -p4_id 1 -exp_tag t10.1 -p3_version 0 || exit 1
+warptool -addinputexp -warp_id 1 -exp_tag t10.1 -cam_version 0 || exit 1
 
-p4tool -updaterun -p4_id 1 -state run || exit 1
+warptool -updaterun -warp_id 1 -state run || exit 1
 
-p4tool -exp -p4_id 1 || exit 1
+warptool -exp -warp_id 1 || exit 1
 
-p4tool -imfile -p4_id 1 || exit 1
+warptool -imfile -warp_id 1 || exit 1
 
-p4tool -tooverlap -p4_id 1 || exit 1
+warptool -tooverlap -warp_id 1 || exit 1
 
-p4tool -addoverlap -mapfile mapfile.txt || exit 1
+warptool -addoverlap -mapfile mapfile.txt || exit 1
 
-p4tool -scmap || exit 1
+warptool -scmap || exit 1
 
-p4tool -towarped || exit 1
+warptool -towarped || exit 1
 
-p4tool -addwarped -p4_id 1 -skycell_id foo1 -tess_id bar -uri file:///tmp/foo -bg 1 -bg_mean_stdev 2 || exit 1
-p4tool -addwarped -p4_id 1 -skycell_id foo2 -tess_id bar -uri file:///tmp/foo -bg 1 -bg_mean_stdev 2 || exit 1
+warptool -addwarped -warp_id 1 -skycell_id foo1 -tess_id bar -uri file:///tmp/foo -bg 1 -bg_mean_stdev 2 || exit 1
+warptool -addwarped -warp_id 1 -skycell_id foo2 -tess_id bar -uri file:///tmp/foo -bg 1 -bg_mean_stdev 2 || exit 1
 
-p4tool -warped -p4_id 1 || exit 1
+warptool -warped -warp_id 1 || exit 1
 
-#p4tool -updaterun -p4_id 1 -state stop || exit 1
+#warptool -updaterun -warp_id 1 -state stop || exit 1
Index: /trunk/ippTools/src/camtool.c
===================================================================
--- /trunk/ippTools/src/camtool.c	(revision 12023)
+++ /trunk/ippTools/src/camtool.c	(revision 12024)
@@ -96,21 +96,21 @@
     psString query = psStringCopy(
             "SELECT"
-            "   p3PendingExp.*,"
+            "   camPendingExp.*,"
             "   rawExp.camera,"
             "   rawExp.workdir"
-            " FROM p3PendingExp"
+            " FROM camPendingExp"
             " JOIN rawExp"
             "   USING(exp_tag)"
-            " LEFT JOIN p3ProcessedExp"
+            " LEFT JOIN camProcessedExp"
             "   USING(exp_tag)"
-            " LEFT JOIN p3Mask"
-            "   ON p3PendingExp.label = p3Mask.label"
+            " LEFT JOIN camMask"
+            "   ON camPendingExp.label = camMask.label"
             " WHERE"
-            "   p3ProcessedExp.exp_tag IS NULL"
-            "   AND p3Mask.label IS NULL"
+            "   camProcessedExp.exp_tag IS NULL"
+            "   AND camMask.label IS NULL"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p3PendingExp");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "camPendingExp");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -138,5 +138,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p3PendingExp rows found");
+        psError(PS_ERR_UNKNOWN, false, "no camPendingExp rows found");
         psFree(output);
         return true;
@@ -154,5 +154,5 @@
 
     // negate simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p3PendingExp", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "camPendingExp", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -171,23 +171,23 @@
     psString query = psStringCopy(
             "SELECT"
-            "   p2ProcessedImfile.*,"
+            "   chipProcessedImfile.*,"
             "   rawExp.camera,"   
             "   rawExp.workdir"   
-            " FROM p3PendingExp"
-            " JOIN p2ProcessedImfile"
-            "   USING(exp_tag, p2_version)"
+            " FROM camPendingExp"
+            " JOIN chipProcessedImfile"
+            "   USING(exp_tag, chip_version)"
             " JOIN rawExp"
             "   USING(exp_tag)"
-            " LEFT JOIN p3ProcessedExp"
+            " LEFT JOIN camProcessedExp"
             "   USING(exp_tag)"
-            " LEFT JOIN p3Mask"
-            "   ON p3PendingExp.label = p3Mask.label"
+            " LEFT JOIN camMask"
+            "   ON camPendingExp.label = camMask.label"
             " WHERE"
-            "   p3ProcessedExp.exp_tag IS NULL"
-            "   AND p3Mask.label IS NULL"
+            "   camProcessedExp.exp_tag IS NULL"
+            "   AND camMask.label IS NULL"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p2ProcessedImfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "chipProcessedImfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -208,5 +208,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no pending p2ProcessedImfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no pending chipProcessedImfile rows found");
         psFree(output);
         return true;
@@ -224,5 +224,5 @@
 
     // negate simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p2ProcessedImfile", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -362,11 +362,11 @@
 
     psString query = psStringCopy(
-        "SELECT p3PendingExp.*"
-        " FROM p3PendingExp"
-        " LEFT JOIN p3ProcessedExp"
+        "SELECT camPendingExp.*"
+        " FROM camPendingExp"
+        " LEFT JOIN camProcessedExp"
         "   USING(exp_tag)"
         " WHERE"
-        "   p3ProcessedExp.exp_tag IS NULL"
-        "   AND p3PendingExp.exp_tag = '%s'"
+        "   camProcessedExp.exp_tag IS NULL"
+        "   AND camPendingExp.exp_tag = '%s'"
     );
 
@@ -384,5 +384,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p3PendingExp rows found");
+        psError(PS_ERR_UNKNOWN, false, "no camPendingExp rows found");
         psFree(output);
         return true;
@@ -390,5 +390,5 @@
 
     // start a transaction so we don't end up with an exp_tag is both
-    // p3PendingExp & p3ProcessedExp
+    // camPendingExp & camProcessedExp
     if (!psDBTransaction(config->dbh)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -397,11 +397,11 @@
     }
 
-    p3PendingExpRow *pendingRow = p3PendingExpObjectFromMetadata(output->data[0]);
+    camPendingExpRow *pendingRow = camPendingExpObjectFromMetadata(output->data[0]);
     psFree(output);
-    // create a new p3ProcessedImfile object
-    p3ProcessedExpRow *row = p3ProcessedExpRowAlloc(
+    // create a new camProcessedImfile object
+    camProcessedExpRow *row = camProcessedExpRowAlloc(
         exp_tag,
-        pendingRow->p3_version,
-        pendingRow->p2_version,
+        pendingRow->cam_version,
+        pendingRow->chip_version,
         pendingRow->label,
         uri,
@@ -422,6 +422,6 @@
     );
 
-    // insert the new row into the p3ProcessedImfile table
-    if (!p3ProcessedExpInsertObject(config->dbh, row)) {
+    // insert the new row into the camProcessedImfile table
+    if (!camProcessedExpInsertObject(config->dbh, row)) {
         // rollback
         if (!psDBRollback(config->dbh)) {
@@ -435,6 +435,6 @@
     psFree(row);
 
-    // delete the p3PendingExp row from the database
-    if (!p3PendingExpDeleteObject(config->dbh, pendingRow)) {
+    // delete the camPendingExp row from the database
+    if (!camPendingExpDeleteObject(config->dbh, pendingRow)) {
         // rollback
         if (!psDBRollback(config->dbh)) {
@@ -448,5 +448,5 @@
     psFree(pendingRow);
 
-    // point of no return for p3PendingExp -> p3ProcessedExp
+    // point of no return for camPendingExp -> camProcessedExp
     if (!psDBCommit(config->dbh)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -476,12 +476,12 @@
     psString query = psStringCopy(
             "SELECT"
-            "   p3ProcessedExp.*,"
+            "   camProcessedExp.*,"
             "   rawExp.camera,"
             "   rawExp.workdir"
-            " FROM p3ProcessedExp"
+            " FROM camProcessedExp"
             " JOIN rawExp"
             "   USING(exp_tag)"   
             " WHERE"
-            "   p3ProcessedExp.exp_tag IS NOT NULL"
+            "   camProcessedExp.exp_tag IS NOT NULL"
     );
 
@@ -494,8 +494,8 @@
     if (faulted) {
         // list only faulted rows
-        psStringAppend(&query, " %s", "AND p3ProcessedExp.fault != 0");
+        psStringAppend(&query, " %s", "AND camProcessedExp.fault != 0");
     } else {
         // don't list faulted rows
-        psStringAppend(&query, " %s", "AND p3ProcessedExp.fault = 0");
+        psStringAppend(&query, " %s", "AND camProcessedExp.fault = 0");
     }
 
@@ -521,5 +521,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p3ProcessedExp rows found");
+        psError(PS_ERR_UNKNOWN, false, "no camProcessedExp rows found");
         psFree(output);
         return true;
@@ -537,5 +537,5 @@
 
     // negate simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p3ProcessedExp", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "camProcessedExp", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -560,5 +560,5 @@
     }
 
-    if (!pxSetFaultCode(config->dbh, "p3ProcessedExp", config->where, code)) {
+    if (!pxSetFaultCode(config->dbh, "camProcessedExp", config->where, code)) {
         psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
         return false;
@@ -584,5 +584,5 @@
     }
 
-    if (!p3MaskInsert(config->dbh, label)) {
+    if (!camMaskInsert(config->dbh, label)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         return false;
@@ -596,5 +596,5 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    psString query = psStringCopy("SELECT * FROM p3Mask");
+    psString query = psStringCopy("SELECT * FROM camMask");
 
     if (!p_psDBRunQuery(config->dbh, query)) {
@@ -612,5 +612,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p3Mask rows found");
+        psError(PS_ERR_UNKNOWN, false, "no camMask rows found");
         psFree(output);
         return true;
@@ -628,5 +628,5 @@
 
     // negative simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p3Mask", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "camMask", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -654,5 +654,5 @@
     }
 
-    char *query = "DELETE FROM p3Mask WHERE label = '%s'";
+    char *query = "DELETE FROM camMask WHERE label = '%s'";
 
     if (!p_psDBRunQuery(config->dbh, query, label)) {
Index: /trunk/ippTools/src/camtoolConfig.c
===================================================================
--- /trunk/ippTools/src/camtoolConfig.c	(revision 12023)
+++ /trunk/ippTools/src/camtoolConfig.c	(revision 12024)
@@ -48,8 +48,8 @@
     psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "search by exposure ID", NULL);
-    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-p2_version", 0,
-            "search for exposures with this p2 version", -1);
-    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-p3_version", 0,
-            "search for exposures with this p3 version", -1);
+    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-chip_version", 0,
+            "search for exposures with this chip version", -1);
+    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-cam_version", 0,
+            "search for exposures with this cam version", -1);
     psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit",  0,
         "limit result set to N items", 0);
@@ -107,8 +107,8 @@
     psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "search by exposure ID", NULL);
-    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-p2_version", 0,
-            "search for exposures with this p2 version", -1);
-    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-p3_version", 0,
-            "search for exposures with this p3 version", -1);
+    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-chip_version", 0,
+            "search for exposures with this chip version", -1);
+    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-cam_version", 0,
+            "search for exposures with this cam version", -1);
     psMetadataAddU64(processedexpArgs, PS_LIST_TAIL, "-limit",  0,
         "limit result set to N items", 0);
Index: /trunk/ippTools/src/chiptool.c
===================================================================
--- /trunk/ippTools/src/chiptool.c	(revision 12023)
+++ /trunk/ippTools/src/chiptool.c	(revision 12024)
@@ -1,4 +1,4 @@
 /*
- * p2tool.c
+ * chiptool.c
  *
  * Copyright (C) 2006  Joshua Hoblitt
@@ -38,8 +38,8 @@
 static bool unblockMode(pxConfig *config);
 
-static p2ProcessedImfileRow *p2PendingToProcessedImfile(pxConfig *config, p2PendingImfileRow *imfile);
-static p2ProcessedExpRow *p2PendingToProcessedExp(pxConfig *config, p2PendingExpRow *pendingExp);
-static p3PendingExpRow *p2PendingToP3PendingExp(pxConfig *config, p2PendingExpRow *pendingExp);
-static bool p2ProcessedCompleteExp(pxConfig *config);
+static chipProcessedImfileRow *chipPendingToProcessedImfile(pxConfig *config, chipPendingImfileRow *imfile);
+static chipProcessedExpRow *chipPendingToProcessedExp(pxConfig *config, chipPendingExpRow *pendingExp);
+static camPendingExpRow *chipPendingTocamPendingExp(pxConfig *config, chipPendingExpRow *pendingExp);
+static bool chipProcessedCompleteExp(pxConfig *config);
 
 # define MODECASE(caseName, func) \
@@ -166,13 +166,13 @@
     // XXX this does not work!!!
     psString query = psStringCopy(
-            "INSERT INTO p2PendingExp\n"
+            "INSERT INTO chipPendingExp\n"
             "   SElECT\n"
             "       exp_tag,\n"
             "       'my recipe',\n"  // recipe
-            "       255\n"         // p1_version
-            "       255\n"         // p2_version
+            "       255\n"         // guide_version
+            "       255\n"         // chip_version
             "       %s\n"
             "   FROM rawExp"
-            "   LEFT JOIN p2ProcessedExp"
+            "   LEFT JOIN chipProcessedExp"
             "       USING(exp_tag)"
             "   WHERE"
@@ -200,5 +200,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2PendingImfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipPendingImfile rows found");
         psFree(output);
         return false;
@@ -220,23 +220,23 @@
 
     // XXX does this need to be constrained so that it won't return any results
-    // if a match p2PendingExp hasn't been registered?
+    // if a match chipPendingExp hasn't been registered?
     psString query = psStringCopy(
             "SELECT"
-            "   p2PendingImfile.*,"
+            "   chipPendingImfile.*,"
             "   rawExp.camera,"
             "   rawExp.workdir"
-            " FROM p2PendingImfile"
-            " JOIN p2PendingExp"
+            " FROM chipPendingImfile"
+            " JOIN chipPendingExp"
             "   USING(exp_tag)"
             " JOIN rawExp"
             "   USING(exp_tag)"
-            " LEFT JOIN p2Mask"
-            "   ON p2PendingExp.label = p2Mask.label"
+            " LEFT JOIN chipMask"
+            "   ON chipPendingExp.label = chipMask.label"
             " WHERE"
-            "   p2Mask.label IS NULL"
+            "   chipMask.label IS NULL"
         );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p2PendingImfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "chipPendingImfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -264,5 +264,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2PendingImfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipPendingImfile rows found");
         psFree(output);
         return true;
@@ -280,5 +280,5 @@
 
     // negative simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p2PendingImfile", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "chipPendingImfile", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -296,25 +296,25 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    // select * from p2ProcessedImfiles
+    // select * from chipProcessedImfiles
     // where
-    // exp_tag & class_id are not in p2PendingImfile
+    // exp_tag & class_id are not in chipPendingImfile
 
     // add the completed imfile to
-    // the p2ProcessedeImfile tables
+    // the chipProcessedeImfile tables
     // remove corresponding entries from the
-    // p2PendingImfile table
-    // check to see if any p2PendingExps have no
-    // associated p2PendingImfiles
-    // if so move the p2PendingExp(s) to p2ProcessedExp
+    // chipPendingImfile table
+    // check to see if any chipPendingExps have no
+    // associated chipPendingImfiles
+    // if so move the chipPendingExp(s) to chipProcessedExp
 
     psString query = psStringCopy(
         "SELECT DISTINCT"
-        "   p2PendingImfile.*"
-        " FROM p2PendingImfile "
-        " LEFT JOIN p2ProcessedImfile"
+        "   chipPendingImfile.*"
+        " FROM chipPendingImfile "
+        " LEFT JOIN chipProcessedImfile"
         "   USING(exp_tag, class_id)"
         " WHERE"
-        "  p2ProcessedImfile.exp_tag IS NULL"
-        "  AND p2ProcessedImfile.class_id IS NULL"
+        "  chipProcessedImfile.exp_tag IS NULL"
+        "  AND chipProcessedImfile.class_id IS NULL"
         );
     {
@@ -349,5 +349,5 @@
         }
 
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p2PendingImfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "chipPendingImfile");
         psFree(where);
         if (whereClause) {
@@ -371,5 +371,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2PendingImfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipPendingImfile rows found");
         psFree(output);
         return false;
@@ -384,12 +384,12 @@
     }
 
-    // insert into p2ProcessedImfile
-    // remove p2PendingImfile entry
+    // insert into chipProcessedImfile
+    // remove chipPendingImfile entry
     for (long i = 0; i < psArrayLength(output); i++) {
         psMetadata *row = output->data[i];
-        // convert metadata into a p2PendingImfile object
-        p2PendingImfileRow *object = p2PendingImfileObjectFromMetadata(row);
-        // convert p2PendingImfile object into a p2ProcessedImfile object
-        p2ProcessedImfileRow *imfile = p2PendingToProcessedImfile(config, object);
+        // convert metadata into a chipPendingImfile object
+        chipPendingImfileRow *object = chipPendingImfileObjectFromMetadata(row);
+        // convert chipPendingImfile object into a chipProcessedImfile object
+        chipProcessedImfileRow *imfile = chipPendingToProcessedImfile(config, object);
         if (!imfile) {
             // rollback
@@ -397,11 +397,11 @@
                 psError(PS_ERR_UNKNOWN, false, "database error");
             }
-            psError(PS_ERR_UNKNOWN, false, "failed to convert p2PendingImfile to p2ProcessedImfile");
+            psError(PS_ERR_UNKNOWN, false, "failed to convert chipPendingImfile to chipProcessedImfile");
             psFree(object);
             psFree(output);
             return false;
         }
-        // insert p2ProccessedImfile object into the database
-        if (!p2ProcessedImfileInsertObject(config->dbh, imfile)) {
+        // insert chipProccessedImfile object into the database
+        if (!chipProcessedImfileInsertObject(config->dbh, imfile)) {
             // rollback
             if (!psDBRollback(config->dbh)) {
@@ -415,6 +415,6 @@
         }
         psFree(imfile);
-        // delete the p2PendingImfile object from the database
-        if (!p2PendingImfileDeleteObject(config->dbh, object)) {
+        // delete the chipPendingImfile object from the database
+        if (!chipPendingImfileDeleteObject(config->dbh, object)) {
             // there must be atleast 1 Imfile to get this far
             // rollback
@@ -437,5 +437,5 @@
     // migration can't happen.
 
-    if (!p2ProcessedCompleteExp(config)) {
+    if (!chipProcessedCompleteExp(config)) {
         // rollback
         if (!psDBRollback(config->dbh)) {
@@ -446,6 +446,6 @@
     }
 
-    // point of no return for p2PendingImfile -> p2ProcessedImfile
-    // point of no return for p2PendingExp -> p2ProcessedExp
+    // point of no return for chipPendingImfile -> chipProcessedImfile
+    // point of no return for chipPendingExp -> chipProcessedExp
     if (!psDBCommit(config->dbh)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -475,19 +475,19 @@
 
     // XXX does this need to be constrained so that it won't return any results
-    // if a match p2PendingExp hasn't been registered?
+    // if a match chipPendingExp hasn't been registered?
     psString query = psStringCopy(
             "SELECT"
-            "   p2ProcessedImfile.*,"
+            "   chipProcessedImfile.*,"
             "   rawExp.camera,"
             "   rawExp.workdir"
-            " FROM p2ProcessedImfile"
+            " FROM chipProcessedImfile"
             " JOIN rawExp"
             "   USING(exp_tag)"
             " WHERE "
-            "   p2ProcessedImfile.exp_tag is NOT NULL" // bogus test -- just here so there there is a 'WHERE' stmt to append conditionals too
+            "   chipProcessedImfile.exp_tag is NOT NULL" // bogus test -- just here so there there is a 'WHERE' stmt to append conditionals too
         );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p2ProcessedImfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "chipProcessedImfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -496,8 +496,8 @@
     if (faulted) {
         // list only faulted rows
-        psStringAppend(&query, " %s", "AND p2ProcessedImfile.fault != 0");
+        psStringAppend(&query, " %s", "AND chipProcessedImfile.fault != 0");
     } else {
         // don't list faulted rows
-        psStringAppend(&query, " %s", "AND p2ProcessedImfile.fault = 0");
+        psStringAppend(&query, " %s", "AND chipProcessedImfile.fault = 0");
     }
 
@@ -523,5 +523,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2ProcessedImfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipProcessedImfile rows found");
         psFree(output);
         return true;
@@ -539,5 +539,5 @@
 
     // negative simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p2ProcessedImfile", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -562,5 +562,5 @@
     }
 
-    if (!pxSetFaultCode(config->dbh, "p2ProcessedImfile", config->where, code)) {
+    if (!pxSetFaultCode(config->dbh, "chipProcessedImfile", config->where, code)) {
         psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
         return false;
@@ -586,5 +586,5 @@
     }
 
-    if (!p2MaskInsert(config->dbh, label)) {
+    if (!chipMaskInsert(config->dbh, label)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         return false;
@@ -599,5 +599,5 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    psString query = psStringCopy("SELECT * FROM p2Mask");
+    psString query = psStringCopy("SELECT * FROM chipMask");
 
     if (!p_psDBRunQuery(config->dbh, query)) {
@@ -615,5 +615,5 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2Mask rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipMask rows found");
         psFree(output);
         return true;
@@ -631,5 +631,5 @@
 
     // negative simple so the default is true
-    if (!ippdbPrintMetadatas(stdout, output, "p2Mask", !simple)) {
+    if (!ippdbPrintMetadatas(stdout, output, "chipMask", !simple)) {
         psError(PS_ERR_UNKNOWN, false, "failed to print array");
         psFree(output);
@@ -658,5 +658,5 @@
     }
 
-    char *query = "DELETE FROM p2Mask WHERE label = '%s'";
+    char *query = "DELETE FROM chipMask WHERE label = '%s'";
 
     if (!p_psDBRunQuery(config->dbh, query, label)) {
@@ -670,37 +670,37 @@
 
 
-static bool p2ProcessedCompleteExp(pxConfig *config)
+static bool chipProcessedCompleteExp(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    // look for completed p2PendingExp
-    // migrate them to p2ProccessedExp & p3PendingExp
-
-    // select * from p2PendingExp
-    // where exp_tag is not in p2ProcessedExp
-    // where exp_tag is not in p2PendingImfile
-    // where the number of entries in p2ProccessedImfile matches the .imfiles
+    // look for completed chipPendingExp
+    // migrate them to chipProccessedExp & camPendingExp
+
+    // select * from chipPendingExp
+    // where exp_tag is not in chipProcessedExp
+    // where exp_tag is not in chipPendingImfile
+    // where the number of entries in chipProccessedImfile matches the .imfiles
     // entry in rawExp
     psString query = psStringCopy(
         "SELECT DISTINCT"
-        "   p2PendingExp.*,"
+        "   chipPendingExp.*,"
         "   rawExp.imfiles,"
-        "   p2ProcessedImfile.class_id"
-        " FROM p2PendingExp"
+        "   chipProcessedImfile.class_id"
+        " FROM chipPendingExp"
         " JOIN rawExp"
-        "   ON p2PendingExp.exp_tag = rawExp.exp_tag"
-        " LEFT JOIN p2ProcessedExp"
-        "   ON p2PendingExp.exp_tag = p2ProcessedExp.exp_tag"
-        " LEFT JOIN p2PendingImfile"
-        "   ON p2PendingExp.exp_tag = p2PendingImfile.exp_tag"
-        " LEFT JOIN p2ProcessedImfile"
-        "   ON p2PendingExp.exp_tag = p2ProcessedImfile.exp_tag"
+        "   ON chipPendingExp.exp_tag = rawExp.exp_tag"
+        " LEFT JOIN chipProcessedExp"
+        "   ON chipPendingExp.exp_tag = chipProcessedExp.exp_tag"
+        " LEFT JOIN chipPendingImfile"
+        "   ON chipPendingExp.exp_tag = chipPendingImfile.exp_tag"
+        " LEFT JOIN chipProcessedImfile"
+        "   ON chipPendingExp.exp_tag = chipProcessedImfile.exp_tag"
         " WHERE"
-        "  p2ProcessedExp.exp_tag IS NULL"
-        "  AND p2PendingImfile.exp_tag IS NULL"
-        "  AND p2ProcessedImfile.exp_tag IS NOT NULL"
+        "  chipProcessedExp.exp_tag IS NULL"
+        "  AND chipPendingImfile.exp_tag IS NULL"
+        "  AND chipProcessedImfile.exp_tag IS NOT NULL"
         " GROUP BY"
-        "   p2PendingExp.exp_tag"
-        " HAVING rawExp.imfiles = COUNT(p2ProcessedImfile.class_id)"
+        "   chipPendingExp.exp_tag"
+        " HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)"
         );
 
@@ -719,30 +719,30 @@
     if (!psArrayLength(output)) {
         // XXX check psError here
-        psError(PS_ERR_UNKNOWN, false, "no p2PendingExp rows found");
+        psError(PS_ERR_UNKNOWN, false, "no chipPendingExp rows found");
         psFree(output);
         return true;
     }
 
-    // insert into p2ProcessedExp
-    // insert into p3PendingExp
-    // remove p2PendingExp entry
+    // insert into chipProcessedExp
+    // insert into camPendingExp
+    // remove chipPendingExp entry
     for (long i = 0; i < psArrayLength(output); i++) {
         psMetadata *row = output->data[i];
-        // convert metadata into a p2PendingExp object
-        p2PendingExpRow *object = p2PendingExpObjectFromMetadata(row);
+        // convert metadata into a chipPendingExp object
+        chipPendingExpRow *object = chipPendingExpObjectFromMetadata(row);
         // do both *Exp type conversion first so we don't insert one and then
         // have to rollback the change as the 2nd failed
-        // convert p2PendingExp object into a p2ProcesseExp object
-        p2ProcessedExpRow *processedExp = p2PendingToProcessedExp(config, object);
+        // convert chipPendingExp object into a chipProcesseExp object
+        chipProcessedExpRow *processedExp = chipPendingToProcessedExp(config, object);
         if (!processedExp) {
-            psError(PS_ERR_UNKNOWN, false, "failed to convert p2PendingExp to p2ProcessedExp");
+            psError(PS_ERR_UNKNOWN, false, "failed to convert chipPendingExp to chipProcessedExp");
             psFree(object);
             psFree(output);
             return false;
         }
-        // convert p2PendingExp object into a p3PendingExp object
-        p3PendingExpRow *pendingExp = p2PendingToP3PendingExp(config, object);
+        // convert chipPendingExp object into a camPendingExp object
+        camPendingExpRow *pendingExp = chipPendingTocamPendingExp(config, object);
         if (!processedExp) {
-            psError(PS_ERR_UNKNOWN, false, "failed to convert p2PendingExp to p3PendingExp");
+            psError(PS_ERR_UNKNOWN, false, "failed to convert chipPendingExp to camPendingExp");
             psFree(processedExp);
             psFree(object);
@@ -750,6 +750,6 @@
             return false;
         }
-        // insert p2ProccessedExp object into the database
-        if (!p2ProcessedExpInsertObject(config->dbh, processedExp)) {
+        // insert chipProccessedExp object into the database
+        if (!chipProcessedExpInsertObject(config->dbh, processedExp)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
             psFree(processedExp);
@@ -760,6 +760,6 @@
         }
         psFree(processedExp);
-        // insert p3PendingExp object into the database
-        if (!p3PendingExpInsertObject(config->dbh, pendingExp)) {
+        // insert camPendingExp object into the database
+        if (!camPendingExpInsertObject(config->dbh, pendingExp)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
             psFree(pendingExp);
@@ -769,6 +769,6 @@
         }
         psFree(pendingExp);
-        // delete the p2PendingExp object from the database
-        if (!p2PendingExpDeleteObject(config->dbh, object)) {
+        // delete the chipPendingExp object from the database
+        if (!chipPendingExpDeleteObject(config->dbh, object)) {
             // there must be atleast 1 Imfile to get this far
             psError(PS_ERR_UNKNOWN, false, "database error");
@@ -786,5 +786,5 @@
 
 
-static p2ProcessedImfileRow *p2PendingToProcessedImfile(pxConfig *config, p2PendingImfileRow *imfile)
+static chipProcessedImfileRow *chipPendingToProcessedImfile(pxConfig *config, chipPendingImfileRow *imfile)
 {
     PS_ASSERT_PTR_NON_NULL(config, NULL);
@@ -850,8 +850,8 @@
     }
 
-    return p2ProcessedImfileRowAlloc(
+    return chipProcessedImfileRowAlloc(
         imfile->exp_tag,
-        imfile->p2_version,
-        imfile->p1_version,
+        imfile->chip_version,
+        imfile->guide_version,
         imfile->class_id,
         recipe,
@@ -867,12 +867,12 @@
 
 
-static p2ProcessedExpRow *p2PendingToProcessedExp(pxConfig *config, p2PendingExpRow *pendingExp)
+static chipProcessedExpRow *chipPendingToProcessedExp(pxConfig *config, chipPendingExpRow *pendingExp)
 {
     PS_ASSERT_PTR_NON_NULL(pendingExp, NULL);
  
-    return p2ProcessedExpRowAlloc(
+    return chipProcessedExpRowAlloc(
         pendingExp->exp_tag,
-        pendingExp->p2_version,
-        pendingExp->p1_version,
+        pendingExp->chip_version,
+        pendingExp->guide_version,
         pendingExp->label,
         pendingExp->expgroup,
@@ -882,12 +882,12 @@
 
 
-static p3PendingExpRow *p2PendingToP3PendingExp(pxConfig *config, p2PendingExpRow *pendingExp)
+static camPendingExpRow *chipPendingTocamPendingExp(pxConfig *config, chipPendingExpRow *pendingExp)
 {
     PS_ASSERT_PTR_NON_NULL(pendingExp, NULL);
 
-    return p3PendingExpRowAlloc(
+    return camPendingExpRowAlloc(
         pendingExp->exp_tag,
-        0x0,        // p3 version
-        pendingExp->p2_version,
+        0x0,        // cam version
+        pendingExp->chip_version,
         pendingExp->label,
         pendingExp->expgroup,
Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 12023)
+++ /trunk/ippTools/src/dettool.c	(revision 12024)
@@ -5695,8 +5695,8 @@
     if (faulted) {
         // list only faulted rows
-        psStringAppend(&query, " %s", "AND p2ProcessedImfile.fault != 0");
+        psStringAppend(&query, " %s", "AND detRunSummary.fault != 0");
     } else {
         // don't list faulted rows
-        psStringAppend(&query, " %s", "AND p2ProcessedImfile.fault = 0");
+        psStringAppend(&query, " %s", "AND detRunSummary.fault = 0");
     }
 
Index: /trunk/ippTools/src/dettoolConfig.c
===================================================================
--- /trunk/ippTools/src/dettoolConfig.c	(revision 12023)
+++ /trunk/ippTools/src/dettoolConfig.c	(revision 12024)
@@ -942,7 +942,7 @@
         int n = 0;
         bool status = false;
-        if ((n = psMetadataLookupS32(&status, config->args, "-p1_version"))) {
-            if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p1_version", 0, "==", n)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item p1_version");
+        if ((n = psMetadataLookupS32(&status, config->args, "-guide_version"))) {
+            if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "guide_version", 0, "==", n)) {
+                psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");
                 psFree(config);
                 return NULL;
Index: /trunk/ippTools/src/difftool.c
===================================================================
--- /trunk/ippTools/src/difftool.c	(revision 12023)
+++ /trunk/ippTools/src/difftool.c	(revision 12024)
@@ -39,5 +39,5 @@
 static bool diffskyfileMode(pxConfig *config);
 
-static bool setp5RunState(pxConfig *config, const char *p4_id, const char *state);
+static bool setdiffRunState(pxConfig *config, const char *warp_id, const char *state);
 
 # define MODECASE(caseName, func) \
@@ -139,5 +139,5 @@
     }
 
-    p5RunRow *run = p5RunRowAlloc(
+    diffRunRow *run = diffRunRowAlloc(
             0,          // ID
             "reg",      // state
@@ -150,8 +150,8 @@
     psFree(registered);
     if (!run) {
-        psError(PS_ERR_UNKNOWN, false, "failed to alloc p5Run object");
+        psError(PS_ERR_UNKNOWN, false, "failed to alloc diffRun object");
         return true;
     }
-    if (!p5RunInsertObject(config->dbh, run)) {
+    if (!diffRunInsertObject(config->dbh, run)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         psFree(run);
@@ -159,6 +159,6 @@
     }
 
-    // get the assigned p5_id
-    run->p5_id = psDBLastInsertID(config->dbh);
+    // get the assigned diff_id
+    run->diff_id = psDBLastInsertID(config->dbh);
 
     bool simple = false;
@@ -173,5 +173,5 @@
     }
 
-    if (!p5RunPrintObject(stdout, run, !simple)) {
+    if (!diffRunPrintObject(stdout, run, !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print object");
             psFree(run);
@@ -190,11 +190,11 @@
 
     bool status = false;
-    psString p5_id = psMetadataLookupStr(&status, config->args, "-p5_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p5_id");
-        return false;
-    }
-    if (!p5_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p5_id is required");
+    psString diff_id = psMetadataLookupStr(&status, config->args, "-diff_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -diff_id");
+        return false;
+    }
+    if (!diff_id) {
+        psError(PS_ERR_UNKNOWN, true, "-diff_id is required");
         return false;
     }
@@ -212,5 +212,5 @@
     if (state) {
         // set detRun.state to state
-        return setp5RunState(config, p5_id, state);
+        return setdiffRunState(config, diff_id, state);
     }
 
@@ -224,21 +224,21 @@
 
     bool status = false;
-    psString p5_id = psMetadataLookupStr(&status, config->args, "-p5_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p5_id");
-        return false;
-    }
-    if (!p5_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p5_id is required");
-        return false;
-    }
-
-    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
-        return false;
-    }
-    if (!p5_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p5_id is required");
+    psString diff_id = psMetadataLookupStr(&status, config->args, "-diff_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -diff_id");
+        return false;
+    }
+    if (!diff_id) {
+        psError(PS_ERR_UNKNOWN, true, "-diff_id is required");
+        return false;
+    }
+
+    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
+        return false;
+    }
+    if (!diff_id) {
+        psError(PS_ERR_UNKNOWN, true, "-diff_id is required");
         return false;
     }
@@ -277,10 +277,10 @@
     }
 
-    // XXX need to validate the p4_id here
+    // XXX need to validate the warp_id here
     // XXX instead of validiting it here we should just use forgein key
     // constrants
-    if (!p5InputSkyfileInsert(config->dbh, 
-            (psS32)atoi(p5_id),
-            (psS32)atoi(p4_id),
+    if (!diffInputSkyfileInsert(config->dbh, 
+            (psS32)atoi(diff_id),
+            (psS32)atoi(warp_id),
             skycell_id,
             tess_id,
@@ -310,19 +310,19 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p4Skyfile.*,\n"
-        "   p5InputSkyfile.template\n"
-        " FROM p5Run\n"
-        " JOIN p5InputSkyfile\n"
-        "   USING(p5_id)\n"
-        " JOIN p4Skyfile\n"
-        "   ON p5InputSkyfile.p4_id      = p4Skyfile.p4_id\n"
-        "  AND p5InputSkyfile.skycell_id = p4Skyfile.skycell_id\n"
-        "  AND p5InputSkyfile.tess_id    = p4Skyfile.tess_id\n"
+        "   warpSkyfile.*,\n"
+        "   diffInputSkyfile.template\n"
+        " FROM diffRun\n"
+        " JOIN diffInputSkyfile\n"
+        "   USING(diff_id)\n"
+        " JOIN warpSkyfile\n"
+        "   ON diffInputSkyfile.warp_id      = warpSkyfile.warp_id\n"
+        "  AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id\n"
+        "  AND diffInputSkyfile.tess_id    = warpSkyfile.tess_id\n"
         " WHERE\n"
-        "   p5Run.state = 'run'\n" 
+        "   diffRun.state = 'run'\n" 
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5InputSkyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "diffInputSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -358,5 +358,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p5InputSkyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no diffInputSkyfile rows found");
         psFree(output);
         return true;
@@ -375,5 +375,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p5InputSkyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "diffInputSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -402,21 +402,21 @@
     psString query = psStringCopy( 
         "SELECT DISTINCT\n"
-        "   p5Run.p5_id\n"
-        " FROM p5Run\n"
-        " JOIN p5InputSkyfile\n"
-        "   USING(p5_id)\n"
-        " JOIN p4Skyfile\n"
-        "   ON p5InputSkyfile.p4_id      = p4Skyfile.p4_id\n"
-        "  AND p5InputSkyfile.skycell_id = p4Skyfile.skycell_id\n"
-        "  AND p5InputSkyfile.tess_id    = p4Skyfile.tess_id\n"
-        " LEFT JOIN p5DiffSkyfile\n"
-        "   ON p5InputSkyfile.p5_id      = p5DiffSkyfile.p5_id\n"
+        "   diffRun.diff_id\n"
+        " FROM diffRun\n"
+        " JOIN diffInputSkyfile\n"
+        "   USING(diff_id)\n"
+        " JOIN warpSkyfile\n"
+        "   ON diffInputSkyfile.warp_id      = warpSkyfile.warp_id\n"
+        "  AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id\n"
+        "  AND diffInputSkyfile.tess_id    = warpSkyfile.tess_id\n"
+        " LEFT JOIN diffSkyfile\n"
+        "   ON diffInputSkyfile.diff_id      = diffSkyfile.diff_id\n"
         " WHERE\n"
-        "   p5Run.state = 'run'\n" 
-        "   AND p5DiffSkyfile.p5_id IS NULL\n"
+        "   diffRun.state = 'run'\n" 
+        "   AND diffSkyfile.diff_id IS NULL\n"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5Skyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "diffSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -452,5 +452,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p5Skyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no diffSkyfile rows found");
         psFree(output);
         return true;
@@ -469,5 +469,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p5Skyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "diffSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -487,11 +487,11 @@
 
     bool status = false;
-    psString p5_id = psMetadataLookupStr(&status, config->args, "-p5_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p5_id");
-        return false;
-    }
-    if (!p5_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p5_id is required");
+    psString diff_id = psMetadataLookupStr(&status, config->args, "-diff_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -diff_id");
+        return false;
+    }
+    if (!diff_id) {
+        psError(PS_ERR_UNKNOWN, true, "-diff_id is required");
         return false;
     }
@@ -525,6 +525,6 @@
     }
 
-    if (!p5DiffSkyfileInsert(config->dbh, 
-            (psS32)atoi(p5_id),
+    if (!diffSkyfileInsert(config->dbh, 
+            (psS32)atoi(diff_id),
             uri,
             bg,
@@ -538,5 +538,5 @@
     }
 
-    if (!setp5RunState(config, p5_id, "stop")) {
+    if (!setdiffRunState(config, diff_id, "stop")) {
         if (!psDBRollback(config->dbh)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
@@ -570,16 +570,16 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p5Run.skycell_id,\n"
-        "   p5Run.tess_id,\n"
-        "   p5DiffSkyfile.*\n"
-        " FROM p5Run\n"
-        " JOIN p5DiffSkyfile\n"
-        "   USING(p5_id)\n"
+        "   diffRun.skycell_id,\n"
+        "   diffRun.tess_id,\n"
+        "   diffSkyfile.*\n"
+        " FROM diffRun\n"
+        " JOIN diffSkyfile\n"
+        "   USING(diff_id)\n"
         " WHERE\n"
-        "   p5Run.state = 'run'\n" 
+        "   diffRun.state = 'run'\n" 
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5DiffSkyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "diffSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -615,5 +615,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p5DiffSkyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no diffSkyfile rows found");
         psFree(output);
         return true;
@@ -632,5 +632,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p5DiffSkyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "diffSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -644,7 +644,7 @@
 }
 
-static bool setp5RunState(pxConfig *config, const char *p5_id, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(p5_id, false);
+static bool setdiffRunState(pxConfig *config, const char *diff_id, const char *state)
+{
+    PS_ASSERT_PTR_NON_NULL(diff_id, false);
     PS_ASSERT_PTR_NON_NULL(state, false);
 
@@ -657,15 +657,15 @@
     ) {
         psError(PS_ERR_UNKNOWN, false,
-                "invalid p5Run state: %s", state);
-        return false;
-    }
-
-    char *query = "UPDATE p5Run SET state = '%s' WHERE p5_id = '%s'";
-    if (!p_psDBRunQuery(config->dbh, query, state, p5_id)) {
+                "invalid diffRun state: %s", state);
+        return false;
+    }
+
+    char *query = "UPDATE diffRun SET state = '%s' WHERE diff_id = '%s'";
+    if (!p_psDBRunQuery(config->dbh, query, state, diff_id)) {
         psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for p5_id %s", p5_id);
-        return false;
-    }
-
-    return true;
-}
+                "failed to change state for diff_id %s", diff_id);
+        return false;
+    }
+
+    return true;
+}
Index: /trunk/ippTools/src/difftoolConfig.c
===================================================================
--- /trunk/ippTools/src/difftoolConfig.c	(revision 12023)
+++ /trunk/ippTools/src/difftoolConfig.c	(revision 12024)
@@ -62,6 +62,6 @@
     // -updaterun
     psMetadata *updaterunArgs = psMetadataAlloc();
-    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "define p5 ID (required)", NULL);
+    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "define diff ID (required)", NULL);
     psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0,
             "set state (required)", NULL);
@@ -75,8 +75,8 @@
     // -addinputskyfile
     psMetadata *addinputskyfileArgs = psMetadataAlloc();
-    psMetadataAddStr(addinputskyfileArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "define p5 ID (required)", NULL);
-    psMetadataAddStr(addinputskyfileArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(addinputskyfileArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "define diff ID (required)", NULL);
+    psMetadataAddStr(addinputskyfileArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(addinputskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0,
             "define by skycell ID", NULL);
@@ -90,8 +90,8 @@
     // -inputskyfile
     psMetadata *inputskyfileArgs = psMetadataAlloc();
-    psMetadataAddStr(inputskyfileArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "search by p5 ID (required)", NULL);
-    psMetadataAddStr(inputskyfileArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "search by p4 ID (required)", NULL);
+    psMetadataAddStr(inputskyfileArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "search by diff ID (required)", NULL);
+    psMetadataAddStr(inputskyfileArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "search by warp ID (required)", NULL);
     psMetadataAddStr(inputskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0,
             "search by skycell ID", NULL);
@@ -109,6 +109,6 @@
     // -todiffskyfile
     psMetadata *todiffskyfileArgs = psMetadataAlloc();
-    psMetadataAddStr(todiffskyfileArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "search by p5 ID", NULL);
+    psMetadataAddStr(todiffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "search by diff ID", NULL);
     psMetadataAddU64(todiffskyfileArgs, PS_LIST_TAIL, "-limit",  0,
             "limit result set to N items", 0);
@@ -118,6 +118,6 @@
     // -adddiffskyfile
     psMetadata *adddiffskyfileArgs = psMetadataAlloc();
-    psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(adddiffskyfileArgs, PS_LIST_TAIL, "-uri", 0,
             "define URI of file (required)", 0);
@@ -129,6 +129,6 @@
     // -diffskyfile
     psMetadata *diffskyfileArgs = psMetadataAlloc();
-    psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-p5_id", 0,
-            "search by p4 ID", NULL);
+    psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0,
+            "search by warp ID", NULL);
     psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-skycell_id",  0,
             "define skycell ID (required)", NULL);
@@ -238,7 +238,7 @@
     psString str = NULL;
     bool status = false;
-    if ((str = psMetadataLookupStr(&status, config->args, "-p5_id"))) {
-        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p5_id", 0, "==", (psS32)atoi(str))) {
-            psError(PS_ERR_UNKNOWN, false, "failed to add item p5_id");
+    if ((str = psMetadataLookupStr(&status, config->args, "-diff_id"))) {
+        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "diff_id", 0, "==", (psS32)atoi(str))) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id");
             psFree(config);
             return NULL;
@@ -249,7 +249,7 @@
     psString str = NULL;
     bool status = false;
-    if ((str = psMetadataLookupStr(&status, config->args, "-p4_id"))) {
-        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p4_id", 0, "==", (psS32)atoi(str))) {
-            psError(PS_ERR_UNKNOWN, false, "failed to add item p4_id");
+    if ((str = psMetadataLookupStr(&status, config->args, "-warp_id"))) {
+        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "warp_id", 0, "==", (psS32)atoi(str))) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id");
             psFree(config);
             return NULL;
Index: /trunk/ippTools/src/guidetool.c
===================================================================
--- /trunk/ippTools/src/guidetool.c	(revision 12023)
+++ /trunk/ippTools/src/guidetool.c	(revision 12024)
@@ -29,5 +29,5 @@
 static bool pendingMode(pxConfig *config);
 static bool defineMode(pxConfig *config);
-static p1PendingExpRow *rawScienceTop1PendingExp(pxConfig *config, rawScienceExpRow *exp);
+static guidePendingExpRow *rawScienceToguidePendingExp(pxConfig *config, rawScienceExpRow *exp);
 
 int main(int argc, char **argv)
@@ -61,12 +61,12 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    // return all p1PendingExp rows unless there CLI search options
-    psArray *p1PendingExp = p1PendingExpSelectRowObjects(
+    // return all guidePendingExp rows unless there CLI search options
+    psArray *guidePendingExp = guidePendingExpSelectRowObjects(
         config->dbh,
         config->where ? config->where : NULL,
         0
     );
-    if (!p1PendingExp) {
-        psError(PS_ERR_UNKNOWN, false, "no p1PendingExp found");
+    if (!guidePendingExp) {
+        psError(PS_ERR_UNKNOWN, false, "no guidePendingExp found");
         return false;
     }
@@ -74,7 +74,7 @@
     psMetadata *output = psMetadataAlloc();
 
-    for (long i = 0; i < psArrayLength(p1PendingExp); i++) {
-        psMetadata *md = p1PendingExpMetadataFromObject(p1PendingExp->data[i]);
-        psMetadataAddMetadata(output, PS_LIST_TAIL, "p1PendingExp",
+    for (long i = 0; i < psArrayLength(guidePendingExp); i++) {
+        psMetadata *md = guidePendingExpMetadataFromObject(guidePendingExp->data[i]);
+        psMetadataAddMetadata(output, PS_LIST_TAIL, "guidePendingExp",
             PS_META_DUPLICATE_OK, NULL, md);
         psFree(md);
@@ -106,12 +106,12 @@
     }
 
-    // insert the rawScienceExps into p1PendingExp
+    // insert the rawScienceExps into guidePendingExp
     // XXX for the being we're going to skip checking for duplicate entries
     // XXX this will have to implimented unless duplicate key insertion 
     // XXX support is implimented in psDB
     for (long i = 0; i < psArrayLength(rawScienceExps); i++) {
-        p1PendingExpRow * new = rawScienceTop1PendingExp(
+        guidePendingExpRow * new = rawScienceToguidePendingExp(
                                             config, rawScienceExps->data[i]);
-        if (!p1PendingExpInsertObject(config->dbh, new)) {
+        if (!guidePendingExpInsertObject(config->dbh, new)) {
             psError(PS_ERR_UNKNOWN, false, "dbh access failed");
             return false; 
@@ -123,5 +123,5 @@
 }
 
-static p1PendingExpRow *rawScienceTop1PendingExp(pxConfig *config, rawScienceExpRow *exp)
+static guidePendingExpRow *rawScienceToguidePendingExp(pxConfig *config, rawScienceExpRow *exp)
 {
     PS_ASSERT_PTR_NON_NULL(config, NULL);
@@ -184,5 +184,5 @@
     }
 
-    return p1PendingExpRowAlloc(
+    return guidePendingExpRowAlloc(
         exp->exp_tag,
         exp->camera,
Index: /trunk/ippTools/src/guidetoolConfig.c
===================================================================
--- /trunk/ippTools/src/guidetoolConfig.c	(revision 12023)
+++ /trunk/ippTools/src/guidetoolConfig.c	(revision 12024)
@@ -66,6 +66,6 @@
     psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-recipe",  0,
         "define recipe of interest", NULL);
-    psMetadataAddS32(pendingArgs, PS_LIST_TAIL, "-p1_version",  0,
-        "define p1_version of interest", 0);
+    psMetadataAddS32(pendingArgs, PS_LIST_TAIL, "-guide_version",  0,
+        "define guide_version of interest", 0);
 
     // -define inputs
@@ -86,6 +86,6 @@
     psMetadataAddStr(defineArgs, PS_LIST_TAIL, "-recipe",  0,
         "define recipe of interest", NULL);
-    psMetadataAddS32(defineArgs, PS_LIST_TAIL, "-p1_version",  0,
-        "define p1_version of interest", 0);
+    psMetadataAddS32(defineArgs, PS_LIST_TAIL, "-guide_version",  0,
+        "define guide_version of interest", 0);
 
     // find which mode we're running under
@@ -182,7 +182,7 @@
     addWhereStr(stats);
     addWhereStr(recipe);
-    if ((n = psMetadataLookupS32(&status, config->args, "-p1_version"))) {
-        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p1_version", 0, "==", n)) {
-            psError(PS_ERR_UNKNOWN, false, "failed to add item p1_version");
+    if ((n = psMetadataLookupS32(&status, config->args, "-guide_version"))) {
+        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "guide_version", 0, "==", n)) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippTools/src/pxtables.c
===================================================================
--- /trunk/ippTools/src/pxtables.c	(revision 12023)
+++ /trunk/ippTools/src/pxtables.c	(revision 12024)
@@ -59,13 +59,13 @@
     CREATE_TABLE(rawExpCreateTable);
     CREATE_TABLE(rawImfileCreateTable);
-    CREATE_TABLE(p1PendingExpCreateTable);
-    CREATE_TABLE(p2PendingExpCreateTable);
-    CREATE_TABLE(p2PendingImfileCreateTable);
-    CREATE_TABLE(p2ProcessedExpCreateTable);
-    CREATE_TABLE(p2ProcessedImfileCreateTable);
-    CREATE_TABLE(p2MaskCreateTable);
-    CREATE_TABLE(p3PendingExpCreateTable);
-    CREATE_TABLE(p3ProcessedExpCreateTable);
-    CREATE_TABLE(p3MaskCreateTable);
+    CREATE_TABLE(guidePendingExpCreateTable);
+    CREATE_TABLE(chipPendingExpCreateTable);
+    CREATE_TABLE(chipPendingImfileCreateTable);
+    CREATE_TABLE(chipProcessedExpCreateTable);
+    CREATE_TABLE(chipProcessedImfileCreateTable);
+    CREATE_TABLE(chipMaskCreateTable);
+    CREATE_TABLE(camPendingExpCreateTable);
+    CREATE_TABLE(camProcessedExpCreateTable);
+    CREATE_TABLE(camMaskCreateTable);
     CREATE_TABLE(detRunCreateTable);
     CREATE_TABLE(detInputExpCreateTable);
@@ -79,14 +79,14 @@
     CREATE_TABLE(detResidExpCreateTable);
     CREATE_TABLE(detRunSummaryCreateTable);
-    CREATE_TABLE(p4RunCreateTable);
-    CREATE_TABLE(p4InputExpCreateTable);
-    CREATE_TABLE(p4SkyCellMapCreateTable);
-    CREATE_TABLE(p4SkyfileCreateTable);
-    CREATE_TABLE(p5RunCreateTable);
-    CREATE_TABLE(p5InputSkyfileCreateTable);
-    CREATE_TABLE(p5DiffSkyfileCreateTable);
-    CREATE_TABLE(p6RunCreateTable);
-    CREATE_TABLE(p6InputSkyfileCreateTable);
-    CREATE_TABLE(p6SumSkyfileCreateTable);
+    CREATE_TABLE(warpRunCreateTable);
+    CREATE_TABLE(warpInputExpCreateTable);
+    CREATE_TABLE(warpSkyCellMapCreateTable);
+    CREATE_TABLE(warpSkyfileCreateTable);
+    CREATE_TABLE(diffRunCreateTable);
+    CREATE_TABLE(diffInputSkyfileCreateTable);
+    CREATE_TABLE(diffSkyfileCreateTable);
+    CREATE_TABLE(stackRunCreateTable);
+    CREATE_TABLE(stackInputSkyfileCreateTable);
+    CREATE_TABLE(stackSumSkyfileCreateTable);
 
     return true;
@@ -99,9 +99,9 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    fprintf (stdout, "*** delete the P2 tables? ***\n");
+    fprintf (stdout, "*** delete the chip tables? ***\n");
     fprintf (stdout, "*** to delete the tables, answer YES, and give password ***\n");
     fprintf (stdout, "*** WARNING: this action is permanent ***\n\n");
 
-    fprintf (stdout, "delete the P2 tables (YES/[n]): ");
+    fprintf (stdout, "delete the chip tables (YES/[n]): ");
     fgets (line, 128, stdin);
     sscanf (line, "%s", answer);
@@ -135,13 +135,13 @@
     DROP_TABLE(rawExpDropTable);
     DROP_TABLE(rawImfileDropTable);
-    DROP_TABLE(p1PendingExpDropTable);
-    DROP_TABLE(p2PendingExpDropTable);
-    DROP_TABLE(p2PendingImfileDropTable);
-    DROP_TABLE(p2ProcessedExpDropTable);
-    DROP_TABLE(p2ProcessedImfileDropTable);
-    DROP_TABLE(p2MaskDropTable);
-    DROP_TABLE(p3PendingExpDropTable);
-    DROP_TABLE(p3ProcessedExpDropTable);
-    DROP_TABLE(p3MaskDropTable);
+    DROP_TABLE(guidePendingExpDropTable);
+    DROP_TABLE(chipPendingExpDropTable);
+    DROP_TABLE(chipPendingImfileDropTable);
+    DROP_TABLE(chipProcessedExpDropTable);
+    DROP_TABLE(chipProcessedImfileDropTable);
+    DROP_TABLE(chipMaskDropTable);
+    DROP_TABLE(camPendingExpDropTable);
+    DROP_TABLE(camProcessedExpDropTable);
+    DROP_TABLE(camMaskDropTable);
     DROP_TABLE(detRunDropTable);
     DROP_TABLE(detInputExpDropTable);
@@ -155,14 +155,14 @@
     DROP_TABLE(detResidExpDropTable);
     DROP_TABLE(detRunSummaryDropTable);
-    DROP_TABLE(p4RunDropTable);
-    DROP_TABLE(p4InputExpDropTable);
-    DROP_TABLE(p4SkyCellMapDropTable);
-    DROP_TABLE(p4SkyfileDropTable);
-    DROP_TABLE(p5RunDropTable);
-    DROP_TABLE(p5InputSkyfileDropTable);
-    DROP_TABLE(p5DiffSkyfileDropTable);
-    DROP_TABLE(p6RunDropTable);
-    DROP_TABLE(p6InputSkyfileDropTable);
-    DROP_TABLE(p6SumSkyfileDropTable);
+    DROP_TABLE(warpRunDropTable);
+    DROP_TABLE(warpInputExpDropTable);
+    DROP_TABLE(warpSkyCellMapDropTable);
+    DROP_TABLE(warpSkyfileDropTable);
+    DROP_TABLE(diffRunDropTable);
+    DROP_TABLE(diffInputSkyfileDropTable);
+    DROP_TABLE(diffSkyfileDropTable);
+    DROP_TABLE(stackRunDropTable);
+    DROP_TABLE(stackInputSkyfileDropTable);
+    DROP_TABLE(stackSumSkyfileDropTable);
 
     return status;
Index: /trunk/ippTools/src/regtool.c
===================================================================
--- /trunk/ippTools/src/regtool.c	(revision 12023)
+++ /trunk/ippTools/src/regtool.c	(revision 12024)
@@ -39,6 +39,6 @@
 
 // static p1PendingExpRow *newToP1PendingExp(newExpRow *newExp);
-static p2PendingExpRow *newToP2PendingExp(pxConfig *config, newExpRow *newExp);
-static p2PendingImfileRow *rawImfileToP2PendingImfile(pxConfig *config, rawImfileRow *rawImfile);
+static chipPendingExpRow *newTochipPendingExp(pxConfig *config, newExpRow *newExp);
+static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile);
 
 static rawExpRow *newToRawExp(pxConfig *config, newExpRow *exp);
@@ -672,5 +672,5 @@
         }
 
-        // if this is a detrend image don't put it in the p2 queue (and we're
+        // if this is a detrend image don't put it in the chip queue (and we're
         // done)
         if (detrend) {
@@ -679,8 +679,8 @@
         }
 
-        // insert an entry into the p2PendingExp table
-        p2PendingExpRow *p2PendingExp = newToP2PendingExp(config, newExp);
-        if (!p2PendingExp) {
-            psError(PS_ERR_UNKNOWN, false, "failed to convert newExp to p2PendingExp");
+        // insert an entry into the chipPendingExp table
+        chipPendingExpRow *chipPendingExp = newTochipPendingExp(config, newExp);
+        if (!chipPendingExp) {
+            psError(PS_ERR_UNKNOWN, false, "failed to convert newExp to chipPendingExp");
             psFree(newExp);
             psFree(output);
@@ -688,6 +688,6 @@
         }
 
-        // insert the p2PendingExp object into the database
-        if (!p2PendingExpInsertObject(config->dbh, p2PendingExp)) {
+        // insert the chipPendingExp object into the database
+        if (!chipPendingExpInsertObject(config->dbh, chipPendingExp)) {
             // rollback
             if (!psDBRollback(config->dbh)) {
@@ -695,12 +695,12 @@
             }
             psError(PS_ERR_UNKNOWN, false, "database error");
-            psFree(p2PendingExp);
+            psFree(chipPendingExp);
             psFree(newExp);
             psFree(output);
             return false;
         }
-        psFree(p2PendingExp);
-
-        // find all of the rawImfiles associated with the p2PendingExp object
+        psFree(chipPendingExp);
+
+        // find all of the rawImfiles associated with the chipPendingExp object
         psArray *rawImfiles = NULL;
         {
@@ -744,10 +744,10 @@
             return false;
         }
-        // convert the rawImfiles into p2PendingImfiles and insert them into
+        // convert the rawImfiles into chipPendingImfiles and insert them into
         // the database
         for (long i = 0; i < psArrayLength(rawImfiles); i++) {
             rawImfileRow *rawImfile = rawImfiles->data[i];
-            p2PendingImfileRow *pendingImfile = rawImfileToP2PendingImfile(config, rawImfile);
-            if (!p2PendingImfileInsertObject(config->dbh, pendingImfile)){
+            chipPendingImfileRow *pendingImfile = rawImfileTochipPendingImfile(config, rawImfile);
+            if (!chipPendingImfileInsertObject(config->dbh, pendingImfile)){
                 // rollback
                 if (!psDBRollback(config->dbh)) {
@@ -915,5 +915,5 @@
 
 
-static p2PendingExpRow *newToP2PendingExp(pxConfig *config, newExpRow *exp)
+static chipPendingExpRow *newTochipPendingExp(pxConfig *config, newExpRow *exp)
 {
     PS_ASSERT_PTR_NON_NULL(config, NULL);
@@ -928,7 +928,7 @@
     }
 
-    p2PendingExpRow *p2Exp = p2PendingExpRowAlloc(
+    chipPendingExpRow *chipExp = chipPendingExpRowAlloc(
         exp->exp_tag,
-        0x0,            // p2 version XXX calc version number
+        0x0,            // chip version XXX calc version number
         0xdeadbeef,     // p1 version
         label,
@@ -938,13 +938,13 @@
     );
 
-    return p2Exp;
-}
-
-
-static p2PendingImfileRow *rawImfileToP2PendingImfile(pxConfig *config, rawImfileRow *rawImfile)
-{
-    return p2PendingImfileRowAlloc(
+    return chipExp;
+}
+
+
+static chipPendingImfileRow *rawImfileTochipPendingImfile(pxConfig *config, rawImfileRow *rawImfile)
+{
+    return chipPendingImfileRowAlloc(
         rawImfile->exp_tag,
-        0x0,          // p2 version XXX calc version number
+        0x0,          // chip version XXX calc version number
         0xdeadbeef,   // p1 version
         rawImfile->class_id,
Index: /trunk/ippTools/src/stacktool.c
===================================================================
--- /trunk/ippTools/src/stacktool.c	(revision 12023)
+++ /trunk/ippTools/src/stacktool.c	(revision 12024)
@@ -39,5 +39,5 @@
 static bool sumskyfileMode(pxConfig *config);
 
-static bool setp6RunState(pxConfig *config, const char *p6_id, const char *state);
+static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state);
 
 # define MODECASE(caseName, func) \
@@ -125,8 +125,8 @@
 
     // we have to support multipe exp_tags
-    psMetadataItem *p4_ids = psMetadataLookup(config->args, "-p4_id");
-    if (!p4_ids) {
+    psMetadataItem *warp_ids = psMetadataLookup(config->args, "-warp_id");
+    if (!warp_ids) {
         // this shouldn't actually happen when using psArgs
-        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
+        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
         return false;
     }
@@ -147,5 +147,5 @@
     }
 
-    p6RunRow *run = p6RunRowAlloc(
+    stackRunRow *run = stackRunRowAlloc(
             0,          // ID
             "run",      // state
@@ -158,5 +158,5 @@
     psFree(registered);
     if (!run) {
-        psError(PS_ERR_UNKNOWN, false, "failed to alloc p6Run object");
+        psError(PS_ERR_UNKNOWN, false, "failed to alloc stackRun object");
         return true;
     }
@@ -167,5 +167,5 @@
     }
 
-    if (!p6RunInsertObject(config->dbh, run)) {
+    if (!stackRunInsertObject(config->dbh, run)) {
         if (!psDBRollback(config->dbh)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
@@ -176,16 +176,16 @@
     }
 
-    // get the assigned p4_id
-    run->p6_id = psDBLastInsertID(config->dbh);
-
-    // insert the p6InputSkyfile rows
-    psListIterator *iter = psListIteratorAlloc(p4_ids->data.list, 0, false);
+    // get the assigned warp_id
+    run->stack_id = psDBLastInsertID(config->dbh);
+
+    // insert the stackInputSkyfile rows
+    psListIterator *iter = psListIteratorAlloc(warp_ids->data.list, 0, false);
     psMetadataItem *item = NULL;
     while ((item = psListGetAndIncrement(iter))) {
-        if (!p6InputSkyfileInsert(config->dbh, run->p6_id, atoi((char *)item->data.V))) {
+        if (!stackInputSkyfileInsert(config->dbh, run->stack_id, atoi((char *)item->data.V))) {
             if (!psDBRollback(config->dbh)) {
                 psError(PS_ERR_UNKNOWN, false, "database error");
             }
-            psError(PS_ERR_UNKNOWN, false, "failed to insert p6InputSkyfile rows");
+            psError(PS_ERR_UNKNOWN, false, "failed to insert stackInputSkyfile rows");
             return false;
         }
@@ -210,5 +210,5 @@
     }
 
-    if (!p6RunPrintObject(stdout, run, !simple)) {
+    if (!stackRunPrintObject(stdout, run, !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print object");
             psFree(run);
@@ -227,11 +227,11 @@
 
     bool status = false;
-    psString p6_id = psMetadataLookupStr(&status, config->args, "-p6_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p6_id");
-        return false;
-    }
-    if (!p6_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p6_id is required");
+    psString stack_id = psMetadataLookupStr(&status, config->args, "-stack_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stack_id");
+        return false;
+    }
+    if (!stack_id) {
+        psError(PS_ERR_UNKNOWN, true, "-stack_id is required");
         return false;
     }
@@ -249,5 +249,5 @@
     if (state) {
         // set detRun.state to state
-        return setp6RunState(config, p6_id, state);
+        return setstackRunState(config, stack_id, state);
     }
 
@@ -261,32 +261,32 @@
 
     bool status = false;
-    psString p6_id = psMetadataLookupStr(&status, config->args, "-p6_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p6_id");
-        return false;
-    }
-    if (!p6_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p6_id is required");
-        return false;
-
-    }
-
-    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
-        return false;
-    }
-    if (!p4_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
-        return false;
-    }
-
-
-    // XXX need to validate the p4_id here
+    psString stack_id = psMetadataLookupStr(&status, config->args, "-stack_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stack_id");
+        return false;
+    }
+    if (!stack_id) {
+        psError(PS_ERR_UNKNOWN, true, "-stack_id is required");
+        return false;
+
+    }
+
+    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
+        return false;
+    }
+    if (!warp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
+        return false;
+    }
+
+
+    // XXX need to validate the warp_id here
     // XXX instead of validiting it here we should just use forgein key
     // constrants
-    if (!p6InputSkyfileInsert(config->dbh, 
-            (psS32)atoi(p6_id),
-            (psS32)atoi(p4_id)
+    if (!stackInputSkyfileInsert(config->dbh, 
+            (psS32)atoi(stack_id),
+            (psS32)atoi(warp_id)
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -312,17 +312,17 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p4Skyfile.*\n"
-        " FROM p6Run\n"
-        " JOIN p6InputSkyfile\n"
-        "   USING(p6_id)\n"
-        " JOIN p4Skyfile\n"
-        "   ON  p6InputSkyfile.p4_id = p4Skyfile.p4_id\n"
-        "   AND p6Run.skycell_id    = p4Skyfile.skycell_id\n"
-        "   AND p6Run.tess_id       = p4Skyfile.tess_id\n"
+        "   warpSkyfile.*\n"
+        " FROM stackRun\n"
+        " JOIN stackInputSkyfile\n"
+        "   USING(stack_id)\n"
+        " JOIN warpSkyfile\n"
+        "   ON  stackInputSkyfile.warp_id = warpSkyfile.warp_id\n"
+        "   AND stackRun.skycell_id    = warpSkyfile.skycell_id\n"
+        "   AND stackRun.tess_id       = warpSkyfile.tess_id\n"
         " WHERE\n"
-        "   p6Run.state = 'run'\n" 
+        "   stackRun.state = 'run'\n" 
     );
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p6InputSkyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "stackInputSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -358,5 +358,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p6InputSkyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no stackInputSkyfile rows found");
         psFree(output);
         return true;
@@ -375,5 +375,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p6InputSkyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "stackInputSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -402,15 +402,15 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p6Run.p6_id\n"
-        " FROM p6Run\n"
-        " LEFT JOIN p6SumSkyfile\n"
-        "   USING(p6_id)\n"
+        "   stackRun.stack_id\n"
+        " FROM stackRun\n"
+        " LEFT JOIN stackSumSkyfile\n"
+        "   USING(stack_id)\n"
         " WHERE\n"
-        "   p6Run.state = 'run'\n" 
-        "   AND p6SumSkyfile.p6_id IS NULL\n"
+        "   stackRun.state = 'run'\n" 
+        "   AND stackSumSkyfile.stack_id IS NULL\n"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p6SumSkyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "stackSumSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -446,5 +446,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p6SumSkyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no stackSumSkyfile rows found");
         psFree(output);
         return true;
@@ -463,5 +463,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p6SumSkyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "stackSumSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -481,11 +481,11 @@
 
     bool status = false;
-    psString p6_id = psMetadataLookupStr(&status, config->args, "-p6_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p6_id");
-        return false;
-    }
-    if (!p6_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p6_id is required");
+    psString stack_id = psMetadataLookupStr(&status, config->args, "-stack_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stack_id");
+        return false;
+    }
+    if (!stack_id) {
+        psError(PS_ERR_UNKNOWN, true, "-stack_id is required");
         return false;
 
@@ -520,9 +520,9 @@
     }
 
-    // XXX need to validate the p6_id here
+    // XXX need to validate the stack_id here
     // XXX instead of validiting it here we should just use forgein key
     // constrants
-    if (!p6SumSkyfileInsert(config->dbh, 
-            (psS32)atoi(p6_id),
+    if (!stackSumSkyfileInsert(config->dbh, 
+            (psS32)atoi(stack_id),
             uri,
             bg,
@@ -536,9 +536,9 @@
     }
 
-    if (setp6RunState(config, p6_id, "stop")) {
+    if (setstackRunState(config, stack_id, "stop")) {
         if (!psDBRollback(config->dbh)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
         }
-        psError(PS_ERR_UNKNOWN, false, "failed to change p6Run's state");
+        psError(PS_ERR_UNKNOWN, false, "failed to change stackRun's state");
         return false;
     }
@@ -568,14 +568,14 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p6SumSkyfile.*\n"
-        " FROM p6Run\n"
-        " JOIN p6SumSkyfile\n"
-        "   USING(p6_id)\n"
+        "   stackSumSkyfile.*\n"
+        " FROM stackRun\n"
+        " JOIN stackSumSkyfile\n"
+        "   USING(stack_id)\n"
         " WHERE\n"
-        "   p6Run.state = 'run'\n" 
+        "   stackRun.state = 'run'\n" 
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p6SumSkyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "stackSumSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -611,5 +611,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p4Skyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no warpSkyfile rows found");
         psFree(output);
         return true;
@@ -627,5 +627,5 @@
 
     if (psArrayLength(output)) {
-        if (!ippdbPrintMetadatas(stdout, output, "p6SumSkyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "stackSumSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -640,7 +640,7 @@
 
 
-static bool setp6RunState(pxConfig *config, const char *p6_id, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(p6_id, false);
+static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state)
+{
+    PS_ASSERT_PTR_NON_NULL(stack_id, false);
     PS_ASSERT_PTR_NON_NULL(state, false);
 
@@ -653,15 +653,15 @@
     ) {
         psError(PS_ERR_UNKNOWN, false,
-                "invalid p4Run state: %s", state);
-        return false;
-    }
-
-    char *query = "UPDATE p6Run SET state = '%s' WHERE p6_id = '%s'";
-    if (!p_psDBRunQuery(config->dbh, query, state, p6_id)) {
+                "invalid warpRun state: %s", state);
+        return false;
+    }
+
+    char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = '%s'";
+    if (!p_psDBRunQuery(config->dbh, query, state, stack_id)) {
         psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for p6_id %s", p6_id);
-        return false;
-    }
-
-    return true;
-}
+                "failed to change state for stack_id %s", stack_id);
+        return false;
+    }
+
+    return true;
+}
Index: /trunk/ippTools/src/warptool.c
===================================================================
--- /trunk/ippTools/src/warptool.c	(revision 12023)
+++ /trunk/ippTools/src/warptool.c	(revision 12024)
@@ -44,7 +44,7 @@
 
 static bool parseAndInsertSkyCellMap(pxConfig *config, const char *mapfile);
-static bool setp4RunState(pxConfig *config, const char *p4_id, const char *state);
+static bool setwarpRunState(pxConfig *config, const char *warp_id, const char *state);
 static bool isValidMode(pxConfig *config, const char *mode);
-bool p4CompletedRuns(pxConfig *config);
+bool warpCompletedRuns(pxConfig *config);
 
 # define MODECASE(caseName, func) \
@@ -145,5 +145,5 @@
     }
 
-    p4RunRow *p4Run = p4RunRowAlloc(
+    warpRunRow *warpRun = warpRunRowAlloc(
             0,          // ID
             mode,
@@ -154,16 +154,16 @@
     );
     psFree(registered);
-    if (!p4Run) {
-        psError(PS_ERR_UNKNOWN, false, "failed to alloc p4Run object");
+    if (!warpRun) {
+        psError(PS_ERR_UNKNOWN, false, "failed to alloc warpRun object");
         return true;
     }
-    if (!p4RunInsertObject(config->dbh, p4Run)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        psFree(p4Run);
+    if (!warpRunInsertObject(config->dbh, warpRun)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        psFree(warpRun);
         return true;
     }
 
-    // get the assigned p4_id
-    p4Run->p4_id = psDBLastInsertID(config->dbh);
+    // get the assigned warp_id
+    warpRun->warp_id = psDBLastInsertID(config->dbh);
 
     bool simple = false;
@@ -173,16 +173,16 @@
         if (!status) {
             psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple");
-            psFree(p4Run);
-            return false;
-        }
-    }
-
-    if (!p4RunPrintObject(stdout, p4Run, !simple)) {
+            psFree(warpRun);
+            return false;
+        }
+    }
+
+    if (!warpRunPrintObject(stdout, warpRun, !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print object");
-            psFree(p4Run);
-            return false;
-    }
-
-    psFree(p4Run);
+            psFree(warpRun);
+            return false;
+    }
+
+    psFree(warpRun);
 
     return true;
@@ -195,11 +195,11 @@
 
     bool status = false;
-    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4t_id");
-        return false;
-    }
-    if (!p4_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
+    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warpt_id");
+        return false;
+    }
+    if (!warp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
         return false;
     }
@@ -217,5 +217,5 @@
     if (state) {
         // set detRun.state to state
-        return setp4RunState(config, p4_id, state);
+        return setwarpRunState(config, warp_id, state);
     }
 
@@ -229,11 +229,11 @@
 
     bool status = false;
-    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
-        return false;
-    }
-    if (!p4_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
+    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
+        return false;
+    }
+    if (!warp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
         return false;
     }
@@ -250,24 +250,24 @@
 
     // defaults to 0
-    psS32 p3_version = psMetadataLookupS32(&status, config->args, "-p3_version");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p3_version");
+    psS32 cam_version = psMetadataLookupS32(&status, config->args, "-cam_version");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -cam_version");
         return false;
     }
 
     // defaults to false
-    bool magiced = psMetadataLookupBool(&status, config->args, "-p3_version");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p3_version");
-        return false;
-    }
-
-    // XXX need to validate the p4_id here
+    bool magiced = psMetadataLookupBool(&status, config->args, "-cam_version");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -cam_version");
+        return false;
+    }
+
+    // XXX need to validate the warp_id here
     // XXX instead of validiting it here we should just use forgein key
     // constrants
-    if (!p4InputExpInsert(config->dbh, 
-            (psS32)atoi(p4_id),
+    if (!warpInputExpInsert(config->dbh, 
+            (psS32)atoi(warp_id),
             exp_tag,
-            p3_version,
+            cam_version,
             magiced
         )) {
@@ -294,18 +294,18 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p3ProcessedExp.*\n"
-        " FROM p4Run\n"
-        " JOIN p4InputExp\n"
-        "   USING(p4_id)\n"
-        " JOIN p3ProcessedExp\n"
-        "   ON p4InputExp.exp_tag = p3ProcessedExp.exp_tag\n"
-        "   AND p4InputExp.p3_version = p3ProcessedExp.p3_version\n"
+        "   camProcessedExp.*\n"
+        " FROM warpRun\n"
+        " JOIN warpInputExp\n"
+        "   USING(warp_id)\n"
+        " JOIN camProcessedExp\n"
+        "   ON warpInputExp.exp_tag = camProcessedExp.exp_tag\n"
+        "   AND warpInputExp.cam_version = camProcessedExp.cam_version\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
-        "   AND p3ProcessedExp.fault = 0\n"
+        "   warpRun.state = 'run'\n" 
+        "   AND camProcessedExp.fault = 0\n"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -358,5 +358,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4InputExp", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpInputExp", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -386,14 +386,14 @@
         "SELECT\n"
         "   rawImfile.*\n"
-        " FROM p4Run\n"
-        " JOIN p4InputExp\n"
-        "   USING(p4_id)\n"
+        " FROM warpRun\n"
+        " JOIN warpInputExp\n"
+        "   USING(warp_id)\n"
         " JOIN rawImfile\n" // is there any reason not to refer back to rawimfiles?
-        "   ON p4InputExp.exp_tag = rawImfile.exp_tag\n"
+        "   ON warpInputExp.exp_tag = rawImfile.exp_tag\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
+        "   warpRun.state = 'run'\n" 
     );
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -446,5 +446,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4InputImfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpInputImfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -473,25 +473,25 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p3ProcessedExp.*\n"
-        " FROM p4Run\n"
-        " JOIN p4InputExp\n"
-        "   USING(p4_id)\n"
-        " JOIN p3ProcessedExp\n"
-        "   ON p4InputExp.exp_tag = p3ProcessedExp.exp_tag\n"
-        "   AND p4InputExp.p3_version = p3ProcessedExp.p3_version\n"
-        " LEFT JOIN p4SkyCellMap\n"
-        "   ON p4InputExp.p4_id = p4SkyCellMap.p4_id\n"
-        "   AND p4InputExp.exp_tag = p4SkyCellMap.exp_tag\n"
-        "   AND p4InputExp.p3_version = p4SkyCellMap.p3_version\n"
+        "   camProcessedExp.*\n"
+        " FROM warpRun\n"
+        " JOIN warpInputExp\n"
+        "   USING(warp_id)\n"
+        " JOIN camProcessedExp\n"
+        "   ON warpInputExp.exp_tag = camProcessedExp.exp_tag\n"
+        "   AND warpInputExp.cam_version = camProcessedExp.cam_version\n"
+        " LEFT JOIN warpSkyCellMap\n"
+        "   ON warpInputExp.warp_id = warpSkyCellMap.warp_id\n"
+        "   AND warpInputExp.exp_tag = warpSkyCellMap.exp_tag\n"
+        "   AND warpInputExp.cam_version = warpSkyCellMap.cam_version\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
-        "   AND p3ProcessedExp.fault = 0\n"
-        "   AND p4SkyCellMap.p4_id IS NULL\n"
-        "   AND p4SkyCellMap.exp_tag IS NULL\n"
-        "   AND p4SkyCellMap.p3_version IS NULL\n"
+        "   warpRun.state = 'run'\n" 
+        "   AND camProcessedExp.fault = 0\n"
+        "   AND warpSkyCellMap.warp_id IS NULL\n"
+        "   AND warpSkyCellMap.exp_tag IS NULL\n"
+        "   AND warpSkyCellMap.cam_version IS NULL\n"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -544,5 +544,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4InputExp", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpInputExp", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -623,7 +623,7 @@
         // this conversion isn't strictly nessicary but it's an easy way of
         // validating the format
-        p4SkyCellMapRow *row = p4SkyCellMapObjectFromMetadata(sc);
+        warpSkyCellMapRow *row = warpSkyCellMapObjectFromMetadata(sc);
         if (!row) {
-            psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a p4SkyCellMap object", mapfile);
+            psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a warpSkyCellMap object", mapfile);
             psFree(iter);
             psFree(skycells);
@@ -631,5 +631,5 @@
         }
 
-        if (!p4SkyCellMapInsertObject(config->dbh, row)) {
+        if (!warpSkyCellMapInsertObject(config->dbh, row)) {
             psErrorCode err = psErrorCodeLast();
             switch (err) {
@@ -670,14 +670,14 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p4SkyCellMap.*\n"
-        " FROM p4Run\n"
-        " JOIN p4SkyCellMap\n"
-        "   USING(p4_id)\n"
+        "   warpSkyCellMap.*\n"
+        " FROM warpRun\n"
+        " JOIN warpSkyCellMap\n"
+        "   USING(warp_id)\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
+        "   warpRun.state = 'run'\n" 
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4SkyCellMap");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyCellMap");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -713,5 +713,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p4SkyCellMap rows found");
+        psError(PS_ERR_UNKNOWN, false, "no warpSkyCellMap rows found");
         psFree(output);
         return true;
@@ -730,5 +730,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4SkyCellMap", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpSkyCellMap", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -757,19 +757,19 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p4SkyCellMap.*\n"
-        " FROM p4Run\n"
-        " JOIN p4SkyCellMap\n"
-        "   USING(p4_id)\n"
-        " LEFT JOIN p4Skyfile\n"
-        "   USING(p4_id, skycell_id, tess_id)\n"
+        "   warpSkyCellMap.*\n"
+        " FROM warpRun\n"
+        " JOIN warpSkyCellMap\n"
+        "   USING(warp_id)\n"
+        " LEFT JOIN warpSkyfile\n"
+        "   USING(warp_id, skycell_id, tess_id)\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
-        "   AND p4Skyfile.p4_id IS NULL\n"
-        "   AND p4Skyfile.skycell_id IS NULL\n"
-        "   AND p4Skyfile.tess_id IS NULL\n"
+        "   warpRun.state = 'run'\n" 
+        "   AND warpSkyfile.warp_id IS NULL\n"
+        "   AND warpSkyfile.skycell_id IS NULL\n"
+        "   AND warpSkyfile.tess_id IS NULL\n"
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4SkyCellMap");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyCellMap");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -805,5 +805,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p4PendingSkyCell rows found");
+        psError(PS_ERR_UNKNOWN, false, "no warpPendingSkyCell rows found");
         psFree(output);
         return true;
@@ -822,5 +822,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4PendingSkyCell", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpPendingSkyCell", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -840,11 +840,11 @@
 
     bool status = false;
-    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
-        return false;
-    }
-    if (!p4_id) {
-        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
+    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
+        return false;
+    }
+    if (!warp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
         return false;
     }
@@ -900,7 +900,7 @@
     }
 
-    // XXX need to validate that this coresponds to an p4InputImfile
-    if (!p4SkyfileInsert(config->dbh, 
-            (psS32)atoi(p4_id),
+    // XXX need to validate that this coresponds to an warpInputImfile
+    if (!warpSkyfileInsert(config->dbh, 
+            (psS32)atoi(warp_id),
             skycell_id,
             tess_id,
@@ -916,5 +916,5 @@
     }
 
-    if (!p4CompletedRuns(config)) {
+    if (!warpCompletedRuns(config)) {
         if (!psDBRollback(config->dbh)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
@@ -933,5 +933,5 @@
 }
 
-bool p4CompletedRuns(pxConfig *config)
+bool warpCompletedRuns(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -945,26 +945,26 @@
     // modifying.
     char *query =
-        "UPDATE p4Run\n"
-        "   SET p4Run.state = 'stop'\n"
+        "UPDATE warpRun\n"
+        "   SET warpRun.state = 'stop'\n"
         " WHERE\n"
-        "   p4Run.p4_id =\n"
+        "   warpRun.warp_id =\n"
         "   (SELECT DISTINCT\n"
-        "       p4_id\n"
+        "       warp_id\n"
         "   FROM\n"
         "       (SELECT DISTINCT\n"
-        "           p4Run.p4_id,\n"
-        "           p4SkyCellMap.p4_id as foo,\n"
-        "           p4Skyfile.p4_id as bar\n"
-        "       FROM p4Run\n"
-        "       JOIN p4SkyCellMap\n"
-        "           USING(p4_id)\n"
-        "       LEFT JOIN p4Skyfile\n"
-        "           USING(p4_id, skycell_id, tess_id)\n"
+        "           warpRun.warp_id,\n"
+        "           warpSkyCellMap.warp_id as foo,\n"
+        "           warpSkyfile.warp_id as bar\n"
+        "       FROM warpRun\n"
+        "       JOIN warpSkyCellMap\n"
+        "           USING(warp_id)\n"
+        "       LEFT JOIN warpSkyfile\n"
+        "           USING(warp_id, skycell_id, tess_id)\n"
         "       WHERE\n"
-        "           p4Run.state = 'run'\n" 
+        "           warpRun.state = 'run'\n" 
         "       GROUP BY\n"
-        "           p4Run.p4_id\n"  
+        "           warpRun.warp_id\n"  
         "       HAVING\n"
-        "       COUNT(p4SkyCellMap.p4_id) = COUNT(p4Skyfile.p4_id)\n"
+        "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
         "       ) as Foo\n"
         "   )\n";
@@ -978,5 +978,5 @@
     char *query =
         "CREATE TEMPORARY TABLE finished\n"
-        " (p4_id INT, PRIMARY KEY(p4_id)) ENGINE=MEMORY\n";
+        " (warp_id INT, PRIMARY KEY(warp_id)) ENGINE=MEMORY\n";
 
     if (!p_psDBRunQuery(config->dbh, query)) {
@@ -990,21 +990,21 @@
         "INSERT INTO finished\n"
         " SELECT\n"
-        "   p4_id\n"
+        "   warp_id\n"
         " FROM\n"
         "   (SELECT DISTINCT\n"
-        "       p4Run.p4_id,\n"
-        "       p4SkyCellMap.p4_id as foo,\n"
-        "       p4Skyfile.p4_id as bar\n"
-        "   FROM p4Run\n"
-        "   JOIN p4SkyCellMap\n"
-        "       USING(p4_id)\n"
-        "   LEFT JOIN p4Skyfile\n"
-        "       USING(p4_id, skycell_id, tess_id)\n"
+        "       warpRun.warp_id,\n"
+        "       warpSkyCellMap.warp_id as foo,\n"
+        "       warpSkyfile.warp_id as bar\n"
+        "   FROM warpRun\n"
+        "   JOIN warpSkyCellMap\n"
+        "       USING(warp_id)\n"
+        "   LEFT JOIN warpSkyfile\n"
+        "       USING(warp_id, skycell_id, tess_id)\n"
         "   WHERE\n"
-        "       p4Run.state = 'run'\n" 
+        "       warpRun.state = 'run'\n" 
         "   GROUP BY\n"
-        "       p4Run.p4_id\n"  
+        "       warpRun.warp_id\n"  
         "   HAVING\n"
-        "       COUNT(p4SkyCellMap.p4_id) = COUNT(p4Skyfile.p4_id)\n"
+        "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
         " ) as Foo \n";
 
@@ -1017,10 +1017,10 @@
 {    
     char *query =
-        "UPDATE p4Run\n"
-        "   SET p4Run.state = 'stop'\n"
+        "UPDATE warpRun\n"
+        "   SET warpRun.state = 'stop'\n"
         " WHERE\n"
-        "   p4Run.p4_id =\n"
+        "   warpRun.warp_id =\n"
         "   (SELECT DISTINCT\n"
-        "       p4_id\n"
+        "       warp_id\n"
         "   FROM finished\n"
         "   )\n";
@@ -1050,14 +1050,14 @@
     psString query = psStringCopy( 
         "SELECT\n"
-        "   p4Skyfile.*\n"
-        " FROM p4Run\n"
-        " JOIN p4Skyfile\n"
-        "   USING(p4_id)\n"
+        "   warpSkyfile.*\n"
+        " FROM warpRun\n"
+        " JOIN warpSkyfile\n"
+        "   USING(warp_id)\n"
         " WHERE\n"
-        "   p4Run.state = 'run'\n" 
+        "   warpRun.state = 'run'\n" 
     );
 
     if (config->where) {
-        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4Skyfile");
+        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyfile");
         psStringAppend(&query, " AND %s", whereClause);
         psFree(whereClause);
@@ -1093,5 +1093,5 @@
     }
     if (!psArrayLength(output)) {
-        psError(PS_ERR_UNKNOWN, false, "no p4Skyfile rows found");
+        psError(PS_ERR_UNKNOWN, false, "no warpSkyfile rows found");
         psFree(output);
         return true;
@@ -1110,5 +1110,5 @@
     if (psArrayLength(output)) {
         // negative simple so the default is true
-        if (!ippdbPrintMetadatas(stdout, output, "p4Skyfile", !simple)) {
+        if (!ippdbPrintMetadatas(stdout, output, "warpSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
             psFree(output);
@@ -1123,7 +1123,7 @@
 
 
-static bool setp4RunState(pxConfig *config, const char *p4_id, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(p4_id, false);
+static bool setwarpRunState(pxConfig *config, const char *warp_id, const char *state)
+{
+    PS_ASSERT_PTR_NON_NULL(warp_id, false);
     PS_ASSERT_PTR_NON_NULL(state, false);
 
@@ -1136,12 +1136,12 @@
     ) {
         psError(PS_ERR_UNKNOWN, false,
-                "invalid p4Run state: %s", state);
-        return false;
-    }
-
-    char *query = "UPDATE p4Run SET state = '%s' WHERE p4_id = '%s'";
-    if (!p_psDBRunQuery(config->dbh, query, state, p4_id)) {
+                "invalid warpRun state: %s", state);
+        return false;
+    }
+
+    char *query = "UPDATE warpRun SET state = '%s' WHERE warp_id = '%s'";
+    if (!p_psDBRunQuery(config->dbh, query, state, warp_id)) {
         psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for p4_id %s", p4_id);
+                "failed to change state for warp_id %s", warp_id);
         return false;
     }
Index: /trunk/ippTools/src/warptoolConfig.c
===================================================================
--- /trunk/ippTools/src/warptoolConfig.c	(revision 12023)
+++ /trunk/ippTools/src/warptoolConfig.c	(revision 12024)
@@ -59,6 +59,6 @@
     // -updaterun
     psMetadata *updaterunArgs = psMetadataAlloc();
-    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0,
             "set state (required)", NULL);
@@ -72,9 +72,9 @@
     // -addinputexp
     psMetadata *addinputexpArgs = psMetadataAlloc();
-    psMetadataAddStr(addinputexpArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(addinputexpArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(addinputexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "define exposure tag (required)", NULL);
-    psMetadataAddS32(addinputexpArgs, PS_LIST_TAIL, "-p3_version", 0,
+    psMetadataAddS32(addinputexpArgs, PS_LIST_TAIL, "-cam_version", 0,
             "define phase 3 version of exposure tag (required)", 0);
     psMetadataAddBool(addinputexpArgs, PS_LIST_TAIL, "-magiced",  0,
@@ -83,9 +83,9 @@
     // -exp
     psMetadata *expArgs = psMetadataAlloc();
-    psMetadataAddStr(expArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(expArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(expArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "define exposure tag (required)", NULL);
-    psMetadataAddS32(expArgs, PS_LIST_TAIL, "-p3_version", 0,
+    psMetadataAddS32(expArgs, PS_LIST_TAIL, "-cam_version", 0,
             "define phase 3 version of exposure tag (required)", 0);
     psMetadataAddU64(expArgs, PS_LIST_TAIL, "-limit",  0,
@@ -96,9 +96,9 @@
     // -imfile
     psMetadata *imfileArgs = psMetadataAlloc();
-    psMetadataAddStr(imfileArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(imfileArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(imfileArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "define exposure tag (required)", NULL);
-    psMetadataAddS32(imfileArgs, PS_LIST_TAIL, "-p3_version", 0,
+    psMetadataAddS32(imfileArgs, PS_LIST_TAIL, "-cam_version", 0,
             "define phase 3 version of exposure tag (required)", 0);
     psMetadataAddU64(imfileArgs, PS_LIST_TAIL, "-limit",  0,
@@ -109,6 +109,6 @@
     // -tooverlap
     psMetadata *tooverlapArgs = psMetadataAlloc();
-    psMetadataAddStr(tooverlapArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "search by p4 ID", NULL);
+    psMetadataAddStr(tooverlapArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "search by warp ID", NULL);
     psMetadataAddU64(tooverlapArgs, PS_LIST_TAIL, "-limit",  0,
             "limit result set to N items", 0);
@@ -123,6 +123,6 @@
     // -scmap
     psMetadata *scmapArgs = psMetadataAlloc();
-    psMetadataAddStr(scmapArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "search by p4 ID", NULL);
+    psMetadataAddStr(scmapArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "search by warp ID", NULL);
     psMetadataAddStr(scmapArgs, PS_LIST_TAIL, "-skycell_id", 0,
             "searcy by skycell ID", NULL);
@@ -136,6 +136,6 @@
     // -towarped
     psMetadata *towarpedArgs = psMetadataAlloc();
-    psMetadataAddStr(towarpedArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "search by p4 ID", NULL);
+    psMetadataAddStr(towarpedArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "search by warp ID", NULL);
     psMetadataAddU64(towarpedArgs, PS_LIST_TAIL, "-limit",  0,
             "limit result set to N items", 0);
@@ -145,6 +145,6 @@
     // -addwarped
     psMetadata *addwarpedArgs = psMetadataAlloc();
-    psMetadataAddStr(addwarpedArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "define p4 ID (required)", NULL);
+    psMetadataAddStr(addwarpedArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "define warp ID (required)", NULL);
     psMetadataAddStr(addwarpedArgs, PS_LIST_TAIL, "-skycell_id",  0,
             "define skycell ID (required)", NULL);
@@ -160,6 +160,6 @@
     // -warped
     psMetadata *warpedArgs = psMetadataAlloc();
-    psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-p4_id", 0,
-            "search by p4 ID", NULL);
+    psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-warp_id", 0,
+            "search by warp ID", NULL);
     psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-skycell_id",  0,
             "define skycell ID (required)", NULL);
@@ -168,5 +168,5 @@
     psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-exp_tag", 0,
             "define exposure tag (required)", NULL);
-    psMetadataAddS32(warpedArgs, PS_LIST_TAIL, "-p3_version", 0,
+    psMetadataAddS32(warpedArgs, PS_LIST_TAIL, "-cam_version", 0,
             "define phase 3 version of exposure tag (required)", 0);
     psMetadataAddU64(warpedArgs, PS_LIST_TAIL, "-limit",  0,
@@ -285,7 +285,7 @@
     psString str = NULL;
     bool status = false;
-    if ((str = psMetadataLookupStr(&status, config->args, "-p4_id"))) {
-        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p4_id", 0, "==", (psS32)atoi(str))) {
-            psError(PS_ERR_UNKNOWN, false, "failed to add item p4_id");
+    if ((str = psMetadataLookupStr(&status, config->args, "-warp_id"))) {
+        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "warp_id", 0, "==", (psS32)atoi(str))) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id");
             psFree(config);
             return NULL;
