Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c	(revision 33503)
@@ -635,5 +635,4 @@
     if (catalogs->Ncatalog >= catalogs->NCATALOG) {
       catalogs->NCATALOG += D_NCATALOG;
-      D_NCATALOG = MAX(2000, 2*D_NCATALOG);
 
       // fprintf (stderr, "realloc catalogs->catalog: old: %llx  ", (long long) catalogs->catalog);
@@ -652,5 +651,5 @@
 
       int j;
-      for (j = catalogs->NCATALOG - 16; j < catalogs->NCATALOG; j++) {
+      for (j = catalogs->NCATALOG - D_NCATALOG; j < catalogs->NCATALOG; j++) {
 	dvo_catalog_init (&catalogs->catalog[j], TRUE);
 	catalogs->catIDs[j] = 0;
@@ -663,4 +662,5 @@
 	ALLOCATE (catalogs->catalog[j].secfilt,  SecFilt,     catalogs->NAVERAGE[j]*Nsecfilt);
       }
+      D_NCATALOG = MAX(2000, 2*D_NCATALOG);
     }
   }
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ImageOps.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ImageOps.c	(revision 33503)
@@ -154,5 +154,5 @@
     for (i = 0; i < Nimage; i++) {
       N_onImage[i] = 0;
-      N_ONIMAGE[i] = 100;
+      N_ONIMAGE[i] = 30;
       ALLOCATE (ImageToCatalog[i], off_t, N_ONIMAGE[i]);
       ALLOCATE (ImageToMeasure[i], off_t, N_ONIMAGE[i]);
@@ -288,5 +288,5 @@
 
     if (N_onImage[idx] == N_ONIMAGE[idx]) {
-      N_ONIMAGE[idx] += 100;
+      N_ONIMAGE[idx] += 30;
       REALLOCATE (ImageToCatalog[idx], off_t, N_ONIMAGE[idx]);
       REALLOCATE (ImageToMeasure[idx], off_t, N_ONIMAGE[idx]);
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/MosaicOps.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/MosaicOps.c	(revision 33503)
@@ -527,5 +527,7 @@
   {
     Image *image = getimage(idx);
-    unsigned int imageStart = image[0].tzero - MAX(0.01*image[0].trate*image[0].NY, 1);
+    // XXX we are now matching with just tzero.  be careful for cameras with drift
+    // unsigned int imageStart = image[0].tzero - MAX(0.01*image[0].trate*image[0].NY, 1);
+    unsigned int imageStart = image[0].tzero;
     if (imageStart != mosaic[mosID].start) {
       fprintf (stderr, "error in image to mosaic match\n");
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c	(revision 33503)
@@ -349,7 +349,7 @@
     remove_argument (N, &argc, argv);
   }
-  if ((N = get_argument (argc, argv, "-update"))) {
+  if ((N = get_argument (argc, argv, "-update-catalogs"))) {
     if (MODE) {
-      fprintf (stderr, "ERROR: cannot use both -load and -update options!\n");
+      fprintf (stderr, "ERROR: cannot mix modes (-load, -update-catalogs, -update-objects)\n");
       relphot_client_usage();
     }
@@ -361,5 +361,5 @@
   if ((N = get_argument (argc, argv, "-update-objects"))) {
     if (MODE) {
-      fprintf (stderr, "ERROR: cannot mix modes (-load, -update, -update-objects)\n");
+      fprintf (stderr, "ERROR: cannot mix modes (-load, -update-catalogs, -update-objects)\n");
       relphot_client_usage();
     }
@@ -451,4 +451,10 @@
   }  
 
+  UPDATE = FALSE;
+  if ((N = get_argument (argc, argv, "-update"))) {
+    remove_argument (N, &argc, argv);
+    UPDATE = TRUE;
+  }
+
   UPDATE_CATFORMAT = NULL;
   if ((N = get_argument (argc, argv, "-update-catformat"))) {
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c	(revision 33503)
@@ -143,8 +143,8 @@
 
     char command[1024];
-    snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f", 
+    snprintf (command, 1024, "relphot_client %s -update-catalogs %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f", 
 	      PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, CAMERA, STAR_TOOFEW, MIN_ERROR);
 
-    // options & configs which affect relphot_client -update 
+    // options & configs which affect relphot_client -update-catalogs
     // VERBOSE, VERBOSE2
     // RESET
@@ -159,4 +159,5 @@
     if (VERBOSE2)         { snprintf (tmpline, 1024, "%s -vv",          	command); 		     			  strcpy (command, tmpline); }
     if (RESET)            { snprintf (tmpline, 1024, "%s -reset",       	command); 		     			  strcpy (command, tmpline); }
+    if (UPDATE)           { snprintf (tmpline, 1024, "%s -update",       	command); 		     			  strcpy (command, tmpline); }
     if (!KEEP_UBERCAL)    { snprintf (tmpline, 1024, "%s -reset-ubercal",	command); 		                          strcpy (command, tmpline); }
     if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT); 		          strcpy (command, tmpline); }
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c	(revision 33502)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c	(revision 33503)
@@ -150,4 +150,5 @@
     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command); 		     strcpy (command, tmpline); }
     if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command); 		     strcpy (command, tmpline); }
+    if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command); 		     strcpy (command, tmpline); }
     if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command); 		     strcpy (command, tmpline); }
 
