Index: trunk/Ohana/src/dvomerge/include/dvomerge.h
===================================================================
--- trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 42132)
+++ trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 42133)
@@ -65,4 +65,5 @@
 int    RESET_LENSING;
 
+int    SKIP_IMAGES; 
 int    SKIP_MEASURE;
 int    SKIP_MISSING;
Index: trunk/Ohana/src/dvomerge/src/args.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/args.c	(revision 42132)
+++ trunk/Ohana/src/dvomerge/src/args.c	(revision 42133)
@@ -39,9 +39,18 @@
     remove_argument (N, argc, argv);
   }
-
-  /* extra error messages */
-  MATCHED_TABLES = FALSE;
+  SKIP_IMAGES = FALSE;
+  if ((N = get_argument (*argc, argv, "-skip-images"))) {
+    SKIP_IMAGES = TRUE;
+    remove_argument (N, argc, argv);
+  }
+
+  /* extra error messages */
+  MATCHED_TABLES = TRUE;
   if ((N = get_argument (*argc, argv, "-matched-tables"))) {
     MATCHED_TABLES = TRUE;
+    remove_argument (N, argc, argv);
+  }
+  if ((N = get_argument (*argc, argv, "-unmatched-tables"))) {
+    MATCHED_TABLES = FALSE;
     remove_argument (N, argc, argv);
   }
@@ -77,4 +86,14 @@
     SKIP_GALPHOT = TRUE;
     remove_argument (N, argc, argv);
+  }
+
+  if (SKIP_IMAGES && !(SKIP_MEASURE || SKIP_LENSING)) {
+    fprintf (stderr, "WARNING: skipping images but merging measure and lensing tables: imageIDs will not be correct\n");
+    fprintf (stderr, "type Ctrl-C within 5 seconds to cancel\n");
+    for (int i = 5; i > 0; i--) {
+      fprintf (stderr, "%d.. ", i);
+      usleep (1000000);
+    }
+    fprintf (stderr, "\n");
   }
 
Index: trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c	(revision 42132)
+++ trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c	(revision 42133)
@@ -404,9 +404,9 @@
   off_t i;
 
-  for (i = 0; i < IDmap->oldIDmax + 1; i++) {
+  for (i = 0; IDmap->notFoundMeasure && (i < IDmap->oldIDmax + 1); i++) {
     if (!IDmap->notFoundMeasure[i]) continue;
     fprintf (stderr, "SKIP IMAGE MEASURE: "OFF_T_FMT", %d measures\n", i, IDmap->notFoundMeasure[i]);
   }
-  for (i = 0; i < IDmap->oldIDmax + 1; i++) {
+  for (i = 0; IDmap->notFoundLensing && (i < IDmap->oldIDmax + 1); i++) {
     if (!IDmap->notFoundLensing[i]) continue;
     fprintf (stderr, "SKIP IMAGE LENSING: "OFF_T_FMT", %d lensings\n", i, IDmap->notFoundLensing[i]);
Index: trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c	(revision 42132)
+++ trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c	(revision 42133)
@@ -81,12 +81,15 @@
   }
 
-  if (CONTINUE) {
-    // need to determine the mapping from the input to the output images
-    dvomergeImagesGetMap (&IDmap, input, output);
-  } else {
-    dvomergeImagesUpdate (&IDmap, input, output);
-    if (IMAGES_ONLY) exit (0);
+  // do not merge the images unless requested
+  if (!SKIP_IMAGES) {
+    if (CONTINUE) {
+      // need to determine the mapping from the input to the output images
+      dvomergeImagesGetMap (&IDmap, input, output);
+    } else {
+      dvomergeImagesUpdate (&IDmap, input, output);
+      if (IMAGES_ONLY) exit (0);
+    }
   }
-
+    
   // load the sky table for the existing database
   insky = SkyTableLoadOptimal (input, NULL, NULL, FALSE, SKY_DEPTH_HST, VERBOSE);
Index: trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c	(revision 42132)
+++ trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c	(revision 42133)
@@ -163,4 +163,5 @@
     }
 
+    // for SKIP_IMAGES, this is a NO-OP
     dvo_update_image_IDs (IDmap, &incatalog);
 
Index: trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c	(revision 42132)
+++ trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c	(revision 42133)
@@ -69,4 +69,5 @@
       LoadCatalog (&outcatalog, outlist[0].regions[j], outlist[0].filename[j], "w", threadData->NsecfiltOutput);
 
+      // for SKIP_IMAGES, this is a NO-OP
       dvo_update_image_IDs (threadData->IDmap, &incatalog);
       merge_catalogs_old (&threadData->outsky->regions[j], &outcatalog, &incatalog, RADIUS, threadData->secfiltMap);
@@ -183,10 +184,12 @@
   }
 
-  if (CONTINUE) {
-    // need to determine the mapping from the input to the output images
-    dvomergeImagesGetMap (&IDmap, input, output);
-  } else {
-    dvomergeImagesUpdate (&IDmap, input, output);
-    if (IMAGES_ONLY) exit (0);
+  if (!SKIP_IMAGES) {
+    if (CONTINUE) {
+      // need to determine the mapping from the input to the output images
+      dvomergeImagesGetMap (&IDmap, input, output);
+    } else {
+      dvomergeImagesUpdate (&IDmap, input, output);
+      if (IMAGES_ONLY) exit (0);
+    }
   }
 
