Index: trunk/Ohana/src/dvomerge/src/LoadCatalog.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/LoadCatalog.c	(revision 39138)
+++ trunk/Ohana/src/dvomerge/src/LoadCatalog.c	(revision 39139)
@@ -1,3 +1,4 @@
 # include "dvomerge.h"
+# define SKIP_GALPHOT 0
 
 int LoadCatalog (Catalog *catalog, SkyRegion *region, char *filename, char *mode, int Nsecfilt) {
@@ -10,6 +11,10 @@
   // always load all of the data (if any exists)
   // XXXX TEMP HACK : skip GALPHOT
-  // XXXX catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
+
+# if (SKIP_GALPHOT)  
   catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR;
+# else
+  catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
+# endif
   
   catalog[0].catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c
===================================================================
--- trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 39138)
+++ trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 39139)
@@ -54,4 +54,5 @@
   NLENS = Nlens = output[0].Nlensing;
   NSTAR = Nstar = output[0].Nstarpar;
+  NGALP = Ngalp = output[0].Ngalphot;
 
   // current max obj ID for this catalog
@@ -118,8 +119,10 @@
     next_lens = init_lensing_links (output[0].average, Nave, output[0].lensing, Nlens);
     next_star = init_starpar_links (output[0].average, Nave, output[0].starpar, Nstar);
+    next_galp = init_galphot_links (output[0].average, Nave, output[0].galphot, Ngalp);
   } else {
     next_meas = build_measure_links (output[0].average, Nave, output[0].measure, Nmeas);
     next_lens = build_lensing_links (output[0].average, Nave, output[0].lensing, Nlens);
     next_star = build_starpar_links (output[0].average, Nave, output[0].starpar, Nstar);
+    next_galp = build_galphot_links (output[0].average, Nave, output[0].galphot, Ngalp);
   }    
 
@@ -192,4 +195,9 @@
       REALLOCATE (next_star, off_t, NSTAR);
       REALLOCATE (output[0].starpar, StarPar, NSTAR);
+    }
+    if (Ngalp + input[0].average[N].Ngalphot >= NGALP) {
+      NGALP = Ngalp + input[0].average[N].Ngalphot + 1000;
+      REALLOCATE (next_galp, off_t, NGALP);
+      REALLOCATE (output[0].galphot, Galphot, NGALP);
     }
 
