Index: trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvo.h	(revision 31647)
+++ trunk/Ohana/src/libdvo/include/dvo.h	(revision 31663)
@@ -78,5 +78,10 @@
 # define LOAD_MISS 	0x04
 # define LOAD_SECF 	0x08 
-# define LOAD_MEAS_META 0x10
+# define SKIP_AVES 	0x10
+# define SKIP_MEAS 	0x20
+# define SKIP_MISS 	0x40
+# define SKIP_SECF 	0x80
+
+// # define LOAD_MEAS_META 0x100 -- is this used??
 
 /* photometry code types */
Index: trunk/Ohana/src/libdvo/src/coordops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/coordops.c	(revision 31647)
+++ trunk/Ohana/src/libdvo/src/coordops.c	(revision 31663)
@@ -440,6 +440,6 @@
 int GetCoords (Coords *coords, Header *header) {
   
-  int status, itmp, Polynomial, Polyterm;
-  double Lambda, rotate, scale;
+  int status, status1, status2, itmp, Polynomial, Polyterm;
+  double Lambda, rotate, rotate1, rotate2, scale;
   double equinox;
   char *ctype;
@@ -456,5 +456,5 @@
   mode = COORD_TYPE_NONE;
   {    
-    int haveCTYPE, haveCDELT, haveCROTA, haveCDij, havePCij, haveRAo;
+    int haveCTYPE, haveCDELT, haveCROTA, haveCROTA1, haveCROTA2, haveCDij, havePCij, haveRAo;
     float tmp;
     char stmp[80];
@@ -463,11 +463,14 @@
     // set: (CDELTi + CROTAi), (CDELTi + PCij), (CDij), 
 
-    haveCTYPE = gfits_scan (header, "CTYPE2",   "%s", 1, stmp);
-    haveCDELT = gfits_scan (header, "CDELT1",   "%f", 1, &tmp);
-    haveCROTA = gfits_scan (header, "CROTA1",   "%f", 1, &tmp);
-    haveCDij  = gfits_scan (header, "CD1_1",    "%f", 1, &tmp);
-    havePCij  = gfits_scan (header, "PC001001", "%f", 1, &tmp);
-    haveRAo   = gfits_scan (header, "RA_O",     "%f", 1, &tmp);
+    haveCTYPE  = gfits_scan (header, "CTYPE2",   "%s", 1, stmp);
+    haveCDELT  = gfits_scan (header, "CDELT1",   "%f", 1, &tmp);
+    haveCROTA1 = gfits_scan (header, "CROTA1",   "%f", 1, &tmp);
+    haveCROTA2 = gfits_scan (header, "CROTA2",   "%f", 1, &tmp);
+    haveCDij   = gfits_scan (header, "CD1_1",    "%f", 1, &tmp);
+    havePCij   = gfits_scan (header, "PC001001", "%f", 1, &tmp);
+    haveRAo    = gfits_scan (header, "RA_O",     "%f", 1, &tmp);
     
+    haveCROTA = haveCROTA1 || haveCROTA2;
+
     if (haveCTYPE && havePCij  && haveCDELT) { mode = COORD_TYPE_PC;   goto gotit; }
     if (haveCTYPE && haveCROTA && haveCDELT) { mode = COORD_TYPE_ROT;  goto gotit; }
@@ -540,5 +543,12 @@
       status &= gfits_scan (header, "CDELT2", "%f", 1, &coords[0].cdelt2);
 
-      status &= gfits_scan (header, "CROTA2", "%lf", 1, &rotate);
+      status1 = gfits_scan (header, "CROTA1", "%lf", 1, &rotate1);
+      status2 = gfits_scan (header, "CROTA2", "%lf", 1, &rotate2);
+      status &= status1 || status2;
+
+      rotate = rotate2;
+      if (status1 && !status2) rotate = rotate1;
+      if (!status1 && !status2) rotate = 0.0;
+
       Lambda = coords[0].cdelt2 / coords[0].cdelt1;
       coords[0].pc1_1 =  cos(rotate*RAD_DEG);
Index: trunk/Ohana/src/libdvo/src/dvo_catalog.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 31647)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 31663)
@@ -90,4 +90,7 @@
   catalog[0].secfilt = NULL;
   
+  catalog[0].averageT = NULL;
+  catalog[0].measureT = NULL; 
+
   catalog[0].objID = 0;
   catalog[0].catID = 0;
Index: trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 31647)
+++ trunk/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 31663)
@@ -172,4 +172,5 @@
   header.buffer = NULL;
   primary = NULL;
+  status = FALSE;
 
   /* get the components from the header - these duplicate information in the split files (NAXIS2) */
@@ -239,10 +240,13 @@
 
   /*** Measure Table ***/
-  status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE);
-  if (status == DVO_CAT_OPEN_FAIL) {
-    return (FALSE);
-  }
-  if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) {
-    return (FALSE);
+  if (!(catalog[0].catflags & SKIP_MEAS)) {
+    // unless we specify 'skip', we still need to load the 
+    status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE);
+    if (status == DVO_CAT_OPEN_FAIL) {
+      return (FALSE);
+    }
+    if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) {
+      return (FALSE);
+    }
   }
   if ((status != DVO_CAT_OPEN_EMPTY) && (catalog[0].catflags & LOAD_MEAS)) {
@@ -262,4 +266,11 @@
   } else {
     // XXX is it necessary to generate a template header here?
+    // XXX this is a memory leak, right?
+    if (catalog[0].measure_catalog) {
+      gfits_free_header (&catalog[0].measure_catalog[0].header);
+    } else {
+      ALLOCATE (catalog[0].measure_catalog, Catalog, 1);
+      dvo_catalog_init (catalog[0].measure_catalog, TRUE);
+    }
     gfits_create_header (&catalog[0].measure_catalog[0].header);
     ALLOCATE (catalog[0].measure, Measure, 1);
