Index: branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c	(revision 37696)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c	(revision 37697)
@@ -28,5 +28,14 @@
 static off_t        *imageIDs; // list of all image IDs
 static off_t        *imageIdx; // list of index for image IDs 
-# else
+
+// as an alternative, we generate imageSeq, which directly maps imageID -> seq
+static off_t        *imageSeq; // list of index for image IDs 
+
+// MAX_ID requires 512M to store the image index
+# define MAX_ID      0x8000000
+static off_t         minImageID = MAX_ID;
+static off_t         maxImageID = 0;
+
+# else /* not using IMAGE_ID */
 static unsigned int *start;
 static unsigned int *stop;
@@ -84,6 +93,21 @@
     imageIdx[i] = i;
     imageIDs[i] = image[i].imageID;
+    minImageID = MIN(minImageID, image[i].imageID);
+    maxImageID = MAX(maxImageID, image[i].imageID);
+    myAssert (image[i].imageID < MAX_ID, "image IDs too large for index memory");
   }
   llsortpair (imageIDs, imageIdx, Nimage);
+
+  ALLOCATE (imageSeq, off_t, maxImageID + 1);
+  for (i = 0; i < maxImageID + 1; i++)  {
+    imageSeq[i] = -1; // not yet assigned
+  }
+
+  for (i = 0; i < Nimage; i++) {
+    off_t N = image[i].imageID;
+    myAssert (imageSeq[N] == -1, "previously assigned");
+    imageSeq[N] = i;
+  }
+
 # else
   ALLOCATE (start, unsigned, Nimage);
