Index: trunk/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/avextract.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/avextract.c	(revision 5014)
@@ -28,6 +28,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/calextract.c	(revision 5014)
@@ -30,6 +30,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 5014)
@@ -31,6 +31,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/catalog.c	(revision 5014)
@@ -32,6 +32,4 @@
   VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  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 4865)
+++ trunk/Ohana/src/opihi/dvo/ccd.c	(revision 5014)
@@ -28,6 +28,4 @@
   /* 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/cmatch.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/cmatch.c	(revision 5014)
@@ -11,6 +11,4 @@
   VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  if (VarConfig ("CATMODE", "%s", catalog1.catmode) == NULL) 
-    strcpy (catalog1.catmode, "RAW");
       
   if (argc != 9) {
Index: trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmd.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/cmd.c	(revision 5014)
@@ -28,6 +28,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/ddmags.c	(revision 5014)
@@ -28,6 +28,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/dmagaves.c	(revision 5014)
@@ -29,6 +29,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 5014)
@@ -29,6 +29,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/dmags.c	(revision 5014)
@@ -28,6 +28,4 @@
   /* 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 4865)
+++ trunk/Ohana/src/opihi/dvo/dmt.c	(revision 5014)
@@ -20,6 +20,4 @@
 
   VarConfig ("CATDIR", "%s", catdir);
-  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 4865)
+++ trunk/Ohana/src/opihi/dvo/extract.c	(revision 5014)
@@ -36,6 +36,4 @@
   VarConfig ("GSCDIR", "%s", gscdir);
   VarConfig ("CATDIR", "%s", catdir);
-  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 4865)
+++ trunk/Ohana/src/opihi/dvo/fitcolors.c	(revision 5014)
@@ -14,5 +14,5 @@
   int N1, N2, i1, i2, mode[4];
   int Nsec, Nregions, status;
-  char catdir[256], catmode[16], filename[256], *RegionName, *RegionList;
+  char catdir[256], filename[256], *RegionName, *RegionList;
   char *cmd, *outcmd, *camera;
   double *M1, *M2;
@@ -37,5 +37,4 @@
   /* 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 */
@@ -104,5 +103,4 @@
   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/gimages.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gimages.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/gimages.c	(revision 5014)
@@ -4,5 +4,5 @@
   
   int i, j, N, Nimage, Nfound, *subset, Nsubset, status;
-  double ra, dec, Ra, Dec, X, Y, Mcal;
+  double ra, dec, Ra, Dec, X, Y;
   double trange, t;
   int TimeSelect, PixelCoords, TimeFormat, PhotCodeSelect;
@@ -96,14 +96,17 @@
     if (Y > image[i].NY) continue;
 
+    /*** XXX we need to re-introduce the use of applyMcal
     Mcal = applyMcal (&image[i], 2048.0, 2048.0);
+    ***/
+
     date = sec_to_date (image[i].tzero);
 
     if (PixelCoords) {
       fprintf (GetOutfile(), "%3d %s %6.1f %6.1f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 
-	       Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code);
+	       Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS, image[i].exptime, image[i].code);
     } else {
       XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
       fprintf (GetOutfile(), "%3d %s %8.4f %8.4f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 
-	       Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code);
+	       Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS, image[i].exptime, image[i].code);
     }
     sprintf (name, "IMAGEx:%d", Nfound);
Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5014)
@@ -18,6 +18,4 @@
 
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) return (FALSE);
-  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
-    strcpy (catalog.catmode, "RAW");
 
   if (!InitPhotcodes ()) return (FALSE);
Index: trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdata.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/imdata.c	(revision 5014)
@@ -40,7 +40,4 @@
     }      
   }
-
-  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
-    strcpy (catalog.catmode, "RAW");
 
   if (argc != 4) {
Index: trunk/Ohana/src/opihi/dvo/imextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imextract.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/imextract.c	(revision 5014)
@@ -139,11 +139,11 @@
       break;
     case (AIRMASS):
-      vec[0].elements[N] = 0.001*image[j].secz;
+      vec[0].elements[N] = image[j].secz_PS;
       break;
     case (MCAL):
-      vec[0].elements[N] = 0.001*image[j].Mcal;
+      vec[0].elements[N] = image[j].Mcal_PS;
       break;
     case (dMCAL):
-      vec[0].elements[N] = 0.001*image[j].dMcal;
+      vec[0].elements[N] = image[j].dMcal_PS;
       break;
     case (PHOTCODE):
Index: trunk/Ohana/src/opihi/dvo/imlist.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imlist.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/imlist.c	(revision 5014)
@@ -86,5 +86,5 @@
     XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
     fprintf (GetOutfile(), "%3d %s %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 
-	     i, image[i].name, r, d, t, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*image[i].Mcal, 0.001*image[i].dMcal);
+	     i, image[i].name, r, d, t, image[i].nstar, image[i].source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS);
   }
 
