Index: /branches/eam_branches/ipp-20140423/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c	(revision 36809)
@@ -292,5 +292,5 @@
   PrintIOBuffer (ave_buffer, "%d, ",  average->measureOffset);  
   PrintIOBuffer (ave_buffer, "%d, ",  average->missingOffset);  
-  PrintIOBuffer (ave_buffer, "%d, ",  average->extendOffset);   
+  PrintIOBuffer (ave_buffer, "%d, ",  0); // was : average->extendOffset);   
   PrintIOBuffer (ave_buffer, "%u, ",  average->flags);          
   PrintIOBuffer (ave_buffer, "%u, ",  average->photFlagsUpper); 
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/Makefile
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/Makefile	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/Makefile	(revision 36809)
@@ -127,4 +127,5 @@
 $(SRC)/plotstuff.$(ARCH).o	     \
 $(SRC)/relastroVisual.$(ARCH).o \
+$(SRC)/syncfile.$(ARCH).o \
 $(SRC)/BrightCatalog.$(ARCH).o 
 
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h	(revision 36809)
@@ -315,5 +315,5 @@
 int           liststats           PROTO((double *value, double *dvalue, int N, StatType *stats));
 int           liststats_pos       PROTO((double *value, double *dvalue, int N, StatType *stats, int XVERB));
-Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath));
+Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile));
 int           load_images         PROTO((FITS_DB *db, SkyList *skylist, int UseFullOverlap));
 Image        *select_images       PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage, int UseFullOverlap));
@@ -533,2 +533,4 @@
 
 float getColor (off_t meas, int cat);
+
+int strextend (char *input, char *format,...);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/BrightCatalog.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/BrightCatalog.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/BrightCatalog.c	(revision 36809)
@@ -476,5 +476,5 @@
     gfits_define_bintable_column (&theader, "J", "OFF_MEASURE", "offset to first psf measurement", 	 	          "", 1.0, 1.0*0x8000);
     gfits_define_bintable_column (&theader, "J", "OFF_MISSING", "offset to first missing obs", 	         	          "", 1.0, 1.0*0x8000);
-    gfits_define_bintable_column (&theader, "J", "OFF_EXTEND",  "offset to first extended measurement", 	          "", 1.0, 1.0*0x8000);
+    gfits_define_bintable_column (&theader, "E", "REF_COLOR",   "reference color", 	                                  "", 1.0, 0.0);
     gfits_define_bintable_column (&theader, "J", "FLAGS",       "average object flags (star; ghost; etc)", 	          "", 1.0, 1.0*0x8000);
     gfits_define_bintable_column (&theader, "J", "PHOTFLAGS_U", "upper bit of 2 bit summary of per-measure photflags", 	  "", 1.0, 1.0*0x8000);
@@ -575,5 +575,5 @@
     gfits_set_bintable_column (&theader, &ftable, "OFF_MEASURE", measureOffset,   catalog->Naverage);
     gfits_set_bintable_column (&theader, &ftable, "OFF_MISSING", missingOffset,   catalog->Naverage);
-    gfits_set_bintable_column (&theader, &ftable, "REF_COLOR",  refColor,    catalog->Naverage);
+    gfits_set_bintable_column (&theader, &ftable, "REF_COLOR",   refColor,        catalog->Naverage);
     gfits_set_bintable_column (&theader, &ftable, "FLAGS",       flags,           catalog->Naverage);
     gfits_set_bintable_column (&theader, &ftable, "PHOTFLAGS_U", photFlagsUpper,  catalog->Naverage);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c	(revision 36809)
@@ -477,10 +477,15 @@
     }
 
+    X = measure[0].Xccd;
+    Y = measure[0].Yccd;
     if (USE_FIXED_PIXCOORDS) {
-      X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd;
-      Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd;
-    } else {
-      X = measure[0].Xccd;
-      Y = measure[0].Yccd;
+      if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) {
+	float dX = measure[0].Xfix - measure[0].Xccd;
+	float dY = measure[0].Yfix - measure[0].Yccd;
+	if (hypot(dX,dY) < 2.0) {
+	  X = measure[0].Xfix;
+	  Y = measure[0].Yfix;
+	} 
+      }
     }
     n = measure[0].averef;
@@ -618,10 +623,15 @@
     Measure *measure = &catalog[c].measure[m];
 
