Changeset 14163
- Timestamp:
- Jul 12, 2007, 9:42:47 AM (19 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 2 edited
-
psastro.h (modified) (1 diff)
-
psastroLuminosityFunction.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.h
r13832 r14163 17 17 // logN = offset + slope * logS 18 18 typedef struct { 19 double mMin; 20 double mMax; 21 double offset; 22 double slope; 19 double mMin; // minimum magnitude bin with data 20 double mMax; // maximum magnitude bin with data 21 double offset; // fitted line offset 22 double slope; // fitted line slope 23 double mPeak; // mag of peak bin 24 int nPeak; // # of stars in peak bin 23 25 } pmLumFunc; 24 26 -
trunk/psastro/src/psastroLuminosityFunction.c
r12806 r14163 10 10 } 11 11 12 pmLumFunc *pmLumFuncAlloc ( double mMin, double mMax, double offset, double slope) {12 pmLumFunc *pmLumFuncAlloc () { 13 13 14 14 pmLumFunc *func = (pmLumFunc *) psAlloc(sizeof(pmLumFunc)); 15 15 psMemSetDeallocator(func, (psFreeFunc) pmLumFuncFree); 16 16 17 func->mMin = mMin; 18 func->mMax = mMax; 19 func->slope = slope; 20 func->offset = offset; 17 func->mMin = 0.0; 18 func->mMax = 0.0; 19 func->slope = 0.0; 20 func->offset = 0.0; 21 22 func->mPeak = 0.0; 23 func->nPeak = 0; 21 24 22 25 return func; … … 112 115 psLogMsg ("psastro", 4, "logN vs mag residuals: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev); 113 116 114 pmLumFunc *lumFunc = pmLumFuncAlloc (mMinValid, mMaxValid, line->coeff[0], line->coeff[1]); 117 pmLumFunc *lumFunc = pmLumFuncAlloc (); 118 lumFunc->mMin = mMinValid; 119 lumFunc->mMax = mMaxValid; 120 lumFunc->offset = line->coeff[0]; 121 lumFunc->slope = line->coeff[1]; 122 lumFunc->mPeak = mMin + (iPeak + 0.5)*dMag; 123 lumFunc->nPeak = nPeak; 115 124 116 125 psFree (lnMag);
Note:
See TracChangeset
for help on using the changeset viewer.
