Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 7351)
+++ /trunk/ippTools/src/dettool.c	(revision 7352)
@@ -24,4 +24,5 @@
 static bool normalizedframeMode(pxConfig *config);
 static bool addresidMode(pxConfig *config);
+static bool residMode(pxConfig *config);
 
 static detInputExpRow *rawDetrenTodetInputExpRow(rawDetrendExpRow *rawExp, psS32 det_id);
@@ -95,4 +96,9 @@
         case DETTOOL_MODE_ADDRESID:
             if (addresidMode(config)) {
+                goto FAIL;
+            }
+            break;
+        case DETTOOL_MODE_RESID:
+            if (residMode(config)) {
                 goto FAIL;
             }
@@ -1449,2 +1455,8 @@
     return true;
 }
+
+static bool residMode(pxConfig *config)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+    return true;
+}
Index: /trunk/ippTools/src/dettool.h
===================================================================
--- /trunk/ippTools/src/dettool.h	(revision 7351)
+++ /trunk/ippTools/src/dettool.h	(revision 7352)
@@ -19,4 +19,5 @@
     DETTOOL_MODE_NORMALIZEDFRAME,
     DETTOOL_MODE_ADDRESID,
+    DETTOOL_MODE_RESID,
 } dettoolMode;
 
Index: /trunk/ippTools/src/dettoolConfig.c
===================================================================
--- /trunk/ippTools/src/dettoolConfig.c	(revision 7351)
+++ /trunk/ippTools/src/dettoolConfig.c	(revision 7352)
@@ -184,4 +184,17 @@
         "define as having acceptable residuals", false);
 
+    // -normalizedframe
+    psMetadata *residArgs = psMetadataAlloc();
+    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-det_id",  0,
+        "search for detrend ID (required)", NULL);
+    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-iter",  0,
+        "search for iteration number", NULL);
+    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-class_id",  0,
+        "search for class ID", NULL);
+    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-stats",  0,
+        "search for stats", NULL);
+    psMetadataAddStr(residArgs, PS_LIST_TAIL, "-recipe",  0,
+        "search for recipe", NULL);
+
 #define PXTOOL_MODE(option, modeval, argset) \
     if ((N = psArgumentGet (argc, argv, option))) { \
@@ -217,4 +230,5 @@
     PXTOOL_MODE("-normalizedframe", DETTOOL_MODE_NORMALIZEDFRAME,normalizedframeArgs);
     PXTOOL_MODE("-addresid",        DETTOOL_MODE_ADDRESID,      addresidArgs);
+    PXTOOL_MODE("-resid",           DETTOOL_MODE_RESID,         residArgs);
 
     bool argErr = false;
@@ -270,4 +284,7 @@
         psArgumentHelp(addresidArgs);
         psFree(addresidArgs);
+        fprintf (stdout, "-resid ");
+        psArgumentHelp(residArgs);
+        psFree(residArgs);
 
         exit(EXIT_FAILURE);
@@ -285,4 +302,5 @@
     psFree(addnormalizedArgs);
     psFree(addresidArgs);
+    psFree(residArgs);
 
     // setup search criterion
