Index: /branches/eam_branches/ohana.20170822/src/relphot/src/BrightCatalog.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/BrightCatalog.c	(revision 40262)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/BrightCatalog.c	(revision 40263)
@@ -66,4 +66,5 @@
     GET_COLUMN(D,         "DEC",  	double);
     GET_COLUMN(M,         "MAG_SYS",  	float);
+    GET_COLUMN(Mkron,     "MAG_KRON",  	float);
     GET_COLUMN(McalPSF,   "MCAL_PSF",  	float);
     GET_COLUMN(McalAPER,  "MCAL_APER", 	float);
@@ -90,4 +91,5 @@
       measure[i].D         = D[i];
       measure[i].M         = M[i];
+      measure[i].Mkron     = Mkron[i];
       measure[i].McalPSF   = McalPSF[i];
       measure[i].McalAPER  = McalAPER[i];
@@ -112,4 +114,5 @@
     free (D       );
     free (M       );
+    free (Mkron   );
     free (McalPSF );
     free (McalAPER);
@@ -189,4 +192,5 @@
     // need to create and assign to flat-field correction
     GET_COLUMN(M,      "MAG",      float);
+    GET_COLUMN(Mkron,  "MAG_KRON", float);
     GET_COLUMN(dM,     "MAG_ERR",  float);
     GET_COLUMN(Mchisq, "MAG_CHI",  float);
