Index: trunk/ippTools/src/pxtables.c
===================================================================
--- trunk/ippTools/src/pxtables.c	(revision 16726)
+++ trunk/ippTools/src/pxtables.c	(revision 16733)
@@ -84,5 +84,4 @@
     CREATE_TABLE(detRegisteredImfileCreateTable);
     CREATE_TABLE(warpRunCreateTable);
-    CREATE_TABLE(warpInputExpCreateTable);
     CREATE_TABLE(warpSkyCellMapCreateTable);
     CREATE_TABLE(warpSkyfileCreateTable);
@@ -184,5 +183,4 @@
     DROP_TABLE(detRegisteredImfileDropTable);
     DROP_TABLE(warpRunDropTable);
-    DROP_TABLE(warpInputExpDropTable);
     DROP_TABLE(warpSkyCellMapDropTable);
     DROP_TABLE(warpSkyfileDropTable);
Index: trunk/ippTools/src/pxwarp.c
===================================================================
--- trunk/ippTools/src/pxwarp.c	(revision 16726)
+++ trunk/ippTools/src/pxwarp.c	(revision 16733)
@@ -65,6 +65,8 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
+    // depend on the f-keys to make sure we have a valid cam_id
     if (!warpRunInsert(config->dbh,
         0,          // ID
+        cam_id,
         "warp",     // mode
         "run",      // state
@@ -74,5 +76,6 @@
         tess_id,
         end_stage,
-        NULL        // registered
+        NULL,       // registered
+        false       // magiced
     )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -80,16 +83,4 @@
     }
 
-    psS64 warp_id = psDBLastInsertID(config->dbh);
-
-    // depend on the f-keys to make sure we have a valid cam_id
-    if (!warpInputExpInsert(config->dbh,
-        warp_id,
-        cam_id,
-        false       // magiced
-    )) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
     return true;
 }
Index: trunk/ippTools/src/warptool.c
===================================================================
--- trunk/ippTools/src/warptool.c	(revision 16726)
+++ trunk/ippTools/src/warptool.c	(revision 16733)
@@ -33,7 +33,5 @@
 
 static psS64 definerunMode(pxConfig *config);
-static bool runoneMode(pxConfig *config);
 static bool updaterunMode(pxConfig *config);
-static bool addinputexpMode(pxConfig *config);
 static bool expMode(pxConfig *config);
 static bool imfileMode(pxConfig *config);
@@ -69,7 +67,5 @@
     switch (config->mode) {
         MODECASE(WARPTOOL_MODE_DEFINERUN,         definerunMode);
-        MODECASE(WARPTOOL_MODE_RUNONE,            runoneMode);
         MODECASE(WARPTOOL_MODE_UPDATERUN,         updaterunMode);
-        MODECASE(WARPTOOL_MODE_ADDINPUTEXP,       addinputexpMode);
         MODECASE(WARPTOOL_MODE_EXP,               expMode);
         MODECASE(WARPTOOL_MODE_IMFILE,            imfileMode);
@@ -108,4 +104,5 @@
 
     // required options
+    PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", true, false);
     PXOPT_LOOKUP_STR(mode, config->args, "-mode", true, false);
     // check mode
@@ -122,9 +119,11 @@
 
     // default
+    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
+    PXOPT_LOOKUP_BOOL(magiced, config->args, "-magiced", false);
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
-    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
 
     warpRunRow *warpRun = warpRunRowAlloc(
             0,          // ID
+            (psS64)atoll(cam_id),
             mode,
             "reg",      // state
@@ -134,5 +133,6 @@
             tess_id,
             end_stage,
-            registered
+            registered,
+            magiced
     );
     if (!warpRun) {
@@ -161,60 +161,4 @@
 }
 
-static bool runoneMode(pxConfig *config)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    if (!psDBTransaction(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    psS64 warp_id = definerunMode(config);
-    if (!warp_id) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to define warpRun");
-        return false;
-    }
-
-    psString warp_id_str = psDBIntToString(warp_id);
-    if (!psMetadataAddStr(config->args, PS_LIST_TAIL, "-warp_id", 0, NULL, warp_id_str)) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id");
-        psFree(warp_id_str);
-        return false;
-    }
-    psFree(warp_id_str);
-
-    if (!addinputexpMode(config)) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to add cam_id to warpRun");
-        return false;
-    }
-    if (!pxwarpRunSetState(config, warp_id, "run")) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to set warpRun.state to run");
-        return false;
-    }
-
-    // point of no return
-    if (!psDBCommit(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    return true;
-}
 
 static bool updaterunMode(pxConfig *config)
@@ -228,27 +172,4 @@
         // set detRun.state to state
         return pxwarpRunSetState(config, (psS64)atoll(warp_id), state);
-    }
-
-    return true;
-}
-
-
-static bool addinputexpMode(pxConfig *config)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    PXOPT_LOOKUP_STR(warp_id, config->args, "-warp_id", true, false);
-    PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", true, false);
-
-    // defaults to false
-    PXOPT_LOOKUP_BOOL(magiced, config->args, "-magiced", false);
-
-    if (!warpInputExpInsert(config->dbh,
-            (psS64)atoll(warp_id),
-            (psS64)atoll(cam_id),
-            magiced
-        )) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
     }
 
