Index: /trunk/magic/remove/src/streaksremove.c
===================================================================
--- /trunk/magic/remove/src/streaksremove.c	(revision 20816)
+++ /trunk/magic/remove/src/streaksremove.c	(revision 20817)
@@ -187,4 +187,21 @@
 }
 
+static void usage()
+{
+    fprintf(stderr, "USAGE: streaksremove -stage raw|chip|warp|diff -image IMAGE.fits -tmproot directory -streaks streaks_file\n\n");
+    fprintf(stderr, "Optional arguments:\n");
+    fprintf(stderr, "\t-class_id class_id: class_id (required for raw and chip stages)\n");
+    fprintf(stderr, "\t-recovery: directory to save excised pixel images\n");
+    fprintf(stderr, "\t-mask MASK.fits mask file to de-streak\n");
+    fprintf(stderr, "\t-weight WEIGHT.fits: weight file to de-streak\n");
+    fprintf(stderr, "\t-replace: replace the input images with the output\n");
+    fprintf(stderr, "\t-remove: remove the original image after processing (requires -replace)\n");
+    fprintf(stderr, "\t-keepnonwarped: do not exise pixels that were not part of difference processing\n");
+    fprintf(stderr, "\t-transparent val: instead of setting exicsed pixel to NAN add val\n");
+
+    exit(2);
+
+
+}
 static pmConfig *parseArguments(int argc, char **argv)
 {
@@ -205,5 +222,5 @@
     } else {
         psError(PS_ERR_UNKNOWN, true, "-stage is required\n");
-        return NULL;
+        usage();
     }
 
@@ -215,5 +232,5 @@
     } else if ((stage == IPP_STAGE_RAW) || (stage == IPP_STAGE_CHIP)) {
         psError(PS_ERR_UNKNOWN, true, "-class_id is required\n");
-        return NULL;
+        usage();
     }
 
@@ -225,5 +242,5 @@
     } else {
         psError(PS_ERR_UNKNOWN, true, "-streaks is required\n");
-        return NULL;
+        usage();
     }
 
@@ -244,10 +261,10 @@
             if (!pmConfigFileSetsMD(config->arguments, &argc, argv, "INPUT", "-image", NULL)) { ;
                 psError(PS_ERR_UNKNOWN, false, "failed to process -image");
-                return NULL;
+                usage();
             }
         }
     } else {
         psError(PS_ERR_UNKNOWN, true, "-image is required\n");
-        return NULL;
+        usage();
     }
 
@@ -269,5 +286,5 @@
         if (gotReplace) {
             psError(PS_ERR_UNKNOWN, true, "cannot make transparent streaks if -replace");
-            return NULL;
+            usage();
         }
         psArgumentRemove(argnum, &argc, argv);
@@ -284,5 +301,5 @@
         if (CHIP_LEVEL_INPUT(stage)) {
             psError(PS_ERR_UNKNOWN, true, "-astrom is required for raw and chip stages\n");
-            return NULL;
+            usage();
         }
     }
@@ -294,5 +311,5 @@
             psError(PS_ERR_UNKNOWN, true, "mask image must be %snebulous path with %s image path\n",
                 nebulousImage ? "" : "non ", nebulousImage ? "nebulous" : "regular");
-            return NULL;
+            usage();
         }
         psMetadataAddStr(config->arguments, PS_LIST_TAIL, "INPUT.MASK", 0,
@@ -307,5 +324,5 @@
             psError(PS_ERR_UNKNOWN, true, "weight image must have %snebulous path with %s image path\n",
                 nebulousImage ? "" : "non ", nebulousImage ? "nebulous" : "regular");
-            return NULL;
+            usage();
         }
         psMetadataAddStr(config->arguments, PS_LIST_TAIL, "INPUT.WEIGHT", 0,
@@ -320,5 +337,5 @@
             psError(PS_ERR_UNKNOWN, true, "tmproot must have %snebulous path with %s image path with -replace\n",
                 nebulousImage ? "" : "non ", nebulousImage ? "nebulous" : "regular");
-            return NULL;
+            usage();
         }
         psString dir = pathToDirectory(argv[argnum]);
@@ -328,5 +345,5 @@
     } else {
         psError(PS_ERR_UNKNOWN, true, "-tmproot is required\n");
-        return NULL;
+        usage();
     }
 
@@ -339,5 +356,5 @@
     } else if ((stage == IPP_STAGE_RAW) && gotReplace) {
         psError(PS_ERR_UNKNOWN, true, "-recovery is required for -stage raw with -replace\n");
-        return NULL;
+        usage();
     }
 
@@ -345,5 +362,5 @@
         if (!gotReplace) {
             psError(PS_ERR_UNKNOWN, true, "-replace is required with -remove\n");
-            return NULL;
+            usage();
         }
         psArgumentRemove(argnum, &argc, argv);
@@ -359,5 +376,5 @@
         psError(PS_ERR_UNKNOWN, true, "unexpected arguments: %s", unexpectedArguments);
         psFree(unexpectedArguments);
-        return NULL;
+        usage();
     }
 
