Index: /trunk/Ohana/src/addstar/src/find_matches_refstars.c
===================================================================
--- /trunk/Ohana/src/addstar/src/find_matches_refstars.c	(revision 7972)
+++ /trunk/Ohana/src/addstar/src/find_matches_refstars.c	(revision 7973)
@@ -41,4 +41,7 @@
   Nmiss = catalog[0].Nmissing;
   NMISS = Nmiss + 1000;
+  if ((NMISS < 1) || (NMISS > 1e10)) {
+      fprintf (stderr, "weird value for NMISS: %d\n", NMISS);
+  }
   ALLOCATE (next_miss, int, NMISS);
   REALLOCATE (catalog[0].missing, Missing, NMISS);
Index: /trunk/Ohana/src/addstar/src/gettycho.c
===================================================================
--- /trunk/Ohana/src/addstar/src/gettycho.c	(revision 7972)
+++ /trunk/Ohana/src/addstar/src/gettycho.c	(revision 7973)
@@ -63,10 +63,6 @@
       nitems = fread (buffer, NBYTE, NITEM, f);
       if (nitems == 0) break;
-      if (nitems != NITEM) {
-	fprintf (stderr, "ERROR: failure reading data from file %s\n", filename);
-	exit (1);
-      }
 
-      for (j = 0; j < NITEM; j++) {
+      for (j = 0; j < nitems; j++) {
 	line = &buffer[j*NBYTE];
 	stars[Ntycho].R = atof (&line[15]);
@@ -115,4 +111,6 @@
 	CHECK_REALLOCATE (stars, Stars, NTYCHO, Ntycho, 5000);
       }
+
+      if (nitems != NITEM) break;
     }
   next_section:
Index: /trunk/Ohana/src/gastro2/include/gastro2.h
===================================================================
--- /trunk/Ohana/src/gastro2/include/gastro2.h	(revision 7972)
+++ /trunk/Ohana/src/gastro2/include/gastro2.h	(revision 7973)
@@ -125,4 +125,5 @@
 int GASTRO_MAX_NSTARS;
 int TEXTMODE;
+int PTOLEMY_FILL_FACTOR;
 
 int    FORCE;
Index: /trunk/Ohana/src/gastro2/src/gargs.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/gargs.c	(revision 7972)
+++ /trunk/Ohana/src/gastro2/src/gargs.c	(revision 7973)
@@ -35,4 +35,11 @@
   if ((N = get_argument (*argc, argv, "-textmode"))) {
     TEXTMODE = TRUE;
+    remove_argument (N, argc, argv);
+  }
+
+  /* force read of image database with mismatched NSTARS & size */ 
+  PTOLEMY_FILL_FACTOR = FALSE;
+  if ((N = get_argument (*argc, argv, "-ptolemy-fill-factor"))) {
+    PTOLEMY_FILL_FACTOR = TRUE;
     remove_argument (N, argc, argv);
   }
Index: /trunk/Ohana/src/gastro2/src/getptolemy.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/getptolemy.c	(revision 7972)
+++ /trunk/Ohana/src/gastro2/src/getptolemy.c	(revision 7973)
@@ -18,5 +18,12 @@
     if (Nptolemy == 0) continue;
 
-    FracArea = ptolemy_area (ptolemy, Nptolemy, &regions[i]);
+    // XXX this measurement adjusts a DVO database for 
+    // partial coverage; the correction is bogus if the
+    // sky density of the catalog is too low (<< 100 stars
+    // per field
+    FracArea = 1.0;
+    if (PTOLEMY_FILL_FACTOR) {
+	FracArea = ptolemy_area (ptolemy, Nptolemy, &regions[i]);
+    } 
 
     Ns = Ref[0].N;
Index: /trunk/Ohana/src/gastro2/src/gptolemy2.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/gptolemy2.c	(revision 7972)
+++ /trunk/Ohana/src/gastro2/src/gptolemy2.c	(revision 7973)
@@ -19,6 +19,8 @@
   switch (lock_catalog (&catalog, LCK_SOFT)) {
     case 0:
+      fprintf (stderr, "can't lock catalog %s\n", filename);
+      return ((GSCdata *)NULL);
     case 2:
-      fprintf (stderr, "can't lock catalog data %s\n", filename);
+      fprintf (stderr, "catalog %s is empty\n", filename);
       return ((GSCdata *)NULL);
     case 1:
@@ -40,5 +42,5 @@
   ALLOCATE (stars, GSCdata, *Nstars);
 
-  /* select all entries, ignore magnitudes */
+  /* select all entries, use first magnitude */
   for (i = 0; i < catalog.Naverage; i++, nstar++) {
     stars[nstar].R = catalog.average[i].R;
