Index: trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c	(revision 19579)
+++ trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c	(revision 20936)
@@ -77,6 +77,8 @@
 	status = ParseAverageField (&fields[Nfields], field);
       } 
+      if (table == DVO_TABLE_IMAGE) {
+	status = ParseImageField (&fields[Nfields], field);
+      } 
       if (!status) {
-	gprint (GP_ERR, "unknown database field %s\n", field);
 	free (field);
 	dbFreeFields (fields, Nfields);
@@ -143,11 +145,18 @@
   REALLOCATE (*stack, dbStack, N + 20);
 
+  Rname = Dname = NULL;
+  if (table == DVO_TABLE_MEASURE) {
+    Rname = strcreate ("RA:AVE");
+    Dname = strcreate ("DEC:AVE");
+  }
   if (table == DVO_TABLE_AVERAGE) {
     Rname = strcreate ("RA");
     Dname = strcreate ("DEC");
-  } else {
-    Rname = strcreate ("RA:AVE");
-    Dname = strcreate ("DEC:AVE");
-  }
+  }
+  if (table == DVO_TABLE_IMAGE) {
+    Rname = strcreate ("RA");
+    Dname = strcreate ("DEC");
+  } 
+  if (Rname == NULL) return (FALSE);
 
   // add: ((ra > rmin) && (ra < rmax) && (dec > dmin) && (dec < dmax))
@@ -155,38 +164,36 @@
 
   stack[0][N +  0].name = strcreate (Rname);
-  stack[0][N +  0].type = 'X';
+  stack[0][N +  0].type = DB_STACK_VALUE;
   stack[0][N +  1].name = strfloat (Rmin);
-  stack[0][N +  1].type = 'X';
+  stack[0][N +  1].type = DB_STACK_VALUE;
   stack[0][N +  2].name = strcreate (">");
-  stack[0][N +  2].type = 4;
-  // stack[0][N +  3].name = strcreate ("A");
-  // stack[0][N +  3].type = 3;
+  stack[0][N +  2].type = DB_STACK_COMPARE;
 
   stack[0][N +  3].name = strcreate (Rname);
-  stack[0][N +  3].type = 'X';
+  stack[0][N +  3].type = DB_STACK_VALUE;
   stack[0][N +  4].name = strfloat (Rmax);
-  stack[0][N +  4].type = 'X';
+  stack[0][N +  4].type = DB_STACK_VALUE;
   stack[0][N +  5].name = strcreate ("<");
-  stack[0][N +  5].type = 4;
+  stack[0][N +  5].type = DB_STACK_COMPARE;
   stack[0][N +  6].name = strcreate ("A");
-  stack[0][N +  6].type = 3;
+  stack[0][N +  6].type = DB_STACK_LOGIC;
 
   stack[0][N +  7].name = strcreate (Dname);
-  stack[0][N +  7].type = 'X';
+  stack[0][N +  7].type = DB_STACK_VALUE;
   stack[0][N +  8].name = strfloat (Dmin);
-  stack[0][N +  8].type = 'X';
+  stack[0][N +  8].type = DB_STACK_VALUE;
   stack[0][N +  9].name = strcreate (">");
-  stack[0][N +  9].type = 4;
+  stack[0][N +  9].type = DB_STACK_COMPARE;
   stack[0][N + 10].name = strcreate ("A");
-  stack[0][N + 10].type = 3;
+  stack[0][N + 10].type = DB_STACK_LOGIC;
 
   stack[0][N + 11].name = strcreate (Dname);
-  stack[0][N + 11].type = 'X';
+  stack[0][N + 11].type = DB_STACK_VALUE;
   stack[0][N + 12].name = strfloat (Dmax);
-  stack[0][N + 12].type = 'X';
+  stack[0][N + 12].type = DB_STACK_VALUE;
   stack[0][N + 13].name = strcreate ("<");
-  stack[0][N + 13].type = 4;
+  stack[0][N + 13].type = DB_STACK_COMPARE;
   stack[0][N + 14].name = strcreate ("A");
-  stack[0][N + 14].type = 3;
+  stack[0][N + 14].type = DB_STACK_LOGIC;
 
   if (N == 0) {
@@ -194,5 +201,5 @@
   } else {
     stack[0][N + 15].name = strcreate ("A");
-    stack[0][N + 15].type = 3;
+    stack[0][N + 15].type = DB_STACK_LOGIC;
     N += 16;
   }    
