Index: /trunk/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/avextract.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/avextract.c	(revision 4834)
@@ -28,4 +28,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/calextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/calextract.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/calextract.c	(revision 4834)
@@ -30,4 +30,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* command line arguments */
Index: /trunk/Ohana/src/opihi/dvo/calmextract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 4834)
@@ -31,4 +31,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* command line arguments */
Index: /trunk/Ohana/src/opihi/dvo/catalog.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/catalog.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/catalog.c	(revision 4834)
@@ -30,6 +30,8 @@
   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
 
+  VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  VarConfig ("GSCDIR", "%s", gscdir);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   Mz = 17.0;
Index: /trunk/Ohana/src/opihi/dvo/ccd.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/ccd.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/ccd.c	(revision 4834)
@@ -28,4 +28,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/cmd.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/cmd.c	(revision 4834)
@@ -28,4 +28,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/ddmags.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/ddmags.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/ddmags.c	(revision 4834)
@@ -28,4 +28,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/dmagaves.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmagaves.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/dmagaves.c	(revision 4834)
@@ -29,4 +29,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/dmagmeas.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 4834)
@@ -29,4 +29,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/dmags.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmags.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/dmags.c	(revision 4834)
@@ -28,4 +28,6 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   /* interpret command-line options */
Index: /trunk/Ohana/src/opihi/dvo/dmt.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dmt.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/dmt.c	(revision 4834)
@@ -17,6 +17,9 @@
   Vector *vec1, *vec2, *vec3, *vec4, *vec5;
 
+  if (!InitPhotcodes ()) return (FALSE);
+
   VarConfig ("CATDIR", "%s", catdir);
-  if (!InitPhotcodes ()) return (FALSE);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   vec1 = vec2 = vec3 = vec4 = vec5 = NULL;
Index: /trunk/Ohana/src/opihi/dvo/extract.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/extract.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/extract.c	(revision 4834)
@@ -34,6 +34,8 @@
   if (!InitPhotcodes ()) return (FALSE);
 
+  VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  VarConfig ("GSCDIR", "%s", gscdir);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   regions = (RegionFile *) NULL;
Index: /trunk/Ohana/src/opihi/dvo/fitcolors.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 4834)
@@ -14,5 +14,5 @@
   int N1, N2, i1, i2, mode[4];
   int Nsec, Nregions, status;
-  char catdir[256], filename[256], *RegionName, *RegionList;
+  char catdir[256], catmode[16], filename[256], *RegionName, *RegionList;
   char *cmd, *outcmd, *camera;
   double *M1, *M2;
@@ -37,4 +37,5 @@
   /* find CATDIR in config system */
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;
+  if (VarConfig ("CATMODE", "%s", catmode) == NULL) strcpy (catmode, "RAW");
 
   /* interpret command-line options */
@@ -103,4 +104,5 @@
   for (k = 0; k < Nregions; k++) {
     /* lock, load, unlock catalog */
+    strcpy (catalog[k].catmode, catmode);
     sprintf (filename, "%s/%s", catdir, regions[k].name);
     catalog[k].filename = filename;
Index: /trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/imdata.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/imdata.c	(revision 4834)
@@ -40,4 +40,7 @@
     }      
   }
+
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
 
   if (argc != 4) {
Index: /trunk/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 4834)
@@ -18,4 +18,7 @@
 
   VarConfig ("CATDIR", "%s", catdir);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
+
   if (!InitPhotcodes ()) return (FALSE);
 
Index: /trunk/Ohana/src/opihi/dvo/lightcurve.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 4834)
@@ -15,4 +15,7 @@
 
   VarConfig ("CATDIR", "%s", catdir);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
+
   if (!InitPhotcodes ()) return (FALSE);
   Nsec = GetPhotcodeNsecfilt ();
Index: /trunk/Ohana/src/opihi/dvo/subpix.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/subpix.c	(revision 4833)
+++ /trunk/Ohana/src/opihi/dvo/subpix.c	(revision 4834)
@@ -23,4 +23,7 @@
 
   VarConfig ("CATDIR", "%s", catdir);
+  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
+    strcpy (catalog.catmode, "RAW");
+
   GetTimeFormat (&TimeReference, &TimeFormat);
 
