Index: /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/constants.h
===================================================================
--- /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/constants.h	(revision 39183)
+++ /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/constants.h	(revision 39184)
@@ -11,9 +11,4 @@
 
 # define NCHANNELS 10
-# define NPIXELS_DYNAMIC 128
-
-// XXX for the moment, this is set to match the values in SetColorScale3D_CC
-# define NPIXELS_STATIC 128
-// # define NPIXELS_STATIC 4600 -- if we want fullcolor to work, need this
 
 # define PAD1  3
Index: /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/globals.h
===================================================================
--- /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/globals.h	(revision 39183)
+++ /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/include/globals.h	(revision 39184)
@@ -11,4 +11,7 @@
 int   NAN_GREEN;
 int   NAN_BLUE;
+
+int   NPIXELS_DYNAMIC;
+int   NPIXELS_STATIC;
 
 /* these should be absorbed into KapaImageWidget 
Index: /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/CheckVisual.c
===================================================================
--- /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/CheckVisual.c	(revision 39183)
+++ /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/CheckVisual.c	(revision 39184)
@@ -133,9 +133,4 @@
   if (graphic[0].dynamicColors) {
     Npixels = NPIXELS_DYNAMIC;
-    if ((N = get_argument (*argc, argv, "-ncolors"))) {
-      remove_argument(N, argc, argv);
-      Npixels = atoi (argv[N]);
-      remove_argument(N, argc, argv);
-    } 
 
     /* allocate color cells */
@@ -181,11 +176,4 @@
     }
   } else {
-    Npixels = NPIXELS_STATIC;
-    if ((N = get_argument (*argc, argv, "-ncolors"))) {
-      remove_argument(N, argc, argv);
-      Npixels = atoi (argv[N]);
-      remove_argument(N, argc, argv);
-    } 
-
     // XXX allocate the unsigned long *pixels here and above
     ALLOCATE (graphic[0].pixels, unsigned long, Npixels);
Index: /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/args.c	(revision 39183)
+++ /branches/eam_branches/ipp-20151113/Ohana/src/kapa2/src/args.c	(revision 39184)
@@ -1,7 +1,14 @@
 # include "Ximage.h"
+
+void help(void);
 
 int args (int *argc, char **argv) {
 
   int N;
+
+  if ((N = get_argument (*argc, argv, "-h"))) help();
+  if ((N = get_argument (*argc, argv, "-help"))) help();
+  if ((N = get_argument (*argc, argv, "--h"))) help();
+  if ((N = get_argument (*argc, argv, "--help"))) help();
 
   MAP_WINDOW = TRUE;
@@ -37,4 +44,13 @@
   }
 
+  NPIXELS_DYNAMIC = 128;
+  NPIXELS_STATIC = 128;
+  if ((N = get_argument (*argc, argv, "-ncolors"))) {
+    remove_argument(N, argc, argv);
+    NPIXELS_DYNAMIC = atoi (argv[N]);
+    NPIXELS_STATIC = NPIXELS_DYNAMIC;
+    remove_argument(N, argc, argv);
+  } 
+
   NAN_RED   = 0;
   NAN_GREEN = 0xffff;
@@ -56,2 +72,17 @@
   return (TRUE);
 }
+
+void help (void) {
+
+  fprintf (stderr, "USAGE: kapa [options]\n");
+  fprintf (stderr, "OPTIONS: \n");
+  fprintf (stderr, "-h, -help, --h, --help : this listing\n");
+  fprintf (stderr, "-nomap : use X but do not generate a window\n");
+  fprintf (stderr, "-name : name for the X window bar\n");
+  fprintf (stderr, "-noX : do not use an X window\n");
+  fprintf (stderr, "-debug : report debug info\n");
+  fprintf (stderr, "-fg : define the foreground color (X color style)\n");
+  fprintf (stderr, "-ncolors : set the number of colors (pixels) available (128 default)\n");
+  fprintf (stderr, "-nan (red) (green) (blue) : set NaN pixels to this color (hex values)\n");
+  exit (2);
+}