Index: trunk/ippTools/src/warptoolConfig.c
===================================================================
--- trunk/ippTools/src/warptoolConfig.c	(revision 16726)
+++ trunk/ippTools/src/warptoolConfig.c	(revision 16733)
@@ -49,4 +49,6 @@
     // -definerun
     psMetadata *definerunArgs = psMetadataAlloc();
+    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "define camtool ID (required)", NULL);
     psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-mode", 0,
             "define mode (required)", NULL);
@@ -61,20 +63,7 @@
     psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-registered",  0,
             "time detrend run was registered", now);
+    psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-magiced",  0,
+            "has this exposure been magiced", false);
     psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-simple",  0,
-            "use the simple output format", false);
-
-    // -runone
-    psMetadata *runoneArgs = psMetadataAlloc();
-    psMetadataAddStr(runoneArgs, PS_LIST_TAIL, "-mode", 0,
-            "define mode (required)", NULL);
-    psMetadataAddStr(runoneArgs, PS_LIST_TAIL, "-workdir", 0,
-            "define workdir (required)", NULL);
-    psMetadataAddTime(runoneArgs, PS_LIST_TAIL, "-registered",  0,
-            "time detrend run was registered", now);
-    psMetadataAddStr(runoneArgs, PS_LIST_TAIL, "-cam_id", 0,
-            "define camtool ID (required)", NULL);
-    psMetadataAddBool(runoneArgs, PS_LIST_TAIL, "-magiced",  0,
-            "has this exposure been magiced", false);
-    psMetadataAddBool(runoneArgs, PS_LIST_TAIL, "-simple",  0,
             "use the simple output format", false);
 
@@ -91,13 +80,4 @@
             "time detrend run was registered", now);
 #endif
-
-    // -addinputexp
-    psMetadata *addinputexpArgs = psMetadataAlloc();
-    psMetadataAddStr(addinputexpArgs, PS_LIST_TAIL, "-warp_id", 0,
-            "define warptool ID (required)", NULL);
-    psMetadataAddStr(addinputexpArgs, PS_LIST_TAIL, "-cam_id", 0,
-            "define camtool ID (required)", NULL);
-    psMetadataAddBool(addinputexpArgs, PS_LIST_TAIL, "-magiced",  0,
-            "has this exposure been magiced", false);
 
     // -exp
@@ -221,7 +201,5 @@
 
     PXOPT_ADD_MODE("-definerun",       "", WARPTOOL_MODE_DEFINERUN,      definerunArgs);
-    PXOPT_ADD_MODE("-runone",          "", WARPTOOL_MODE_RUNONE,         runoneArgs);
     PXOPT_ADD_MODE("-updaterun",       "", WARPTOOL_MODE_UPDATERUN,      updaterunArgs);
-    PXOPT_ADD_MODE("-addinputexp",     "", WARPTOOL_MODE_ADDINPUTEXP,    addinputexpArgs);
     PXOPT_ADD_MODE("-exp",             "", WARPTOOL_MODE_EXP,            expArgs);
     PXOPT_ADD_MODE("-imfile",          "", WARPTOOL_MODE_IMFILE,         imfileArgs);