+    X = measure[0].Xccd;
+    Y = measure[0].Yccd;
     if (USE_FIXED_PIXCOORDS) {
-      X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd;
-      Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd;
-    } else {
-      X = measure[0].Xccd;
-      Y = measure[0].Yccd;
+      if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) {
+	float dX = measure[0].Xfix - measure[0].Xccd;
+	float dY = measure[0].Yfix - measure[0].Yccd;
+	if (hypot(dX,dY) < 2.0) {
+	  X = measure[0].Xfix;
+	  Y = measure[0].Yfix;
+	} 
+      }
     }
     n = measure[0].averef;
@@ -688,12 +698,16 @@
 
     /* apply the current image transformation or use the current value of R+dR, D+dD? */
+    raw[i].X = measure[0].Xccd;
+    raw[i].Y = measure[0].Yccd;
     if (USE_FIXED_PIXCOORDS) {
-      raw[i].X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd;
-      raw[i].Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd;
-    } else {
-      raw[i].X = measure[0].Xccd;
-      raw[i].Y = measure[0].Yccd;
-    }
-
+      if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) {
+	float dX = measure[0].Xfix - measure[0].Xccd;
+	float dY = measure[0].Yfix - measure[0].Yccd;
+	if (hypot(dX,dY) < 2.0) {
+	  raw[i].X = measure[0].Xfix;
+	  raw[i].Y = measure[0].Yfix;
+	} 
+      }
+    }
     raw[i].Mag  = measure[0].M;
     raw[i].dMag = measure[0].dM;
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjectOffsets.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 36809)
@@ -126,41 +126,44 @@
 	      table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
 
-    char tmpline[1024];
-    if (FIT_MODE == FIT_PM_ONLY)  	 { snprintf (tmpline, 1024, "%s -pm",    command);           strcpy (command, tmpline); }
-    if (FIT_MODE == FIT_PAR_ONLY) 	 { snprintf (tmpline, 1024, "%s -par",   command);           strcpy (command, tmpline); }
-    if (FIT_MODE == FIT_PM_AND_PAR)      { snprintf (tmpline, 1024, "%s -pmpar", command);           strcpy (command, tmpline); }
-
-    if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
-    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 (RESET_BAD_IMAGES) { snprintf (tmpline, 1024, "%s -reset-bad-images", command); 		     strcpy (command, tmpline); }
-
-    if (ImagSelect)    { snprintf (tmpline, 1024, "%s -instmag %f %f",  command, ImagMin, ImagMax);  strcpy (command, tmpline); }
-    if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue);   strcpy (command, tmpline); }
+    if (FIT_MODE == FIT_PM_ONLY)  	 strextend (command, "-pm");
+    if (FIT_MODE == FIT_PAR_ONLY) 	 strextend (command, "-par");
+    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (command, "-pmpar");
+
+    if (VERBOSE)       strextend (command, "-v");
+    if (VERBOSE2)      strextend (command, "-vv");
+    if (RESET)         strextend (command, "-reset");
+    if (UPDATE)        strextend (command, "-update");
+
+    if (RESET_BAD_IMAGES) strextend (command, "-reset-bad-images");
+
+    if (ImagSelect)    strextend (command, "-instmag %f %f", ImagMin, ImagMax);
+    if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue);
     
-    if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command);              strcpy (command, tmpline); }
-    if (FlagOutlier)   { snprintf (tmpline, 1024, "%s -clip %d",        command, CLIP_THRESH);       strcpy (command, tmpline); }
+    if (USE_BASIC_CHECK) strextend (command, "-basic-image-search");
+    if (FlagOutlier)     strextend (command, "-clip %d", CLIP_THRESH);
+    if (ExcludeBogus)    strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
     
-    if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command);     strcpy (command, tmpline); }
-
-    if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); }
-    if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); }
-    if (PhotFlagSelect)    { snprintf (tmpline, 1024, "%s +photflags",   command);                     strcpy (command, tmpline); }
-    if (PhotFlagBad)       { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad);     strcpy (command, tmpline); }
-    if (PhotFlagPoor)      { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor);   strcpy (command, tmpline); }
+    if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1"); 
+
+    if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
+    if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
+    if (PhotFlagSelect)     strextend (command, "+photflags"); 
+    if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad);
+    if (PhotFlagPoor)       strextend (command, "+photflagpoor %d", PhotFlagPoor);
     // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
 
