Index: trunk/Ohana/src/opihi/cmd.data/init.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/init.c	(revision 21060)
+++ trunk/Ohana/src/opihi/cmd.data/init.c	(revision 21064)
@@ -7,4 +7,5 @@
 int book_command     PROTO((int, char **));
 int center           PROTO((int, char **));
+int parity           PROTO((int, char **));
 int circstats        PROTO((int, char **));
 int clear            PROTO((int, char **));
@@ -128,4 +129,5 @@
   {1, "book",         book_command,     "commands to manipulate book/page/word data"},
   {1, "center",       center,           "center image on coords"},
+  {1, "parity",       parity,           "set image parity"},
   {1, "circstats",    circstats,        "circular statistics"},
   {1, "clear",        clear,            "erase plot"},
Index: trunk/Ohana/src/opihi/cmd.data/rebin.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/rebin.c	(revision 21060)
+++ trunk/Ohana/src/opihi/cmd.data/rebin.c	(revision 21064)
@@ -128,4 +128,6 @@
 	  for (i = 0; i < nx; i++, Vout++) {
 	    for (x = 0; x < n; x++, Vin++) {
+	      if (isnan(*Vin)) continue;
+	      if (isinf(*Vin)) continue;
 	      if (Ignore && (*Vin == IgnoreValue)) continue;
 	      *Vout += *Vin;
@@ -144,5 +146,5 @@
 	  if (Normalize) { Vn = Npix + j*nx; }
 	  for (i = 0; i < in[0].header.Naxis[0]; i++, Vin++) {
-	    if (Ignore && (*Vin == IgnoreValue)) { 
+	    if (isnan(*Vin) || isinf(*Vin) || (Ignore && (*Vin == IgnoreValue))) { 
 	      Vout += n; 
 	      if (Normalize) Vn += n; 
