Index: trunk/Ohana/src/uniphot/include/setphot.h
===================================================================
--- trunk/Ohana/src/uniphot/include/setphot.h	(revision 39137)
+++ trunk/Ohana/src/uniphot/include/setphot.h	(revision 39138)
@@ -36,4 +36,5 @@
 int          IMAGES_ONLY;
 int          REPAIR_BY_OBJID;
+int          SKIP_EXTRA_EXTENSIONS;
 
 SkyRegion    UserPatch;
Index: trunk/Ohana/src/uniphot/src/initialize_setphot.c
===================================================================
--- trunk/Ohana/src/uniphot/src/initialize_setphot.c	(revision 39137)
+++ trunk/Ohana/src/uniphot/src/initialize_setphot.c	(revision 39138)
@@ -49,4 +49,10 @@
   if ((N = get_argument (argc, argv, "-reset"))) {
     RESET = TRUE;
+    remove_argument (N, &argc, argv);
+  }
+
+  SKIP_EXTRA_EXTENSIONS = FALSE;
+  if ((N = get_argument (argc, argv, "-skip-extra-extensions"))) {
+    SKIP_EXTRA_EXTENSIONS = TRUE;
     remove_argument (N, &argc, argv);
   }
Index: trunk/Ohana/src/uniphot/src/load_zpt_table.c
===================================================================
--- trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 39137)
+++ trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 39138)
@@ -280,13 +280,18 @@
     }
 
-    // ***** skip the extra table segment *****
-    // load data for this header 
-    if (!gfits_load_header (f, &theader)) return (NULL);
-
-    // read the fits table bytes
-    if (!gfits_fread_ftable_data (f, &ftable, FALSE)) return (NULL);
+    // in some versions of ucal, we have extra FITS extensions (for masked chips)
+    // since Eddie gives no (or almost no) metadata, we have to be told if these exist:
+
+    if (SKIP_EXTRA_EXTENSIONS) {
+      // ***** skip the extra table segment *****
+      // load data for this header 
+      if (!gfits_load_header (f, &theader)) return (NULL);
+
+      // read the fits table bytes
+      if (!gfits_fread_ftable_data (f, &ftable, FALSE)) return (NULL);
   
-    // skip over remaining bytes in data segment
-    fseeko (f, ftable.datasize - ftable.validsize, SEEK_CUR);
+      // skip over remaining bytes in data segment
+      fseeko (f, ftable.datasize - ftable.validsize, SEEK_CUR);
+    }
 
     // XXX the initial hacked-together table from Eddie is missing the last 2 elements.  they should be zero