-    if (MinBadQF > 0.0)    { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f",        command, MinBadQF);      strcpy (command, tmpline); }
-    if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset  %f", command, MaxMeanOffset); strcpy (command, tmpline); }
+    if (DCR_COLOR_POS && DCR_COLOR_NEG) {
+      strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 
+    }
+
+    if (MinBadQF > 0.0)        strextend (command, "-min-bad-psfqf %f", MinBadQF); 
+    if (MaxMeanOffset != 10.0) strextend (command, "-max-mean-offset  %f", MaxMeanOffset);
 
     if (TimeSelect) { 
       char *tstart = ohana_sec_to_date (TSTART);
       char *tstop  = ohana_sec_to_date (TSTOP);
-      snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop); 
+      strextend (command, "-time %s %s", tstart, tstop); 
       free (tstart);
       free (tstop);
-      strcpy (command, tmpline); 
     }
     fprintf (stderr, "command: %s\n", command);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c	(revision 36809)
@@ -318,19 +318,21 @@
   }
 
-  PHOTCODE_SKIP_LIST = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9");
+  char *SuperCOSMOS_SKIP = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9");
+
+  PHOTCODE_SKIP_LIST = NULL;
   if ((N = get_argument (argc, argv, "-photcode"))) {
     remove_argument (N, &argc, argv);
-    char *tmp1 = strcreate(argv[N]);
-
-    int Ntotal = strlen(tmp1) + strlen(PHOTCODE_SKIP_LIST) + 5;
-
-    char *tmp2 = NULL;
-    ALLOCATE (tmp2, char, Ntotal);
-    snprintf (tmp2, Ntotal, "%s,%s", PHOTCODE_SKIP_LIST, tmp1);
-
-    free (tmp1);
-    free (PHOTCODE_SKIP_LIST);
-
-    PHOTCODE_SKIP_LIST = tmp2;
+    char *RawSkip = strcreate(argv[N]);
+
+    char *GotSkip = strstr (RawSkip, SuperCOSMOS_SKIP);
+    if (!GotSkip) {
+      int Ntotal = strlen(RawSkip) + strlen(SuperCOSMOS_SKIP) + 5;
+      ALLOCATE (PHOTCODE_SKIP_LIST, char, Ntotal);
+      snprintf (PHOTCODE_SKIP_LIST, Ntotal, "%s,%s", SuperCOSMOS_SKIP, RawSkip);
+      free (RawSkip);
+      free (SuperCOSMOS_SKIP);
+    } else {
+      PHOTCODE_SKIP_LIST = RawSkip;
+    }
     remove_argument (N, &argc, argv);
   }
@@ -692,4 +694,14 @@
     remove_argument (N, &argc, argv);
     TimeSelect = TRUE;
+  }
+
+  DCR_COLOR_POS = NULL;
+  DCR_COLOR_NEG = NULL;
+  if ((N = get_argument (argc, argv, "-dcr-color"))) {
+    remove_argument (N, &argc, argv);
+    DCR_COLOR_POS = strcreate(argv[N]);
+    remove_argument (N, &argc, argv);
+    DCR_COLOR_NEG = strcreate(argv[N]);
+    remove_argument (N, &argc, argv);
   }
 
@@ -905,2 +917,15 @@
   exit (2);
 }
+
+int strextend (char *input, char *format,...) {
+
+  char tmpextra[1024], tmpline[1024];
+  va_list argp;
+
+  va_start (argp, format);
+  vsnprintf (tmpextra, 1024, format, argp);
+  snprintf (tmpline, 1024, "%s %s", input, tmpextra);
+  strcpy (input, tmpline);
+
+  return TRUE;
+}
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/bcatalog.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/bcatalog.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/bcatalog.c	(revision 36809)
@@ -10,5 +10,5 @@
 
 // test image: 2013/06/15,13:25:51, GPC1.r.XY50
-static int CHECK_TEST_IMAGE = TRUE;
+static int CHECK_TEST_IMAGE = FALSE;
 // static unsigned int Tref = 1378812312; 
 // static short Cref = 10001;
@@ -59,5 +59,5 @@
     ID_STAR_NO_ASTROM ; 
 
