Index: trunk/Ohana/src/addstar/src/UpdateDatabase_Image.c
===================================================================
--- trunk/Ohana/src/addstar/src/UpdateDatabase_Image.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/UpdateDatabase_Image.c	(revision 38471)
@@ -43,7 +43,8 @@
 
     // set the parameters which guide catalog open/load/create
+    dvo_catalog_init (&catalog, TRUE);
+    catalog.filename  = skylist[0].filename[i];
     catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
     catalog.catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
-    catalog.filename  = skylist[0].filename[i];
     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
     catalog.catflags  = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT;
Index: trunk/Ohana/src/addstar/src/UpdateDatabase_Refcat.c
===================================================================
--- trunk/Ohana/src/addstar/src/UpdateDatabase_Refcat.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/UpdateDatabase_Refcat.c	(revision 38471)
@@ -32,4 +32,5 @@
 
     // set the parameters which guide catalog open/load/create
+    dvo_catalog_init (&catalog, TRUE);
     catalog.filename  = skylist[0].filename[i];
     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
Index: trunk/Ohana/src/addstar/src/UpdateDatabase_Reflist.c
===================================================================
--- trunk/Ohana/src/addstar/src/UpdateDatabase_Reflist.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/UpdateDatabase_Reflist.c	(revision 38471)
@@ -32,4 +32,5 @@
 
     // set the parameters which guide catalog open/load/create
+    dvo_catalog_init (&catalog, TRUE);
     catalog.filename  = skylist[0].filename[i];
     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
Index: trunk/Ohana/src/addstar/src/addstar.c
===================================================================
--- trunk/Ohana/src/addstar/src/addstar.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/addstar.c	(revision 38471)
@@ -104,4 +104,5 @@
 
     // set the parameters which guide catalog open/load/create
+    dvo_catalog_init (&catalog, TRUE);
     catalog.filename    = skylist[0].filename[i];
     catalog.catmode     = dvo_catalog_catmode (CATMODE);         // set the default catmode from config data
Index: trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c	(revision 38471)
@@ -178,4 +178,5 @@
 
 	// now we have all of the loaded stars in this catalog
+	dvo_catalog_init (&catalog, TRUE);
 	catalog.filename = skylist[0].filename[0];
 	catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadICRF_catalog.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadICRF_catalog.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadICRF_catalog.c	(revision 38471)
@@ -7,4 +7,5 @@
 
   // now we have all of the loaded stars in this catalog
+  dvo_catalog_init (&catalog, TRUE);
   catalog.filename = filename;
   catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadstarpar_catalog.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadstarpar_catalog.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadstarpar_catalog.c	(revision 38471)
@@ -7,4 +7,5 @@
 
   // now we have all of the loaded stars in this catalog
+  dvo_catalog_init (&catalog, TRUE);
   catalog.filename = filename;
   catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 38471)
@@ -168,4 +168,5 @@
 
 	// now we have all of the loaded stars in this catalog
+	dvo_catalog_init (&catalog, TRUE);
 	catalog.filename = skylist[0].filename[0];
 	catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadtycho_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadtycho_rawdata.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadtycho_rawdata.c	(revision 38471)
@@ -128,4 +128,5 @@
 
       // now we have all of the loaded stars in this catalog
+      dvo_catalog_init (&catalog, TRUE);
       catalog.filename = skylist[0].filename[0];
       catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadwise_prelim_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadwise_prelim_rawdata.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadwise_prelim_rawdata.c	(revision 38471)
@@ -183,4 +183,5 @@
 
 	// now we have all of the loaded stars in this catalog
+	dvo_catalog_init (&catalog, TRUE);
 	catalog.filename = skylist[0].filename[0];
 	catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/loadwise_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 38471)
@@ -185,4 +185,5 @@
 
 	// now we have all of the loaded stars in this catalog
+	dvo_catalog_init (&catalog, TRUE);
 	catalog.filename = skylist[0].filename[0];
 	catalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
Index: trunk/Ohana/src/addstar/src/resort_threaded.c
===================================================================
--- trunk/Ohana/src/addstar/src/resort_threaded.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/resort_threaded.c	(revision 38471)
@@ -40,4 +40,6 @@
     char hostfile[1024];
     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, threadData->region->name);
+
+    dvo_catalog_init (&catalog, TRUE);
     catalog.filename  = HOST_ID ? hostfile : threadData->filename;
 
Index: trunk/Ohana/src/addstar/src/resort_unthreaded.c
===================================================================
--- trunk/Ohana/src/addstar/src/resort_unthreaded.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/resort_unthreaded.c	(revision 38471)
@@ -18,4 +18,6 @@
     char hostfile[1024];
     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
+
+    dvo_catalog_init (&catalog, TRUE);
     catalog.filename  = HOST_ID ? hostfile : skylist[0].filename[i];
 
Index: trunk/Ohana/src/addstar/src/sedstar.c
===================================================================
--- trunk/Ohana/src/addstar/src/sedstar.c	(revision 38470)
+++ trunk/Ohana/src/addstar/src/sedstar.c	(revision 38471)
@@ -25,4 +25,5 @@
 
   for (i = 0; i < skylist[0].Nregions; i++) {
+    dvo_catalog_init (&incatalog, TRUE);
     incatalog.filename = skylist[0].filename[i];
     incatalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT;
Index: trunk/Ohana/src/addstar/test/relphot.flatcorr.dvo
===================================================================
--- trunk/Ohana/src/addstar/test/relphot.flatcorr.dvo	(revision 38470)
+++ trunk/Ohana/src/addstar/test/relphot.flatcorr.dvo	(revision 38471)
@@ -194,5 +194,5 @@
 
   # run relphot on the db and check that the images now match the expected values
-  tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $catdir -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update -synthphot_zpts $fileroot.synthzpts.fits
+  tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $catdir -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update -synthphot-zpts $fileroot.synthzpts.fits
   for i 0 mjd_uc[]
     ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot_uc
