Index: /trunk/psastro/src/psastro.h
===================================================================
--- /trunk/psastro/src/psastro.h	(revision 14162)
+++ /trunk/psastro/src/psastro.h	(revision 14163)
@@ -17,8 +17,10 @@
 // logN = offset + slope * logS
 typedef struct {
-  double mMin;
-  double mMax;
-  double offset;
-  double slope;
+    double mMin;			// minimum magnitude bin with data
+    double mMax;			// maximum magnitude bin with data
+    double offset;			// fitted line offset
+    double slope;			// fitted line slope
+    double mPeak;			// mag of peak bin 
+    int nPeak;				// # of stars in peak bin
 } pmLumFunc;
 
Index: /trunk/psastro/src/psastroLuminosityFunction.c
===================================================================
--- /trunk/psastro/src/psastroLuminosityFunction.c	(revision 14162)
+++ /trunk/psastro/src/psastroLuminosityFunction.c	(revision 14163)
@@ -10,13 +10,16 @@
 }
 
-pmLumFunc *pmLumFuncAlloc (double mMin, double mMax, double offset, double slope) {
+pmLumFunc *pmLumFuncAlloc () {
 
   pmLumFunc *func = (pmLumFunc *) psAlloc(sizeof(pmLumFunc));
   psMemSetDeallocator(func, (psFreeFunc) pmLumFuncFree);
 
-  func->mMin = mMin;
-  func->mMax = mMax;
-  func->slope = slope;
-  func->offset = offset;
+  func->mMin = 0.0;
+  func->mMax = 0.0;
+  func->slope = 0.0;
+  func->offset = 0.0;
+
+  func->mPeak = 0.0;
+  func->nPeak = 0;
 
   return func;
@@ -112,5 +115,11 @@
   psLogMsg ("psastro", 4, "logN vs mag residuals: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
 
-  pmLumFunc *lumFunc = pmLumFuncAlloc (mMinValid, mMaxValid, line->coeff[0], line->coeff[1]);
+  pmLumFunc *lumFunc = pmLumFuncAlloc ();
+  lumFunc->mMin = mMinValid;
+  lumFunc->mMax = mMaxValid;
+  lumFunc->offset = line->coeff[0];
+  lumFunc->slope = line->coeff[1];
+  lumFunc->mPeak = mMin + (iPeak + 0.5)*dMag;
+  lumFunc->nPeak = nPeak;
 
   psFree (lnMag);