-  if (ExcludeBogus && (fbogus == NULL)) {
+  if (VERBOSE2 && ExcludeBogus && (fbogus == NULL)) {
     char name[1024];
     snprintf (name, 1024, "%s/bogus.%02d.dat", CATDIR, HOST_ID);
@@ -125,5 +125,5 @@
 	  if (radius > ExcludeBogusRadius) {
 	      NskipBogus ++;
-	      if (TRUE || VERBOSE2) {
+	      if (VERBOSE2) {
 		FILE *foutput = fbogus ? fbogus : stderr;
 		char *date = ohana_sec_to_date(catalog[0].measure[offset].t);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/launch_region_hosts.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/launch_region_hosts.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/launch_region_hosts.c	(revision 36809)
@@ -1,17 +1,4 @@
 # include "relastro.h"
 # define DEBUG 0
-
-int strextend (char *input, char *format,...) {
-
-  char tmpextra[1024], tmpline[1024];
-  va_list argp;
-
-  va_start (argp, format);
-  vsnprintf (tmpextra, 1024, format, argp);
-  snprintf (tmpline, 1024, "%s %s", input, tmpextra);
-  strcpy (input, tmpline);
-
-  return TRUE;
-}
 
 int launch_region_hosts (RegionHostTable *regionHosts) {
@@ -92,4 +79,10 @@
     if (MaxDensityUse) 	    strextend (command, "-max-density %f", MaxDensityValue);
     if (ImagSelect)         strextend (command, "-instmag %f %f", ImagMin, ImagMax);
+    if (ExcludeBogus)       strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
+
+    if (DCR_COLOR_POS && DCR_COLOR_NEG) {
+      strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 
+    }
+
     if (PhotFlagSelect)     strextend (command, "+photflags"); 
     if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad); 
@@ -102,5 +95,7 @@
     strextend (command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     strextend (command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);
-    strextend (command, "-D ADDSTAR_RADIUS %d", ADDSTAR_RADIUS);
+    strextend (command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);
+
+    if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
 
     if (TimeSelect) { 
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c	(revision 36809)
@@ -1,8 +1,8 @@
 # include "relastro.h"
 
-Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog);
+Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile);
 void bcatalog_show_skips ();
 
-Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath) {
+Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile) {
 
   int i, j, Nstar;
@@ -12,5 +12,5 @@
   // XXX need to decide how to determine PARALLEL mode...
   if (PARALLEL && !hostID) {
-    catalog = load_catalogs_parallel (skylist, Ncatalog);
+    catalog = load_catalogs_parallel (skylist, Ncatalog, syncfile);
     return catalog;
   }
@@ -116,5 +116,5 @@
 // CATDIR is supplied globally
 # define DEBUG 1
-Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog) {
+Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile) {
 
   char uniquer[12];
@@ -153,25 +153,26 @@
 	      table->hosts[i].results, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR, SIGMA_LIM);
 
-    char tmpline[1024];
-    if (FIT_MODE == FIT_PM_ONLY)  	 { snprintf (tmpline, 1024, "%s -pm",    command);           strcpy (command, tmpline); }
-    if (FIT_MODE == FIT_PAR_ONLY) 	 { snprintf (tmpline, 1024, "%s -par",   command);           strcpy (command, tmpline); }
-    if (FIT_MODE == FIT_PM_AND_PAR)      { snprintf (tmpline, 1024, "%s -pmpar", command);           strcpy (command, tmpline); }
-
-    if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
-    if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command); 		     strcpy (command, tmpline); }
-    if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command); 		     strcpy (command, tmpline); }
-    if (ImagSelect)    { snprintf (tmpline, 1024, "%s -instmag %f %f",  command, ImagMin, ImagMax);  strcpy (command, tmpline); }
-    if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue);   strcpy (command, tmpline); }
+    if (FIT_MODE == FIT_PM_ONLY)  	 strextend (command, "-pm");
+    if (FIT_MODE == FIT_PAR_ONLY) 	 strextend (command, "-par");
+    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (command, "-pmpar");
+
+    if (VERBOSE)       strextend (command, "-v");
+    if (VERBOSE2)      strextend (command, "-vv");
+    if (RESET)         strextend (command, "-reset");
+    if (ImagSelect)    strextend (command, "-instmag %f %f", ImagMin, ImagMax);
+    if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue);
+    if (FlagOutlier)   strextend (command, "-clip %d", CLIP_THRESH);
+    if (ExcludeBogus)  strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
     
