Index: /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/include/dvomerge.h
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/include/dvomerge.h	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/include/dvomerge.h	(revision 37512)
@@ -42,4 +42,6 @@
 int    FORCE_MERGE;
 
+int    MATCHED_TABLES;
+
 char *SINGLE_CPT;
 SkyRegion UserPatch;  // used by MODE CAT
Index: /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/args.c	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/args.c	(revision 37512)
@@ -34,4 +34,11 @@
   if ((N = get_argument (*argc, argv, "-images-only"))) {
     IMAGES_ONLY = TRUE;
+    remove_argument (N, argc, argv);
+  }
+
+  /* extra error messages */
+  MATCHED_TABLES = FALSE;
+  if ((N = get_argument (*argc, argv, "-matched-tables"))) {
+    MATCHED_TABLES = TRUE;
     remove_argument (N, argc, argv);
   }
Index: /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c	(revision 37512)
@@ -58,5 +58,5 @@
     }
 
-# if 0
+# ifdef OLD_CODE
     // NOTE: i was having trouble dropping objects on edges with the option below.  Since an object can move outside the catalog grab the neighbors.
     // SkyListByBounds will return neighbor catalogs if the boundaries exactly match (due to rounding).  Since the regions are not infinitely small, 
@@ -64,9 +64,14 @@
     float dPos = 2.0/3600.0;
     outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos);
-# else
-    // Since an object can move outside the catalog grab the neighbors.
-    float dPos = 2.0/3600.0;
-    outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin - dPos, inlist[0].regions[i][0].Rmax + dPos, inlist[0].regions[i][0].Dmin - dPos, inlist[0].regions[i][0].Dmax + dPos);
 # endif
+
+    if (MATCHED_TABLES) {
+      // if we know the output will have the same depth / layout as the input, just choose the matched table
+      outlist = SkyRegionByIndex (outsky, inlist[0].regions[i][0].index);
+    } else {
+      // Since an object can move outside the catalog grab the neighbors.
+      float dPos = 2.0/3600.0;
+      outlist = SkyListByBounds (outsky, -1, inlist[0].regions[i][0].Rmin - dPos, inlist[0].regions[i][0].Rmax + dPos, inlist[0].regions[i][0].Dmin - dPos, inlist[0].regions[i][0].Dmax + dPos);
+    }
 
     OutputStatus *outstat = OutputStatusInit (outlist->Nregions);
Index: /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/merge_catalogs_old.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 37512)
@@ -322,5 +322,8 @@
 
     if (input[0].found_t[N] >= 0) continue;
-    if (!IN_REGION (input[0].average[N].R, input[0].average[N].D)) continue;
+
+    // if we are using MATCHED_TABLES, we are going to leave the edge cases in their
+    // source catalog, even if they have leaked beyond the edge
+    if (!MATCHED_TABLES && !IN_REGION (input[0].average[N].R, input[0].average[N].D)) continue;
 
     // XXX should we accept the input measurements for these fields?
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h	(revision 37512)
@@ -933,4 +933,5 @@
 SkyTable  *SkyTableLoadOptimal 	   PROTO((char *catdir, char *SKYFILE, char *GSCFILE, int readwrite, int depth, int VERBOSE));
 int        SkyTableSetDepth    	   PROTO((SkyTable *sky, int depth));
+SkyList   *SkyRegionByIndex        PROTO((SkyTable *table, int index));
 SkyList   *SkyRegionByCPT          PROTO((SkyTable *table, char *filename));
 SkyList   *SkyRegionByPoint    	   PROTO((SkyTable *table, int depth, double ra, double dec));
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/skyregion_ops.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/skyregion_ops.c	(revision 37511)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/skyregion_ops.c	(revision 37512)
@@ -16,4 +16,22 @@
   if (c) return (c+1);
   return name;
+}
+
+/* find region which corresponds to the given index */
+SkyList *SkyRegionByIndex (SkyTable *table, int index) {
+  
+  SkyList *list;
+
+  ALLOCATE (list, SkyList, 1);
+  ALLOCATE (list[0].regions,  SkyRegion *, 1);
+  ALLOCATE (list[0].filename,  char *, 1);
+  list[0].Nregions = 0;
+  list[0].ownElements = FALSE; // this list is only holding a view to the elements
+  strcpy (list[0].hosts, table[0].hosts);
+
+  list[0].regions[0] = &table[0].regions[index];
+  list[0].filename[0] = table[0].filename[index];
+  list[0].Nregions = 1;
+  return (list);
 }
 