@@ -203,4 +207,5 @@
     for (i = 0; i < Nrow; i++) {
       secfilt[i].MpsfChp  = M[i];         
+      secfilt[i].MkronChp = Mkron[i];         
       secfilt[i].dMpsfChp = dM[i];
       secfilt[i].Mchisq   = Mchisq[i];
@@ -214,4 +219,5 @@
 
     free (M     );
+    free (Mkron );
     free (dM    );
     free (Mchisq);
@@ -274,4 +280,5 @@
     gfits_define_bintable_column (&theader, "D", "DEC",      "dec",                        "degree", 1.0, 0.0);
     gfits_define_bintable_column (&theader, "E", "MAG_SYS",  "magnitude (sys)",             NULL,    1.0, 0.0);
+    gfits_define_bintable_column (&theader, "E", "MAG_KRON", "magnitude (sys,kron)",        NULL,    1.0, 0.0);
     gfits_define_bintable_column (&theader, "E", "MCAL_PSF", "magnitude (cal)",             NULL,    1.0, 0.0);
     gfits_define_bintable_column (&theader, "E", "MCAL_APER","magnitude (cal)",             NULL,    1.0, 0.0);
@@ -297,4 +304,5 @@
     double *D         ; ALLOCATE (D        ,  double, catalog->Nmeasure);
     float  *M         ; ALLOCATE (M        ,  float,  catalog->Nmeasure);
+    float  *Mkron     ; ALLOCATE (Mkron    ,  float,  catalog->Nmeasure);
     float  *McalPSF   ; ALLOCATE (McalPSF  ,  float,  catalog->Nmeasure);
     float  *McalAPER  ; ALLOCATE (McalAPER ,  float,  catalog->Nmeasure);
@@ -319,4 +327,5 @@
       D[i]        = measure[i].D        ;
       M[i]  	  = measure[i].M        ;
+      Mkron[i]	  = measure[i].Mkron    ;
       McalPSF[i]  = measure[i].McalPSF  ;
       McalAPER[i] = measure[i].McalAPER ;
@@ -340,4 +349,5 @@
     gfits_set_bintable_column (&theader, &ftable, "DEC",  	D,         catalog->Nmeasure);
     gfits_set_bintable_column (&theader, &ftable, "MAG_SYS",  	M,         catalog->Nmeasure);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_KRON",  	Mkron,     catalog->Nmeasure);
     gfits_set_bintable_column (&theader, &ftable, "MCAL_PSF",  	McalPSF,   catalog->Nmeasure);
     gfits_set_bintable_column (&theader, &ftable, "MCAL_APER",  McalAPER,  catalog->Nmeasure);
@@ -359,4 +369,5 @@
     free (D       );
     free (M       );
+    free (Mkron   );
     free (McalPSF );
     free (McalAPER);
@@ -444,6 +455,7 @@
     gfits_create_table_header (&theader, "BINTABLE", "SECFILT");
 
-    gfits_define_bintable_column (&theader, "E", "MAG",      "",              "arcsec", 1.0, 0.0);
-    gfits_define_bintable_column (&theader, "E", "MAG_ERR",  "",              "arcsec", 1.0, 0.0);
+    gfits_define_bintable_column (&theader, "E", "MAG",      "",              "mag",   1.0, 0.0);
+    gfits_define_bintable_column (&theader, "E", "MAG_KRON", "",              "mag",   1.0, 0.0);
+    gfits_define_bintable_column (&theader, "E", "MAG_ERR",  "",              "mag",   1.0, 0.0);
     gfits_define_bintable_column (&theader, "E", "MAG_CHI",  "",              NULL,    1.0, 0.0);
     gfits_define_bintable_column (&theader, "J", "FLAGS",    "",              NULL,    1.0, 0.0);
@@ -462,4 +474,5 @@
     // create intermediate storage arrays
     float *M        ; ALLOCATE (M      ,  float, Nsec);
+    float *Mkron    ; ALLOCATE (Mkron  ,  float, Nsec);
     float *dM       ; ALLOCATE (dM     ,  float, Nsec);
     float *Mchisq   ; ALLOCATE (Mchisq ,  float, Nsec);
@@ -474,4 +487,5 @@
     for (i = 0; i < Nsec; i++) {
       M     [i]       = secfilt[i].MpsfChp ;
+      Mkron [i]       = secfilt[i].MkronChp;
       dM    [i]       = secfilt[i].dMpsfChp;
       Mchisq[i]       = secfilt[i].Mchisq  ;
@@ -485,4 +499,5 @@
     // add the columns to the output array
     gfits_set_bintable_column (&theader, &ftable, "MAG",      M     , Nsec);
+    gfits_set_bintable_column (&theader, &ftable, "MAG_KRON", Mkron , Nsec);
     gfits_set_bintable_column (&theader, &ftable, "MAG_ERR",  dM    , Nsec);
     gfits_set_bintable_column (&theader, &ftable, "MAG_CHI",  Mchisq, Nsec);
@@ -494,4 +509,5 @@
 
     free (M      );
+    free (Mkron  );
     free (dM     );
     free (Mchisq );
Index: /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c	(revision 40262)
+++ /branches/eam_branches/ohana.20170822/src/relphot/src/ImageOps.c	(revision 40263)
@@ -721,5 +721,5 @@
 
       if ((image[i].imageID == TEST_IMAGE1) || (image[i].imageID == TEST_IMAGE2)) {
-	fprintf (stderr, "%1d, %3d : %3d, %3d : %10.6f %10.6f : %6.3f  %6.3f  %6.3f  %6.3f  %6.3f : %6.3f\n", (int) i, (int) j, (int) c, (int) m, catalog[c].averageT[n].R, catalog[c].averageT[n].D, MsysPSF, MrelPSF, Mmos, Mgrid, Mflat, psfStars->flxlist[Nref]);
+	fprintf (stderr, "%1d, %3d : %3d, %3d : %10.6f %10.6f : %6.3f  %6.3f  %6.3f  %6.3f  %6.3f : %6.3f\n", (int) i, (int) j, (int) c, (int) m, catalog[c].averageT[n].R, catalog[c].averageT[n].D, MsysKron, MrelKron, Mmos, Mgrid, Mflat, kronStars->flxlist[Nref]);
       }
 
@@ -771,18 +771,18 @@
     if ((image[i].imageID == TEST_IMAGE1) || (image[i].imageID == TEST_IMAGE2)) {
       for (j = 0; j < Nref; j++) {
-	fprintf (stderr, "%1d, %8d : %6.3f  %6.3f  %6.3f  %d\n", (int) i, (int) image[i].imageID, psfStars->flxlist[j], psfStars->errlist[j], psfStars->wgtlist[j], psfStars->msklist[j]);
+	fprintf (stderr, "%1d, %8d : %6.3f  %6.3f  %6.3f  %d\n", (int) i, (int) image[i].imageID, kronStars->flxlist[j], kronStars->errlist[j], kronStars->wgtlist[j], kronStars->msklist[j]);
       }
     }
 
     if ((image[i].imageID == TEST_IMAGE1) || (image[i].imageID == TEST_IMAGE2)) {
-      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalPSF, image[i].dMcal);
+      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalAPER, image[i].dMcal);
     }
 
     if (!mark && VERBOSE_IMAGE) {
-      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalPSF, image[i].dMcal);
+      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalAPER, image[i].dMcal);
     }
 
     if (PLOTSTUFF) {
-      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalPSF, image[i].dMcal);
+      fprintf (stderr, "Mcal for : %s : %7.4f %7.4f\n", image[i].name, image[i].McalAPER, image[i].dMcal);
       plot_setMcal (psfStars->flxlist, Nref, &stats, CLOUD_TOLERANCE);
     }
