Index: /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/BrightCatalog.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/BrightCatalog.c	(revision 36977)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/BrightCatalog.c	(revision 36978)
@@ -256,12 +256,12 @@
  
     // need to create and assign to flat-field correction
-    GET_COLUMN(M,     "MAG",      float);
-    GET_COLUMN(dM,    "MAG_ERR",  float);
-    GET_COLUMN(Xm,    "MAG_CHI",  float);
-    GET_COLUMN(flags, "FLAGS",    int);
-    GET_COLUMN(Ncode, "NCODE",    short);
-    GET_COLUMN(Nused, "NUSED",    short);
-    GET_COLUMN(Mmin,  "MAG_MIN",  float);
-    GET_COLUMN(Mmax,  "MAG_MAX",  float);
+    GET_COLUMN(M,      "MAG",      float);
+    GET_COLUMN(dM,     "MAG_ERR",  float);
+    GET_COLUMN(Mchisq, "MAG_CHI",  float);
+    GET_COLUMN(flags,  "FLAGS",    int);
+    GET_COLUMN(Ncode,  "NCODE",    short);
+    GET_COLUMN(Nused,  "NUSED",    short);
+    GET_COLUMN(Mmin,   "MAG_MIN",  float);
+    GET_COLUMN(Mmax,   "MAG_MAX",  float);
     gfits_free_header (&theader);
     gfits_free_table  (&ftable);
@@ -270,12 +270,12 @@
     ALLOCATE (secfilt, SecFilt, Nrow);
     for (i = 0; i < Nrow; i++) {
-      secfilt[i].M     = M[i];         
-      secfilt[i].dM    = dM[i];
-      secfilt[i].Xm    = Xm[i];
-      secfilt[i].flags = flags[i];
-      secfilt[i].Ncode = Ncode[i];
-      secfilt[i].Nused = Nused[i];
-      secfilt[i].Mmin  = Mmin[i];
-      secfilt[i].Mmax  = Mmax[i];
+      secfilt[i].M      = M[i];         
+      secfilt[i].dM     = dM[i];
+      secfilt[i].Mchisq = Mchisq[i];
+      secfilt[i].flags  = flags[i];
+      secfilt[i].Ncode  = Ncode[i];
+      secfilt[i].Nused  = Nused[i];
+      secfilt[i].Mmin   = Mmin[i];
+      secfilt[i].Mmax   = Mmax[i];
     }
     fprintf (stderr, "loaded data for %lld averages\n", (long long) Nrow);
@@ -283,5 +283,5 @@
     free (M    );
     free (dM   );
-    free (Xm   );
+    free (Mchisq);
     free (flags);
     free (Ncode);
@@ -642,5 +642,5 @@
     float *M        ; ALLOCATE (M      ,  float, Nsec);
     float *dM       ; ALLOCATE (dM     ,  float, Nsec);
-    float *Xm       ; ALLOCATE (Xm     ,  float, Nsec);
+    float *Mchisq   ; ALLOCATE (Mchisq ,  float, Nsec);
     int   *flags    ; ALLOCATE (flags  ,  int,   Nsec);
     short *Ncode    ; ALLOCATE (Ncode  ,  short, Nsec);
@@ -652,27 +652,27 @@
     SecFilt *secfilt = catalog->secfilt;
     for (i = 0; i < Nsec; i++) {
-      M     [i]       = secfilt[i]. M      ;
-      dM    [i]       = secfilt[i]. dM     ;
-      Xm    [i]       = secfilt[i]. Xm     ;
-      flags [i]       = secfilt[i]. flags  ;
-      Ncode [i]       = secfilt[i]. Ncode  ;
-      Nused [i]       = secfilt[i]. Nused  ;
-      Mmin  [i]       = secfilt[i]. Mmin   ;
-      Mmax  [i]       = secfilt[i]. Mmax   ;
+      M     [i]       = secfilt[i].M      ;
+      dM    [i]       = secfilt[i].dM     ;
+      Mchisq[i]       = secfilt[i].Mchisq ;
+      flags [i]       = secfilt[i].flags  ;
+      Ncode [i]       = secfilt[i].Ncode  ;
+      Nused [i]       = secfilt[i].Nused  ;
+      Mmin  [i]       = secfilt[i].Mmin   ;
+      Mmax  [i]       = secfilt[i].Mmax   ;
     }
 
     // add the columns to the output array
-    gfits_set_bintable_column (&theader, &ftable, "MAG",      M    , Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "MAG_ERR",  dM   , Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "MAG_CHI",  Xm   , Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "FLAGS",    flags, Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "NCODE",    Ncode, Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "NUSED",    Nused, Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "MAG_MIN",  Mmin , Nsec);
-    gfits_set_bintable_column (&theader, &ftable, "MAG_MAX",  Mmax , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG",      M     , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_ERR",  dM    , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_CHI",  Mchisq, Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "FLAGS",    flags , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "NCODE",    Ncode , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "NUSED",    Nused , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_MIN",  Mmin  , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_MAX",  Mmax  , Nsec);
 
     free (M      );
     free (dM     );
-    free (Xm     );
+    free (Mchisq );
     free (flags  );
     free (Ncode  );
Index: /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/MosaicOps.c	(revision 36977)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/relastro/src/MosaicOps.c	(revision 36978)
@@ -97,12 +97,12 @@
 
     /* a new mosaic, define ranges */
-    mosaic[Nmosaic].start = start;
-    mosaic[Nmosaic].stop  = stop;
-    mosaic[Nmosaic].Mcal  = 0.0;
-    mosaic[Nmosaic].dMcal = 0.0;
-    mosaic[Nmosaic].Xm    = 0.0;
-    mosaic[Nmosaic].flags  = image[i].flags;
-    mosaic[Nmosaic].secz  = image[i].secz;
-    mosaic[Nmosaic].coords = image[i].coords;
+    mosaic[Nmosaic].start   = start;
+    mosaic[Nmosaic].stop    = stop;
+    mosaic[Nmosaic].Mcal    = 0.0;
+    mosaic[Nmosaic].dMcal   = 0.0;
+    mosaic[Nmosaic].Mchisq  = 0.0;
+    mosaic[Nmosaic].flags   = image[i].flags;
+    mosaic[Nmosaic].secz    = image[i].secz;
+    mosaic[Nmosaic].coords  = image[i].coords;
     mosaic[Nmosaic].myImage = i;
 
