Index: trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdata.c	(revision 12332)
+++ trunk/Ohana/src/opihi/dvo/imdata.c	(revision 14401)
@@ -14,4 +14,11 @@
   SkyList *skylist, *skyset;
   Vector *vec;
+  SkyRegionSelection *selection;
+
+  // parse skyregion options
+  if ((selection = SetRegionSelection (&argc, argv)) == NULL) {
+    gprint (GP_ERR, "invalid sky region selection\n");
+    return FALSE;
+  }
 
   start = stop = 0;
@@ -78,5 +85,5 @@
 
   if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);
-  image_subset (image, Nimage, &subset, &Nsubset, (Graphdata *) NULL, FALSE, tzero, trange, TimeSelect);
+  image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect);
   BuildChipMatch (image, Nimage);
   GetTimeFormat (&TimeReference, &TimeFormat);
@@ -89,4 +96,5 @@
   ALLOCATE (skylist, SkyList, 1);
   ALLOCATE (skylist[0].regions, SkyRegion *, NREGIONS);
+  skylist[0].ownElements = FALSE;
 
   /* for each image of interest, find the appropriate region files */
@@ -107,5 +115,5 @@
       CHECK_REALLOCATE (skylist[0].regions, SkyRegion *, NREGIONS, Nregions, 10);
     }
-    SkyListFree (skyset, FALSE);
+    SkyListFree (skyset);
   }	
   free (subset);
