Index: /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/imlist.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/imlist.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/imlist.c	(revision 37593)
@@ -38,10 +38,4 @@
   }
 
-  // int RegionSelect = FALSE;
-  // if ((N = get_argument (argc, argv, "-region"))) {
-  //   remove_argument (N, &argc, argv);
-  //   RegionSelect = TRUE;
-  // }
-
   PhotcodeValue = NULL;
   PhotcodeSelect = FALSE;
@@ -76,6 +70,13 @@
   }
 
+  int MAX_LIST = -1;
+  if ((N = get_argument (argc, argv, "-max-list"))) {
+    remove_argument (N, &argc, argv);
+    MAX_LIST = atoi (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
   if (argc != 1) {
-    gprint (GP_ERR, "USAGE: image [-time start range] [-region] [-name string]\n");
+    gprint (GP_ERR, "USAGE: image [-time start range] [-region] [-name string] [-photcode code] [-Nphotcode N] [-max-list N]\n");
     return (FALSE);
   }
@@ -83,9 +84,9 @@
   if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE);
   image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect);
-  // BuildChipMatch (image, Nimage);
+  MAX_LIST = MAX_LIST < 0 ? Nsubset : MIN(MAX_LIST, Nsubset);
 
   GetTimeFormat (&TimeReference, &TimeFormat);
 
-  for (j = 0; j < Nsubset; j++) {
+  for (j = 0; j < MAX_LIST; j++) {
     i = subset[j];
     if (NameSelect && (strstr (image[i].name, name) == (char *) NULL)) continue;
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageTable.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageTable.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageTable.c	(revision 37593)
@@ -32,4 +32,7 @@
   }
 
+  // XXX do not make the chip match -- we have not loaded the PHU entries
+  // BuildChipMatch (image, Nimage);
+
   *nimage = Nimage;
   return image;
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/MosaicOps.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/MosaicOps.c	(revision 37593)
@@ -620,20 +620,41 @@
       NY = image[m].NY;
       dS += hypot (image[m].coords.cdelt1*image[m].coords.pc1_1, image[m].coords.cdelt1*image[m].coords.pc2_1);
-      XY_to_RD (&R, &D, 0.0, 0.0, &image[m].coords);
+
+      OhanaProjection proj = GetProjection (image[m].coords.ctype);
+      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
+	XY_to_LM (&R, &D, 0.0, 0.0, &image[m].coords);
+      } else {
+	XY_to_RD (&R, &D, 0.0, 0.0, &image[m].coords);
+      }
       Rmin = MIN (Rmin, R);
       Rmax = MAX (Rmax, R);
       Dmin = MIN (Dmin, D);
       Dmax = MAX (Dmax, D);
-      XY_to_RD (&R, &D, (double) NX, 0.0, &image[m].coords);
+
+      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
+	XY_to_LM (&R, &D, (double) NX, 0.0, &image[m].coords);
+      } else {
+	XY_to_RD (&R, &D, (double) NX, 0.0, &image[m].coords);
+      }
       Rmin = MIN (Rmin, R);
       Rmax = MAX (Rmax, R);
       Dmin = MIN (Dmin, D);
       Dmax = MAX (Dmax, D);
-      XY_to_RD (&R, &D, (double) NX, (double) NY, &image[m].coords);
+
+      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
+	XY_to_LM (&R, &D, (double) NX, (double) NY, &image[m].coords);
+      } else {
+	XY_to_RD (&R, &D, (double) NX, (double) NY, &image[m].coords);
+      }
       Rmin = MIN (Rmin, R);
       Rmax = MAX (Rmax, R);
       Dmin = MIN (Dmin, D);
       Dmax = MAX (Dmax, D);
-      XY_to_RD (&R, &D, 0.0, (double) NY, &image[m].coords);
+
+      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
+	XY_to_LM (&R, &D, 0.0, (double) NY, &image[m].coords);
+      } else {
+	XY_to_RD (&R, &D, 0.0, (double) NY, &image[m].coords);
+      }
       Rmin = MIN (Rmin, R);
       Rmax = MAX (Rmax, R);
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/assign_images.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/assign_images.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/assign_images.c	(revision 37593)
@@ -117,11 +117,13 @@
 
     if (MOSAIC_ZEROPT) {
-      // use the coords of the associated mosaic to select
+      // use the coords of the associated mosaic to select (only for chips; stacks use their own center)
       Mosaic *mosaic = getMosaicForImage (j); 
-      Rc = mosaic->coords.crval1;
-      Dc = mosaic->coords.crval2;
-      // NOTE : have defined mosaic Rc,Dc to choose the side of 0,360 on which most of the
-      // chips are located.  but, for host assignment, we rationalize to 0.0 - 360.0
-      Rc = ohana_normalize_angle_to_midpoint (Rc, 180.0);
+      if (mosaic) {
+	Rc = mosaic->coords.crval1;
+	Dc = mosaic->coords.crval2;
+	// NOTE : have defined mosaic Rc,Dc to choose the side of 0,360 on which most of the
+	// chips are located.  but, for host assignment, we rationalize to 0.0 - 360.0
+	Rc = ohana_normalize_angle_to_midpoint (Rc, 180.0);
+      }
     }
 
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/reload_catalogs.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/reload_catalogs.c	(revision 37593)
@@ -165,5 +165,4 @@
     free (BOUNDARY_TREE);
     BOUNDARY_TREE = tmppath;
-    
   }
 
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_objects.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_objects.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_objects.c	(revision 37593)
@@ -36,5 +36,4 @@
     if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
-    // set up the basic catalog info
     // set up the basic catalog info
     char hostfile[1024];
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_parallel_regions.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 37592)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 37593)
@@ -42,4 +42,10 @@
   if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename);
   MARKTIME("-- load image data: %f sec\n", dtime);
+
+  // save Images.dat using the copied structure
+  if (UPDATE_CATFORMAT) {
+    // ensure the db format is updated
+    db.format = dvo_catalog_catformat (UPDATE_CATFORMAT);
+  }
 
   /* assign the images to the different region hosts */
