Index: branches/eam_branches/ipp-20140904/Ohana/src/photdbc/include/photdbc.h
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/photdbc/include/photdbc.h	(revision 37744)
+++ branches/eam_branches/ipp-20140904/Ohana/src/photdbc/include/photdbc.h	(revision 37745)
@@ -31,7 +31,9 @@
 int    PARALLEL_MANUAL;
 int    PARALLEL_SERIAL;
+char  *PARALLEL_OUTHOSTS;
 
 int          HOST_ID;
 char        *HOSTDIR;
+char        *HOSTDIR_OUTPUT;
 
 // need to get RADIUS from Config 
Index: branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/args.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/args.c	(revision 37744)
+++ branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/args.c	(revision 37745)
@@ -146,4 +146,14 @@
   }
 
+  // XXX for the moment, make this selection manual.  it needs to be automatic 
+  // based on the state of the SkyTable
+  HOSTDIR_OUTPUT = NULL;
+  PARALLEL_OUTHOSTS = NULL;
+  if ((N = get_argument (argc, argv, "-parallel-output"))) {
+    remove_argument (N, &argc, argv);
+    PARALLEL_OUTHOSTS = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
   if (argc != 2) usage();
 
@@ -186,4 +196,11 @@
   if (!HOSTDIR) usage();
 
+  HOSTDIR_OUTPUT = NULL;
+  if ((N = get_argument (argc, argv, "-hostdir-output"))) {
+    remove_argument (N, &argc, argv);
+    HOSTDIR_OUTPUT = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
   VERBOSE = FALSE;
   if ((N = get_argument (argc, argv, "-v"))) {
@@ -304,4 +321,10 @@
   fprintf (stderr, " photdbc (output)\n\n");
 
+  fprintf (stderr, " parallel options:\n");
+  fprintf (stderr, "  -parallel:\n");
+  fprintf (stderr, "  -parallel-output HostTable : HostTable should be relative path in OUTPUT directory\n");
+  fprintf (stderr, "  -parallel-manual\n");
+  fprintf (stderr, "  -parallel-serial\n\n");
+
   fprintf (stderr, " allowed filters / restrictions include:\n\n");
 
Index: branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/copy_images.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/copy_images.c	(revision 37744)
+++ branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/copy_images.c	(revision 37745)
@@ -55,5 +55,30 @@
   // MARKTIME("build chip match: %f sec\n", dtime);
 
+  char mapfile[DVO_MAX_PATH];
+  snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
+  AstromOffsetTable *table_src = AstromOffsetMapLoad (mapfile, VERBOSE);
+
+  // assign images.coords.offsetMap -> table->map[i]
+  if (table_src) {
+    AstromOffsetTableMatchChips (image, Nimage, table_src);
+  }
+
   subset = select_images (skylist, image, Nimage, &LineNumber, &Nsubset, FALSE);
+
+  if (table_src) {
+    AstromOffsetTable *table_tgt = AstromOffsetTableInit ();
+    
+    off_t i;
+    for (i = 0; i < Nsubset; i++) {
+      if (!subset[i].coords.offsetMap) continue;
+      if (subset[i].coords.Npolyterms != -1) continue; // assert on this?
+      AstromOffsetTableAddMapFromImage (table_tgt, &subset[i]);
+    }
+    snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", outdir);
+    AstromOffsetMapSave (table_tgt, mapfile);
+    free (table_tgt->imageIDtoTableSeq);
+    free (table_tgt->map);
+    free (table_tgt);
+  }
 
   dvo_image_addrows (&out, subset, Nsubset);
@@ -76,4 +101,7 @@
   SavePhotcodesFITS (filename);
 
+  // free the astrom offset tables
+  AstromOffsetTableFree (table_src);
+
   return (TRUE);
 }
Index: branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/photdbc_catalogs.c
===================================================================
--- branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/photdbc_catalogs.c	(revision 37744)
+++ branches/eam_branches/ipp-20140904/Ohana/src/photdbc/src/photdbc_catalogs.c	(revision 37745)
@@ -42,4 +42,10 @@
     snprintf (outfile, DVO_MAX_PATH, "%s/%s.cpt", outroot, skylist[0].regions[i]->name);
     outcatalog.filename = outfile;
+
+    if (HOSTDIR_OUTPUT) {
+      // parallel-ouput puts the output in a per-host directory (keeps the source sky partition)
+      snprintf (outfile, DVO_MAX_PATH, "%s/%s.cpt", HOSTDIR_OUTPUT, skylist[0].regions[i]->name);
+    }
+
     if (outcatalog.filename == NULL) Shutdown ("error with input catalog name");
 
@@ -95,4 +101,12 @@
   }    
 
+  HostTable *table_output = NULL;
+  if (PARALLEL_OUTHOSTS) {
+    table_output = HostTableLoad (outroot, PARALLEL_OUTHOSTS);
+    if (!table_output) {
+      fprintf (stderr, "%s not found in %s, please create\n", PARALLEL_OUTHOSTS, outroot);
+    }
+  }
+
   int i;
   for (i = 0; i < table->Nhosts; i++) {
@@ -123,4 +137,11 @@
     if (CATFORMAT)          { snprintf (tmpline, DVO_MAX_PATH, "%s -set-format %s",    command, CATFORMAT); 	                strcpy (command, tmpline); }
     if (CATMODE)            { snprintf (tmpline, DVO_MAX_PATH, "%s -set-mode %s",      command, CATMODE);        	        strcpy (command, tmpline); }
+
+    if (PARALLEL_OUTHOSTS) {
+      tmppath = abspath (table_output->hosts[i].pathname, DVO_MAX_PATH);
+      free  (table_output->hosts[i].pathname);
+      table_output->hosts[i].pathname = tmppath;
+      snprintf (tmpline, DVO_MAX_PATH, "%s -hostdir-output %s", command, table_output->hosts[i].pathname); strcpy (command, tmpline); 
+    }
 
     fprintf (stderr, "command: %s\n", command);
