Index: /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c	(revision 33615)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c	(revision 33616)
@@ -25,5 +25,5 @@
   selection = NULL;
 
-  fprintf (stderr, "start...");
+  // fprintf (stderr, "start...");
   if ((N = get_argument (argc, argv, "-h"))) goto help;
   if ((N = get_argument (argc, argv, "--help"))) goto help;
@@ -39,4 +39,13 @@
     remove_argument (N, &argc, argv);
     PARALLEL = TRUE;
+  }
+
+  // this is used to NOT save the results in the results file
+  // use this option when mextract is used in a script which does its
+  // own job of packaging the results
+  int SKIP_RESULTS = FALSE;
+  if ((N = get_argument (argc, argv, "-skip-results"))) {
+    remove_argument (N, &argc, argv);
+    SKIP_RESULTS = TRUE;
   }
 
@@ -146,5 +155,5 @@
   interrupt = FALSE;
 
-  fprintf (stderr, "done setup...");
+  // fprintf (stderr, "done setup...");
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
@@ -171,5 +180,5 @@
     /* XXX need to call dvo_catalog_chipcoords here passing the loaded images */
 
-    fprintf (stderr, "done read...");
+    // fprintf (stderr, "done read...");
 
     for (j = 0; (j < catalog.Naverage) && !interrupt; j++) {
@@ -223,5 +232,5 @@
   interrupt = FALSE;
 
-  fprintf (stderr, "done load...");
+  // fprintf (stderr, "done load...");
 
   for (n = 0; n < Nreturn; n++) {
@@ -230,5 +239,5 @@
 
   // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
-  if (RESULT_FILE) {
+  if (RESULT_FILE && !SKIP_RESULTS) {
     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, NULL);
     if (!status) goto escape;
@@ -244,5 +253,5 @@
   FreeSkyRegionSelection (selection);
 
-  fprintf (stderr, "done extr...\n");
+  // fprintf (stderr, "done extr...\n");
   return (TRUE);
 
Index: /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/region_list.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/region_list.c	(revision 33615)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/region_list.c	(revision 33616)
@@ -183,17 +183,5 @@
   /* determine region-file names */
   if (selection->name != NULL) {
-    char filename[256];
-    char *CATDIR = dvo_get_catdir();
-
-    ALLOCATE (skylist, SkyList, 1);
-    ALLOCATE (skylist[0].regions, SkyRegion *, 1);
-    ALLOCATE (skylist[0].regions[0], SkyRegion, 1);
-    ALLOCATE (skylist[0].filename, char *, 1);
-    skylist[0].ownElements = TRUE; // free these elements when freeing the list
-    
-    strcpy (skylist[0].regions[0][0].name, selection->name);
-    sprintf (filename, "%s/%s.cpt", CATDIR, selection->name);
-    skylist[0].filename[0] = strcreate (filename);
-    skylist[0].Nregions = 1;
+    skylist = SkyListByName (sky, selection->name);
     return (skylist);
   } 