Index: trunk/Ohana/src/opihi/dvo/imphot.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imphot.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/imphot.c	(revision 5014)
@@ -74,18 +74,18 @@
     switch (image[i].order) {
     case 0:
-      fprintf (stderr, "%s: %d - %d\n", image[i].name, image[i].order, image[i].Mcal);
+      fprintf (stderr, "%s: %d - %f\n", image[i].name, image[i].order, image[i].Mcal_PS);
       break;
     case 1:
-      fprintf (stderr, "%s: %d - %d, %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My);
+      fprintf (stderr, "%s: %d - %f, %d %d\n", image[i].name, image[i].order, image[i].Mcal_PS, image[i].Mx, image[i].My);
       break;
     case 2:
-      fprintf (stderr, "%s: %d - %d, %d %d, %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, image[i].Mxx, image[i].Mxy, image[i].Myy);
+      fprintf (stderr, "%s: %d - %f, %d %d, %d %d %d\n", image[i].name, image[i].order, image[i].Mcal_PS, image[i].Mx, image[i].My, image[i].Mxx, image[i].Mxy, image[i].Myy);
       break;
     case 3:
-      fprintf (stderr, "%s: %d - %d, %d %d, %d %d %d, %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, 
+      fprintf (stderr, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal_PS, image[i].Mx, image[i].My, 
 	       image[i].Mxx, image[i].Mxy, image[i].Myy, image[i].Mxxx, image[i].Mxxy, image[i].Mxyy, image[i].Myyy);
       break;
     case 4:
-      fprintf (stderr, "%s: %d - %d, %d %d, %d %d %d, %d %d %d %d, %d %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, 
+      fprintf (stderr, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d, %d %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal_PS, image[i].Mx, image[i].My, 
 	       image[i].Mxx, image[i].Mxy, image[i].Myy, image[i].Mxxx, image[i].Mxxy, image[i].Mxyy, image[i].Myyy,
 	       image[i].Mxxxx, image[i].Mxxxy, image[i].Mxxyy, image[i].Mxyyy, image[i].Myyyy);
Index: trunk/Ohana/src/opihi/dvo/imstats.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imstats.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/imstats.c	(revision 5014)
@@ -45,14 +45,14 @@
   fprintf (stdout, "seq  ra (J2000) dec    time (s)   Nstars\n");
   for (i = 0; i < Nimage; i++) {
-    Xvec.elements[i] = 0.001*image[i].secz;
+    Xvec.elements[i] = image[i].secz_PS;
     if (Mcal) 
-      Yvec.elements[i] = 0.001*image[i].Mcal;
+      Yvec.elements[i] = image[i].Mcal_PS;
     else 
-      Yvec.elements[i] = 0.001*image[i].dMcal;
+      Yvec.elements[i] = image[i].dMcal_PS;
     if (!FindMosaicForImage (image, Nimage, i)) continue;
     XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
     fprintf (stderr, "%d %8.4f %8.4f %10d %6d  %5.3f %6.3f %6.3f\n", 
 	     i, r, d, image[i].tzero, image[i].nstar, Xvec.elements[i], 
-	     0.001*image[i].Mcal, 0.001*image[i].dMcal);
+	     image[i].Mcal_PS, image[i].dMcal_PS);
   } 
   if (AutoLimits) SetLimits (&Xvec, &Yvec, &graphmode);
Index: trunk/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 5014)
@@ -18,6 +18,4 @@
 
   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 4865)
+++ trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 5014)
@@ -15,6 +15,4 @@
 
   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/mextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/mextract.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/mextract.c	(revision 5014)
@@ -29,6 +29,4 @@
   /* 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/pmeasure.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 5014)
@@ -22,6 +22,4 @@
   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
   if (VarConfig ("CATDIR", "%s", catdir) == NULL) return (FALSE);
-  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
-    strcpy (catalog.catmode, "RAW");
 
   regions = (RegionFile *) NULL;
Index: trunk/Ohana/src/opihi/dvo/subpix.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/subpix.c	(revision 4865)
+++ trunk/Ohana/src/opihi/dvo/subpix.c	(revision 5014)
@@ -23,6 +23,4 @@
 
   VarConfig ("CATDIR", "%s", catdir);
-  if (VarConfig ("CATMODE", "%s", catalog.catmode) == NULL) 
-    strcpy (catalog.catmode, "RAW");
 
   GetTimeFormat (&TimeReference, &TimeFormat);
@@ -150,5 +148,5 @@
 	RD_to_XY (&X, &Y, Ra, Dec, &image[I].coords);
 	t = TimeValue (measure[j].t, TimeReference, TimeFormat);
-	fprintf (GetOutfile(), "%f %6.3f %7.2f %7.2f %5.3f\n", t, Mabs, X, Y, 0.001*image[I].secz);
+	fprintf (GetOutfile(), "%f %6.3f %7.2f %7.2f %5.3f\n", t, Mabs, X, Y, image[I].secz_PS);
       } 
     }
