Index: /trunk/Ohana/src/addstar/src/addstar.c
===================================================================
--- /trunk/Ohana/src/addstar/src/addstar.c	(revision 13142)
+++ /trunk/Ohana/src/addstar/src/addstar.c	(revision 13143)
@@ -3,5 +3,5 @@
 int main (int argc, char **argv) {
 
-  int Nmatch, status;
+  int Nmatch, status, loadObjects;
   int i, Nstars, Nimages, Nsubset;
   unsigned long long Naverage, Nmeasure;
@@ -72,9 +72,10 @@
   if (VERBOSE) fprintf (stderr, "writing to %d regions\n", skylist[0].Nregions);
 
-  /* XXX clean this up a bit : for only_image, I don't need to do this loop
-     unless we are getting the calibration. */
-  /*** match stars to existing catalog data (or otherwise manipulate catalog data) ***/
+  /* don't load the object tables for only_images, unless we are getting the calibration. */
+  loadObjects = !options.only_images || options.calibrate;
+
+  /* match stars to existing catalog data (or otherwise manipulate catalog data) */
   Nmatch = Naverage = Nmeasure = 0;
-  for (i = 0; i < skylist[0].Nregions; i++) {
+  for (i = 0; loadObjects && (i < skylist[0].Nregions); i++) {
 
     // set the parameters which guide catalog open/load/create
@@ -86,9 +87,17 @@
     if (options.update) catalog.catflags = LOAD_AVES | LOAD_MEAS_META | LOAD_MISS | LOAD_SECF;
 
-    // an error exit status here is a significant error
-    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
-      fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", catalog.filename);
-      exit (2);
+    // open as read or write, depending on desire
+    if (options.only_images && options.calibrate) {
+      if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "r")) {
+	continue;
+      }
+    } else {
+      // an error exit status here is a significant error (disk I/O or file access)
+      if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
+	fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", catalog.filename);
+	exit (2);
+      }
     }
+
     // Nave_disk == 0 implies an empty catalog file
     // for only_match, skip empty catalogs