-    if (FlagOutlier)   { snprintf (tmpline, 1024, "%s -clip %d",        command, CLIP_THRESH);       strcpy (command, tmpline); }
-    if (ExcludeBogus)  { snprintf (tmpline, 1024, "%s -exclude-bogus %f", command, ExcludeBogusRadius); strcpy (command, tmpline); }
-    
-    if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command);     strcpy (command, tmpline); }
-
-    if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); }
-    if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); }
-    if (PhotFlagSelect)    { snprintf (tmpline, 1024, "%s +photflags",   command);                     strcpy (command, tmpline); }
-    if (PhotFlagBad)       { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad);     strcpy (command, tmpline); }
-    if (PhotFlagPoor)      { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor);   strcpy (command, tmpline); }
+    if (DCR_COLOR_POS && DCR_COLOR_NEG) {
+      strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 
+    }
+
+    if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
+    if (PHOTCODE_KEEP_LIST)  strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
+    if (PHOTCODE_SKIP_LIST)  strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
+    if (PhotFlagSelect)      strextend (command, "+photflags");
+    if (PhotFlagBad)         strextend (command, "+photflagbad %d", PhotFlagBad); 
+    if (PhotFlagPoor)        strextend (command, "+photflagpoor %d", PhotFlagPoor);
     // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
 
@@ -179,8 +180,7 @@
       char *tstart = ohana_sec_to_date (TSTART);
       char *tstop  = ohana_sec_to_date (TSTOP);
-      snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop); 
+      strextend (command, "-time %s %s", tstart, tstop); 
       free (tstart);
       free (tstop);
-      strcpy (command, tmpline); 
     }
 
@@ -215,4 +215,13 @@
   }
 
+  // update syncfile here (save lots of I/O time)
+
+  // NOTE: if I let all hosts load blindly, I saturate the data clients with too many
+  // relastro_client requests.  I need to have the master mediate this.  the master
+  // will not launch the next remote job until this one says it is done
+  if (syncfile) {
+    update_sync_file (syncfile, 1);
+  }
+
   // each host generates a BrightCatalog structure, with the measure, average, etc value
   // loaded into a single set of arrays (of MeasureTiny, AverageTiny, Secfilt).  I need to
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_client.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_client.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_client.c	(revision 36809)
@@ -33,5 +33,5 @@
       // USAGE: relastro_client -load-objects
       int Ncatalog;
-      Catalog *catalog = load_catalogs (skylist, &Ncatalog, TRUE, HOST_ID, HOSTDIR);
+      Catalog *catalog = load_catalogs (skylist, &Ncatalog, TRUE, HOST_ID, HOSTDIR, NULL);
       if (!catalog) {
 	fprintf (stderr, "ERROR loading catalogs from %s\n", CATDIR);
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c	(revision 36809)
@@ -31,5 +31,5 @@
   // photcodesKeep is used here to allow measurements from the images being calibrated
   // note if -reset-to-photcode is selected, photocodesKeep is replaced with below with photcodesReset
-  catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL);
+  catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL, NULL);
   MARKTIME("load catalog data: %f sec\n", dtime);
 
Index: /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_parallel_images.c
===================================================================
--- /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_parallel_images.c	(revision 36808)
+++ /branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_parallel_images.c	(revision 36809)
@@ -45,6 +45,8 @@
 
   /* load catalog data from region files (hostID is 0 since we are not a client */
-  catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL);
+  char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync");
+  catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL, syncfile);
   MARKTIME("-- load catalog data: %f sec\n", dtime);
+  free (syncfile);
   
   if (photcodesReset) {
@@ -53,10 +55,4 @@
   }
 
-  // NOTE: if I let all hosts load blindly, I saturate the data clients with too many
-  // relastro_client requests.  I need to have the master mediate this.  the master
-  // will not launch the next remote job until this one says it is done
-  char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync");
-  update_sync_file (syncfile, 1);
-  
   // generate tables go from catID,objID -> catSeq,objSeq
   indexCatalogs (catalog, Ncatalog);
