Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 9428)
+++ /trunk/ippTools/src/dettool.c	(revision 9429)
@@ -36,10 +36,10 @@
 static bool inputMode(pxConfig *config);
 static bool rawMode(pxConfig *config);
-static bool toprocessMode(pxConfig *config);
+static bool toprocessedimfileMode(pxConfig *config);
 static bool addprocessedimfileMode(pxConfig *config);
 static bool toprocessedexpMode(pxConfig *config);
 static bool addprocessedexpMode(pxConfig *config);
 static bool processedexpMode(pxConfig *config);
-static bool tostackMode(pxConfig *config);
+static bool tostackedMode(pxConfig *config);
 static bool processedimfileMode(pxConfig *config);
 static bool addstackedMode(pxConfig *config);
@@ -52,5 +52,5 @@
 static bool addnormalizedexpMode(pxConfig *config);
 static bool normalizedexpMode(pxConfig *config);
-static bool toresidMode(pxConfig *config);
+static bool toresidimfileMode(pxConfig *config);
 static bool addresidimfileMode(pxConfig *config);
 static bool normalizedimfileMode(pxConfig *config);
@@ -98,11 +98,11 @@
         MODECASE(DETTOOL_MODE_INPUT,            inputMode);
         MODECASE(DETTOOL_MODE_RAW,              rawMode);
-        MODECASE(DETTOOL_MODE_TOPROCESS,        toprocessMode);
+        MODECASE(DETTOOL_MODE_TOPROCESSEDIMFILE,toprocessedimfileMode);
         MODECASE(DETTOOL_MODE_ADDPROCESSEDIMFILE,addprocessedimfileMode);
+        MODECASE(DETTOOL_MODE_PROCESSEDIMFILE,  processedimfileMode);
         MODECASE(DETTOOL_MODE_TOPROCESSEDEXP,   toprocessedexpMode);
         MODECASE(DETTOOL_MODE_ADDPROCESSEDEXP,  addprocessedexpMode);
         MODECASE(DETTOOL_MODE_PROCESSEDEXP,     processedexpMode);
-        MODECASE(DETTOOL_MODE_TOSTACK,          tostackMode);
-        MODECASE(DETTOOL_MODE_PROCESSEDIMFILE,  processedimfileMode);
+        MODECASE(DETTOOL_MODE_TOSTACKED,        tostackedMode);
         MODECASE(DETTOOL_MODE_ADDSTACKED,       addstackedMode);
         MODECASE(DETTOOL_MODE_STACKED,          stackedMode);
@@ -115,5 +115,5 @@
         MODECASE(DETTOOL_MODE_ADDNORMALIZEDEXP, addnormalizedexpMode);
         MODECASE(DETTOOL_MODE_NORMALIZEDEXP,    normalizedexpMode);
-        MODECASE(DETTOOL_MODE_TORESID,          toresidMode);
+        MODECASE(DETTOOL_MODE_TORESIDIMFILE,    toresidimfileMode);
         MODECASE(DETTOOL_MODE_ADDRESIDIMFILE,   addresidimfileMode);
         MODECASE(DETTOOL_MODE_TORESIDEXP,       toresidexpMode);
@@ -750,5 +750,5 @@
 }
 
-static bool toprocessMode(pxConfig *config)
+static bool toprocessedimfileMode(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -1319,5 +1319,5 @@
 }
 
-static bool tostackMode(pxConfig *config)
+static bool tostackedMode(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -2596,5 +2596,5 @@
 }
 
-static bool toresidMode(pxConfig *config)
+static bool toresidimfileMode(pxConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
Index: /trunk/ippTools/src/dettool.h
===================================================================
--- /trunk/ippTools/src/dettool.h	(revision 9428)
+++ /trunk/ippTools/src/dettool.h	(revision 9429)
@@ -31,5 +31,5 @@
     DETTOOL_MODE_INPUT,
     DETTOOL_MODE_RAW,
-    DETTOOL_MODE_TOPROCESS,
+    DETTOOL_MODE_TOPROCESSEDIMFILE,
     DETTOOL_MODE_ADDPROCESSEDIMFILE,
     DETTOOL_MODE_PROCESSEDIMFILE,
@@ -37,5 +37,5 @@
     DETTOOL_MODE_ADDPROCESSEDEXP,
     DETTOOL_MODE_PROCESSEDEXP,
-    DETTOOL_MODE_TOSTACK,
+    DETTOOL_MODE_TOSTACKED,
     DETTOOL_MODE_ADDSTACKED,
     DETTOOL_MODE_STACKED,
@@ -48,11 +48,11 @@
     DETTOOL_MODE_ADDNORMALIZEDEXP,
     DETTOOL_MODE_NORMALIZEDEXP,
-    DETTOOL_MODE_TORESID,
+    DETTOOL_MODE_TORESIDIMFILE,
     DETTOOL_MODE_ADDRESIDIMFILE,
+    DETTOOL_MODE_RESIDIMFILE,
     DETTOOL_MODE_TORESIDEXP,
-    DETTOOL_MODE_RESIDIMFILE,
+    DETTOOL_MODE_RESIDEXP,
     DETTOOL_MODE_ADDRESIDEXP,
     DETTOOL_MODE_RESIDDETRUN,
-    DETTOOL_MODE_RESIDEXP,
     DETTOOL_MODE_UPDATERESIDEXP,
     DETTOOL_MODE_ADDDETRUNSUMMARY,
Index: /trunk/ippTools/src/dettoolConfig.c
===================================================================
--- /trunk/ippTools/src/dettoolConfig.c	(revision 9428)
+++ /trunk/ippTools/src/dettoolConfig.c	(revision 9429)
@@ -107,13 +107,13 @@
             "use the simple output format", false);
 
