Index: trunk/stac/src/stacConfig.c
===================================================================
--- trunk/stac/src/stacConfig.c	(revision 2711)
+++ trunk/stac/src/stacConfig.c	(revision 2783)
@@ -9,5 +9,5 @@
 {
     fprintf (stderr, "STAC: Simultaneous Telescope Array Combination\n"
-	     "Usage: %s [-h] [-v] [-g GAIN] [-r RN] [-o NX NY] [-s SAT] [-b BAD] [-k REJ] [-k FRAC] [-G GRAD] OUT IN1 IN2...\n"
+	     "Usage: %s [-h] [-v] [-g GAIN] [-r RN] [-o NX NY] [-s SAT] [-b BAD] [-k REJ] [-n NREJECT] [-k FRAC] [-G GRAD] OUT IN1 IN2...\n"
 	     "where\n"
 	     "\t-h           Help (this info)\n"
@@ -19,4 +19,5 @@
 	     "\t-b BAD       Bad level (0)\n"
 	     "\t-k REJ       Rejection level (k-sigma; 3.5)\n"
+	     "\t-n NREJECT   Number of rejection iterations (2)\n"
 	     "\t-f FRAC      Fraction of pixel to be marked before considered bad (0.5)\n"
 	     "\t-d GRAD      Gradient threshold for pixel to be marked (0.0)\n"
@@ -45,4 +46,5 @@
     config->frac = 0.5;
     config->grad = 0.4;
+    config->nReject = 2;
 
     return config;
@@ -74,5 +76,5 @@
 
     /* Parse command-line arguments using getopt */
-    while ((opt = getopt(argc, argv, "hvg:r:o:s:b:k:f:G:")) != -1) {
+    while ((opt = getopt(argc, argv, "hvg:r:o:s:b:k:n:f:G:")) != -1) {
         switch (opt) {
 	  case 'h':
@@ -115,4 +117,9 @@
 	  case 'k':
 	    if (sscanf(optarg, "%f", &config->reject) != 1) {
+		help(programName);
+	    }
+	    break;
+	  case 'n':
+	    if (sscanf(optarg, "%d", &config->nReject) != 1) {
 		help(programName);
 	    }
