Index: trunk/Ohana/src/getstar/src/WriteImageFITS.c
===================================================================
--- trunk/Ohana/src/getstar/src/WriteImageFITS.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/WriteImageFITS.c	(revision 38441)
@@ -36,5 +36,5 @@
 
   table.header = &theader;
-  gfits_table_set_SMPData (&table, NULL, Nstars);
+  gfits_table_set_SMPData (&table, NULL, Nstars, TRUE);
   gfits_fwrite_Theader (f, &theader);
   gfits_fwrite_table   (f, &table);
Index: trunk/Ohana/src/getstar/src/dvoImageExtract.c
===================================================================
--- trunk/Ohana/src/getstar/src/dvoImageExtract.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/dvoImageExtract.c	(revision 38441)
@@ -14,4 +14,5 @@
   /*** update the image table ***/
   /* setup image table format and lock */
+  gfits_db_init (&db);
   db.mode   = dvo_catalog_catmode (CATMODE);
   db.format = dvo_catalog_catformat (CATFORMAT);
@@ -31,5 +32,5 @@
 
   // convert database table to internal structure
-  images = gfits_table_get_Image (&db.ftable, &Nimages, &db.swapped);
+  images = gfits_table_get_Image (&db.ftable, &Nimages, &db.scaledValue, &db.nativeOrder);
   if (!images) {
     fprintf (stderr, "ERROR: failed to read images\n");
Index: trunk/Ohana/src/getstar/src/dvoImageOverlaps.c
===================================================================
--- trunk/Ohana/src/getstar/src/dvoImageOverlaps.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/dvoImageOverlaps.c	(revision 38441)
@@ -17,4 +17,5 @@
   /*** update the image table ***/
   /* setup image table format and lock */
+  gfits_db_init (&db);
   db.mode   = dvo_catalog_catmode (CATMODE);
   db.format = dvo_catalog_catformat (CATFORMAT);
@@ -34,5 +35,5 @@
 
   // convert database table to internal structure
-  dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.swapped);
+  dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.scaledValue, &db.nativeOrder);
   if (!dbImages) {
     fprintf (stderr, "ERROR: failed to read images\n");
Index: trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c
===================================================================
--- trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c	(revision 38441)
@@ -43,4 +43,5 @@
     /*** update the image table ***/
     /* setup image table format and lock */
+    gfits_db_init (&db);
     db.mode   = dvo_catalog_catmode (CATMODE);
     db.format = dvo_catalog_catformat (CATFORMAT);
@@ -60,5 +61,5 @@
 
     // convert database table to internal structure
-    dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.swapped);
+    dbImages = gfits_table_get_Image (&db.ftable, &NdbImages, &db.scaledValue, &db.nativeOrder);
     if (!dbImages) {
       fprintf (stderr, "ERROR: failed to read images\n");
Index: trunk/Ohana/src/getstar/src/getstar.c
===================================================================
--- trunk/Ohana/src/getstar/src/getstar.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/getstar.c	(revision 38441)
@@ -28,5 +28,5 @@
   output.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
   output.catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
-  output.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
+  output.catflags  = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT;
   output.Nsecfilt  = GetPhotcodeNsecfilt ();
 
@@ -63,6 +63,6 @@
 	catalog.filename = skylist[0].filename[i];
 	catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
-	catalog.catflags = LOAD_AVES | LOAD_SECF;
-	catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS;
+	catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT;
+	catalog.catflags |= needMeas ? DVO_LOAD_MEASURE : DVO_SKIP_MEASURE;
 
 	// an error exit status here is a significant error
@@ -71,5 +71,5 @@
 	  exit (2);
 	}
-	if (!catalog.Naves_disk) {
+	if (!catalog.Naverage_disk) {
 	  dvo_catalog_unlock (&catalog);
 	  dvo_catalog_free (&catalog);
@@ -95,6 +95,6 @@
 	catalog.filename = skylist[0].filename[i];
 	catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
-	catalog.catflags = LOAD_AVES | LOAD_SECF;
-	catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS;
+	catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT;
+	catalog.catflags |= needMeas ? DVO_LOAD_MEASURE : DVO_SKIP_MEASURE;
 
 	// an error exit status here is a significant error
@@ -104,5 +104,5 @@
 	}
 	/* skip empty catalogs */
-	if (!catalog.Naves_disk) continue;
+	if (!catalog.Naverage_disk) continue;
 	stars = select_by_image (&catalog, &image, 0, 0, stars, &Nstars);
       }
Index: trunk/Ohana/src/getstar/src/select_by_region.c
===================================================================
--- trunk/Ohana/src/getstar/src/select_by_region.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/select_by_region.c	(revision 38441)
@@ -162,5 +162,5 @@
   output[0].Naverage = Nave;
   output[0].Nmeasure = Nmeas;
-  output[0].Nsecf_mem = Nave*Nsecfilt;
+  output[0].Nsecfilt_mem = Nave*Nsecfilt;
 
   fprintf (stderr, "output catalog has "OFF_T_FMT" stars ("OFF_T_FMT" measures, %d secfilt)\n",
Index: trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_0.c
===================================================================
--- trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_0.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_0.c	(revision 38441)
@@ -111,5 +111,5 @@
 
   ftable.header = &theader;
-  gfits_table_set_Getstar_PS1_DEV_0 (&ftable, output, Noutput);
+  gfits_table_set_Getstar_PS1_DEV_0 (&ftable, output, Noutput, TRUE);
 
   gfits_fwrite_header  (f, &header);
Index: trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_1.c
===================================================================
--- trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_1.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_1.c	(revision 38441)
@@ -114,5 +114,5 @@
 
   ftable.header = &theader;
-  gfits_table_set_Getstar_PS1_DEV_1 (&ftable, output, Noutput);
+  gfits_table_set_Getstar_PS1_DEV_1 (&ftable, output, Noutput, TRUE);
 
   gfits_fwrite_header  (f, &header);
Index: trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_2.c
===================================================================
--- trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_2.c	(revision 38062)
+++ trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_2.c	(revision 38441)
@@ -120,5 +120,5 @@
 
   ftable.header = &theader;
-  gfits_table_set_Getstar_PS1_DEV_2 (&ftable, output, Noutput);
+  gfits_table_set_Getstar_PS1_DEV_2 (&ftable, output, Noutput, TRUE);
 
   gfits_fwrite_header  (f, &header);