-    // -toprocess
-    psMetadata *toprocessArgs = psMetadataAlloc();
-    psMetadataAddStr(toprocessArgs, PS_LIST_TAIL, "-det_id",  0,
+    // -toprocessedimfile
+    psMetadata *toprocessedimfileArgs = psMetadataAlloc();
+    psMetadataAddStr(toprocessedimfileArgs, PS_LIST_TAIL, "-det_id",  0,
         "search for detrend ID", NULL);
-    psMetadataAddStr(toprocessArgs, PS_LIST_TAIL, "-exp_tag",  0,
+    psMetadataAddStr(toprocessedimfileArgs, PS_LIST_TAIL, "-exp_tag",  0,
         "search for exp ID", NULL);
-    psMetadataAddStr(toprocessArgs, PS_LIST_TAIL, "-class_id",  0,
+    psMetadataAddStr(toprocessedimfileArgs, PS_LIST_TAIL, "-class_id",  0,
         "search for class ID", NULL);
-    psMetadataAddBool(toprocessArgs, PS_LIST_TAIL, "-simple",  0,
+    psMetadataAddBool(toprocessedimfileArgs, PS_LIST_TAIL, "-simple",  0,
             "use the simple output format", false);
     
@@ -191,26 +191,26 @@
         "use the simple output format", false);
 
-    // -tostack
-    psMetadata *tostackArgs = psMetadataAlloc();
-    psMetadataAddBool(tostackArgs, PS_LIST_TAIL, "-simple",  0,
+    // -tostacked
+    psMetadata *tostackedArgs = psMetadataAlloc();
+    psMetadataAddBool(tostackedArgs, PS_LIST_TAIL, "-simple",  0,
         "use the simple output format", false);
 
     // -addstacked
-    psMetadata *addstacArgs = psMetadataAlloc();
-    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-det_id",  0,
-        "define detrend ID (required)", NULL);
-    psMetadataAddS32(addstacArgs, PS_LIST_TAIL, "-iteration",  0,
-        "define iteration number", 0);
-    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-class_id",  0,
+    psMetadata *addstackedArgs = psMetadataAlloc();
+    psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-det_id",  0,
+        "define detrend ID (required)", NULL);
+    psMetadataAddS32(addstackedArgs, PS_LIST_TAIL, "-iteration",  0,
+        "define iteration number", 0);
+    psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-class_id",  0,
         "define class ID (required)", NULL);
-    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-recip",  0,
+    psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-recip",  0,
         "define recipe (required)", NULL);
-    psMetadataAddF64(addstacArgs, PS_LIST_TAIL, "-bg",  0,
-        "define exposue background", NAN);
-    psMetadataAddF64(addstacArgs, PS_LIST_TAIL, "-bg_stdev",  0,
-        "define exposue background stdev", NAN);
-    psMetadataAddF64(addstacArgs, PS_LIST_TAIL, "-bg_mean_stdev",  0,
-        "define exposue background mean stdev", NAN);
-    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-uri",  0,
+    psMetadataAddF64(addstackedArgs, PS_LIST_TAIL, "-bg",  0,
+        "define exposue background", NAN);
+    psMetadataAddF64(addstackedArgs, PS_LIST_TAIL, "-bg_stdev",  0,
+        "define exposue background stdev", NAN);
+    psMetadataAddF64(addstackedArgs, PS_LIST_TAIL, "-bg_mean_stdev",  0,
+        "define exposue background mean stdev", NAN);
+    psMetadataAddStr(addstackedArgs, PS_LIST_TAIL, "-uri",  0,
         "define URI (required)", NULL);
 
@@ -237,14 +237,14 @@
     
     // -stacked