@@ -98,9 +122,16 @@
 
 off_t getImageByID (off_t ID) {
+# if USE_IMAGE_ID
+
+  if (imageSeq) {
+    myAssert (ID >= minImageID, "oops");
+    myAssert (ID <= maxImageID, "oops");
+    off_t N = imageSeq[ID];
+    return N;
+  }
 
   // we have a pair of vectors (imageIDs, imageIdx) sorted by imageIDs
   // use bisection to find the specified image ID
 
-# if USE_IMAGE_ID
   off_t Nlo, Nhi, N;
 
Index: branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateMeasures.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateMeasures.c	(revision 37696)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateMeasures.c	(revision 37697)
@@ -3,4 +3,41 @@
 // this function operates on Measure, not MeasureTiny
 int UpdateMeasures (Catalog *catalog, int Ncatalog) {
+
+  off_t i, Nimage;
+  Image *image;
+
+  int badImage = 
+    ID_IMAGE_ASTROM_NOCAL | 
+    ID_IMAGE_ASTROM_POOR | 
+    ID_IMAGE_ASTROM_FAIL | 
+    ID_IMAGE_ASTROM_SKIP | 
+    ID_IMAGE_ASTROM_FEW;
+
+  if (RESET_BAD_IMAGES) badImage = 0;
+
+  image = getimages (&Nimage, NULL);
+
+  for (i = 0; i < Ncatalog; i++) {
+    for (j = 0; j < catalog[i].Nmeasure; j++) {
+      MeasureTiny *measureT = &catalog[i].measureT[j];
+      Measure     *measure  =  catalog[i].measure ? &catalog[i].measure[j] : NULL;
+
+      off_t im = getImageByID (measureT->imageID);
+
+      // check that we have the 
+
+    // skip images that have failed solutions (divergent or otherwise)
+    // XXX apply this or not??
+    if (FALSE && (image[i].flags & badImage)) continue;
+
+  }
+
+  // printNcatTotal ();
+
+  return (TRUE);
+}
+
+// this function operates on Measure, not MeasureTiny
+int UpdateMeasuresOld (Catalog *catalog, int Ncatalog) {
 
   off_t i, Nimage;
Index: branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_client.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_client.c	(revision 37696)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_client.c	(revision 37697)
@@ -79,4 +79,6 @@
       load_images (&db, skylist, FALSE);
       
+      // I can free the database after I have loaded the images...
+
       // // load the image subset table from the specified location
       // off_t Nimage;
Index: branches/eam_branches/ipp-20140904/Ohana/src/relphot/doc/timeline.txt
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/relphot/doc/timeline.txt	(revision 37697)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relphot/doc/timeline.txt	(revision 37697)
@@ -0,0 +1,36 @@
+
+timeline for processing on PV2 (31 remote hosts):
+
+load images, ready to launch hosts : 160s
+remote hosts begin:
+ * set up mosaic indexes: 388s - 1330s (from client launch time)
+ * loop 0 done: 1086s - 15870s (~ synchronous, thus clients took ~15ksec to load)
+ * loop 7 done: 4443s - 19251s (~ 3400sec total after load is done)
+ * finalized Mcal : 4444s - 19315s
+ * remote hosts done (5.4hr)
+
+remote client update Mcal average times:
+ * load catalog : 5963s (longest one is 11569s)
+ * make tiny : 113s
+ * find images: 576s
+ * set Mrel : 4793s
+ * save catalog: 2531s
+
+elapsed time for update Mcal: 51318s (14.3h)
+
+--> consistent with 3x longest single client times
+
+end of relphot: 70633s (19.6h)
+
+
+relastro timeline:
+on remote hosts:
+  * load catalog data: 247s - 4444s (loading more detections than relphot), 
+    * wall time of the load is NOT sum(load time), because clients are launched before slurp is started
+  * update chips: 23981s for last one 
+  ** end of load + analysis ~ 7hr
+  * analysis takes ~1-2hr
+
+update time ~ 9hr (compare with ~3-4h for relphot) 
+
+*** the I/O is NOT dominant. 
Index: branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageOps.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageOps.c	(revision 37696)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageOps.c	(revision 37697)
@@ -35,4 +35,12 @@
 static off_t        *imageIdx; // list of index for image IDs 
 
+// QQ // as an alternative, we generate imageSeq, which directly maps imageID -> seq
+// QQ static off_t        *imageSeq; // list of index for image IDs 
+// QQ 
+// QQ // MAX_ID requires 512M to store the image index
+// QQ # define MAX_ID 0x8000000
+// QQ static off_t         minImageID = MAX_ID;
+// QQ static off_t         maxImageID = 0;
+
 // elsewhere, we have loaded a set of catalogs with measures (catalog[cat].measure[meas])
 // each image has N_onImage[ImageIndex] measurements
@@ -95,4 +103,8 @@
 
     TessellationIDsByImageName (&tessID[i], &projectID[i], &skycellID[i], image[i].name);
+
+    // QQ minImageID = MIN(minImageID, image[i].imageID);
+    // QQ maxImageID = MAX(maxImageID, image[i].imageID);
+    // QQ myAssert (image[i].imageID < MAX_ID, "image IDs too large for index memory");
   }
 
@@ -100,4 +112,15 @@
   // XXX does this break the imageID <-> projectID, etc match?
   llsortpair (imageIDs, imageIdx, Nimage);
+
+  // QQ ALLOCATE (imageSeq, off_t, maxImageID + 1);
+  // QQ for (i = 0; i < maxImageID + 1; i++)  {
+  // QQ   imageSeq[i] = -1; // not yet assigned
+  // QQ }
+  // QQ 
+  // QQ for (i = 0; i < Nimage; i++) {
+  // QQ   off_t N = image[i].imageID;
+  // QQ   myAssert (imageSeq[N] == -1, "previously assigned");
+  // QQ   imageSeq[N] = i;
+  // QQ }
 }
 
@@ -167,4 +190,11 @@
 
 off_t getImageByID (off_t ID) {
+
+  // QQ  if (imageSeq) {
+  // QQ    myAssert (ID >= minImageID, "oops");
+  // QQ    myAssert (ID <= maxImageID, "oops");
+  // QQ    off_t N = imageSeq[ID];
+  // QQ    return N;
+  // QQ  }
 
   // we have a pair of vectors (imageIDs, imageIdx) sorted by imageIDs
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 37696)
+++ branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 37697)
@@ -55,4 +55,5 @@
   /* launch processing on the parallel region hosts */
   if (!launch_region_hosts (regionHosts)) Shutdown ("error launching region hosts");
+  MARKTIME ("finished relphot -parallel-regions: %f sec total\n", dtime);
 
   // retrieve updated image parameters from the remote hosts (also set Image.mcal)
