Index: anches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot_client.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot_client.c	(revision 33255)
+++ 	(revision )
@@ -1,43 +1,0 @@
-# include "setphot.h"
-
-// XXX IF we pass in an array of Image not ImageSubset, this would be identical to update_catalog_setphot
-void update_catalog_setphot_client (Catalog *catalog, ImageSubset *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr) {
-
-  off_t i, j, found;
-
-  found = 0;    
-  for (i = 0; i < catalog[0].Naverage; i++) {
-
-    off_t m = catalog[0].average[i].measureOffset;
-    for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) {
-      off_t idx = catalog[0].measure[m].imageID;
-      if (idx <= 0) continue; // detections with imageID == 0 do not have a valid image (eg, ref photcode)
-
-      off_t id = index[idx];
-      float Mcal = image[id].Mcal;
-      float dMcal = image[id].dMcal;
-      float Mcal_offset = 0.0;
-
-      // if we know about a flat-field correction, then we need to apply the sub-chip correction
-      int flat_id = image[id].photom_map_id;
-      if (flat_id > 0) {
-	  Mcal_offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[0].measure[m].Xccd, catalog[0].measure[m].Yccd);
-      }
-
-      catalog[0].measure[m].Mcal = Mcal - Mcal_offset;
-      catalog[0].measure[m].dMcal = dMcal;
-
-      // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,
-      // then tag the measurement as well
-      if (UBERCAL && (image[id].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
-	catalog[0].measure[m].dbFlags |=  ID_MEAS_PHOTOM_UBERCAL;
-      }
-
-      found ++;
-    }
-  }
-
-  if (found) {
-    fprintf (stderr, "found "OFF_T_FMT" matches\n", found);
-  }
-}
Index: anches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c	(revision 33255)
+++ 	(revision )
@@ -1,87 +1,0 @@
-# include "setphot.h"
-
-// we want to load a subset of image data for this operation.  we only need:
-// imageID, photom_map_id, Mcal, dMcal, flags.  
-int update_dvo_setphot_client (ImageSubset *image, off_t Nimage, FlatCorrectionTable *flatcorr) {
-
-  SkyRegion UserPatch;
-  SkyTable *sky = NULL;
-  SkyList *skylist = NULL;
-  Catalog catalog;
-  off_t i, maxID, *index;
-
-  // load the current sky table (layout of all SkyRegions) 
-  sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, -1, VERBOSE);
-  SkyTableSetFilenames (sky, CATDIR, "cpt");
-
-# if (0)
-  if (PARALLEL) {
-    update_dvo_setphot_parallel (sky, image, Nimage);
-    exit (0);
-  }
-# endif
-
-  // create an index for the image IDs
-  maxID = 0;
-  for (i = 0; i < Nimage; i++) {
-    maxID = MAX(maxID, image[i].imageID);
-  }
-  ALLOCATE (index, off_t, maxID + 1);
-  for (i = 0; i < maxID + 1; i++) {
-    index[i] = -1;
-  }
-  for (i = 0; i < Nimage; i++) {
-    if (!image[i].imageID) continue; // images with ID == 0 are virtual
-    index[image[i].imageID] = i;
-  }
-
-  // determine the populated SkyRegions overlapping the requested area (default depth)
-  UserPatch.Rmin = 0;
-  UserPatch.Rmax = 360;
-  UserPatch.Dmin = -90;
-  UserPatch.Dmax = +90;
-  skylist = SkyListByPatch (sky, -1, &UserPatch);
-
-  // update measurements for each populated catalog
-  for (i = 0; i < skylist[0].Nregions; i++) {
-
-    if (HOST_ID != skylist->regions[i]->hostID) continue;
-    if (!(skylist->regions[i]->hostFlags & DATA_ON_TGT)) continue;
-
-    char localFilename[1024];
-    snprintf (localFilename, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
-
-    // set up the basic catalog info
-    catalog.filename  = localFilename;
-    catalog.catformat = DVO_FORMAT_UNDEF; // not needed since we skip empty catalogs
-    catalog.catmode   = DVO_MODE_UNDEF;	  // not needed since we skip empty catalogs
-    catalog.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
-    catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
-
-    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
-      fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
-      exit (1);
-    }
-    if (!catalog.Naves_disk) {
-      if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
-      dvo_catalog_unlock (&catalog);
-      dvo_catalog_free (&catalog);
-      continue;
-    }
-
-    update_catalog_setphot_client (&catalog, image, index, Nimage, flatcorr);
-
-    if (!UPDATE) {
-      dvo_catalog_unlock (&catalog);
-      dvo_catalog_free (&catalog);
-      continue;
-    }
-    
-    if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog.filename);
-    
-    dvo_catalog_save (&catalog, VERBOSE); 
-    dvo_catalog_unlock (&catalog);
-    dvo_catalog_free (&catalog);
-  }
-  return (TRUE);
-}      
Index: anches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_setphot_parallel.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_setphot_parallel.c	(revision 33255)
+++ 	(revision )
@@ -1,78 +1,0 @@
-# include "uniphot.h"
-# include <glob.h>
-
-// for parallel operation, we need to have a threaded client / server model here:
-// save the zero point information to a temporary file
-// launch remote jobs on each of the remote hosts
-// monitor the results
-// harvest the children
-
-int update_setphot_parallel () {
-
-  strcpy (connect, "ssh");
-
-  // load the list of hosts
-  HostTable *table = HostTableLoad (catdir, "HostTable.dat");
-
-  for (i = 0; i < table->Nhosts; i++) {
-
-    char command[1024];
-    snprintf (command, 1024, "setphot_update_catalogs");
-
-    // launch the job on the remote machine (no handshake)
-    int pid = rconnect (connect, table->hosts[i].hostname, command, table->hosts[i].stdio, &errorInfo, FALSE);
-    if (!pid) {
-      if (DEBUG) fprintf (stderr, "failure to start %s (error %d)\n", table->hosts[i].hostname, errorInfo);
-      exit (1);
-    }
-    table->hosts[i].pid; // save for future reference
-
-    // check that all hosts started OK?
-  }
-
-  // watch for stdout / stderr from those jobs...
-  // wait for all of them to complete...
-
-  return (TRUE);
-}      
-
-void update_catalog_setphot (Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr) {
-
-  off_t i, j, found;
-
-  found = 0;    
-  for (i = 0; i < catalog[0].Naverage; i++) {
-
-    off_t m = catalog[0].average[i].measureOffset;
-    for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) {
-      off_t idx = catalog[0].measure[m].imageID;
-      if (idx <= 0) continue; // detections with imageID == 0 do not have a valid image (eg, ref photcode)
-
-      off_t id = index[idx];
-      float Mcal = image[id].Mcal;
-      float dMcal = image[id].dMcal;
-      float Mcal_offset = 0.0;
-
-      // if we know about a flat-field correction, then we need to apply the sub-chip correction
-      int flat_id = image[id].photom_map_id;
-      if (flat_id > 0) {
-	  Mcal_offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[0].measure[m].Xccd, catalog[0].measure[m].Yccd);
-      }
-
-      catalog[0].measure[m].Mcal = Mcal - Mcal_offset;
-      catalog[0].measure[m].dMcal = dMcal;
-
-      // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,
-      // then tag the measurement as well
-      if (UBERCAL && (image[id].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
-	catalog[0].measure[m].dbFlags |=  ID_MEAS_PHOTOM_UBERCAL;
-      }
-
-      found ++;
-    }
-  }
-
-  if (found) {
-    fprintf (stderr, "found "OFF_T_FMT" matches\n", found);
-  }
-}