-    psMetadata *stacArgs = psMetadataAlloc();
-    psMetadataAddStr(stacArgs, PS_LIST_TAIL, "-det_id",  0,
+    psMetadata *stackedArgs = psMetadataAlloc();
+    psMetadataAddStr(stackedArgs, PS_LIST_TAIL, "-det_id",  0,
         "search for detrend ID", NULL);
-    psMetadataAddS32(stacArgs, PS_LIST_TAIL, "-iteration",  0,
+    psMetadataAddS32(stackedArgs, PS_LIST_TAIL, "-iteration",  0,
         "search for iteration number", 0);
-    psMetadataAddStr(stacArgs, PS_LIST_TAIL, "-class_id",  0,
+    psMetadataAddStr(stackedArgs, PS_LIST_TAIL, "-class_id",  0,
         "search for class ID", NULL);
-    psMetadataAddStr(stacArgs, PS_LIST_TAIL, "-recip",  0,
+    psMetadataAddStr(stackedArgs, PS_LIST_TAIL, "-recip",  0,
         "search for recipe", NULL);
-    psMetadataAddBool(stacArgs, PS_LIST_TAIL, "-simple",  0,
+    psMetadataAddBool(stackedArgs, PS_LIST_TAIL, "-simple",  0,
         "use the simple output format", false);
 
@@ -315,7 +315,7 @@
         "use the simple output format", false);
  
-    // -toresid
-    psMetadata *toresidArgs = psMetadataAlloc();
-    psMetadataAddBool(toresidArgs, PS_LIST_TAIL, "-simple",  0,
+    // -toresidimfile
+    psMetadata *toresidimfileArgs = psMetadataAlloc();
+    psMetadataAddBool(toresidimfileArgs, PS_LIST_TAIL, "-simple",  0,
         "use the simple output format", false);
 
@@ -502,5 +502,5 @@
     PXTOOL_MODE("-runs",            DETTOOL_MODE_RUNS,          runsArgs);
     PXTOOL_MODE("-input",           DETTOOL_MODE_INPUT,         inputArgs);
-    PXTOOL_MODE("-toprocess",       DETTOOL_MODE_TOPROCESS,     toprocessArgs);
+    PXTOOL_MODE("-toprocessedimfile", DETTOOL_MODE_TOPROCESSEDIMFILE, toprocessedimfileArgs);
     PXTOOL_MODE("-addprocessedimfile", DETTOOL_MODE_ADDPROCESSEDIMFILE,  addprocessedimfileArgs);
     PXTOOL_MODE("-processedimfile", DETTOOL_MODE_PROCESSEDIMFILE, processedimfileArgs);
@@ -508,7 +508,7 @@
     PXTOOL_MODE("-addprocessedexp", DETTOOL_MODE_ADDPROCESSEDEXP, addprocessedexpArgs);
     PXTOOL_MODE("-processedexp",    DETTOOL_MODE_PROCESSEDEXP, processedexpArgs);
-    PXTOOL_MODE("-tostack",         DETTOOL_MODE_TOSTACK,       tostackArgs);
-    PXTOOL_MODE("-addstacked",      DETTOOL_MODE_ADDSTACKED,    addstacArgs);
-    PXTOOL_MODE("-stacked",         DETTOOL_MODE_STACKED,       stacArgs);
+    PXTOOL_MODE("-tostacked",       DETTOOL_MODE_TOSTACKED,     tostackedArgs);
+    PXTOOL_MODE("-addstacked",      DETTOOL_MODE_ADDSTACKED,    addstackedArgs);
+    PXTOOL_MODE("-stacked",         DETTOOL_MODE_STACKED,       stackedArgs);
     PXTOOL_MODE("-tonormalize",     DETTOOL_MODE_TONORMALIZE,   tonormalizeArgs);
     PXTOOL_MODE("-addnormalizedstat",     DETTOOL_MODE_ADDNORMALIZEDSTAT,   addnormstatArgs);
@@ -519,5 +519,5 @@
     PXTOOL_MODE("-addnormalizedexp", DETTOOL_MODE_ADDNORMALIZEDEXP, addnormalizedexpArgs);
     PXTOOL_MODE("-normalizedexp",   DETTOOL_MODE_NORMALIZEDEXP, normalizedexpArgs);
-    PXTOOL_MODE("-toresid",         DETTOOL_MODE_TORESID,       toresidArgs);
+    PXTOOL_MODE("-toresidimfile",   DETTOOL_MODE_TORESIDIMFILE, toresidimfileArgs);
     PXTOOL_MODE("-addresidimfile",  DETTOOL_MODE_ADDRESIDIMFILE,  addresidimfileArgs);
     PXTOOL_MODE("-residimfile",     DETTOOL_MODE_RESIDIMFILE,    residimfileArgs);
