Changeset 17556
- Timestamp:
- May 7, 2008, 10:54:46 AM (18 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 2 edited
-
psastro.h (modified) (1 diff)
-
psastroLuminosityFunction.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.h
r16079 r17556 23 23 double mPeak; // mag of peak bin 24 24 int nPeak; // # of stars in peak bin 25 int sPeak; // sum of stars to peak bin 25 26 } pmLumFunc; 26 27 -
trunk/psastro/src/psastroLuminosityFunction.c
r14163 r17556 22 22 func->mPeak = 0.0; 23 23 func->nPeak = 0; 24 func->sPeak = 0; 24 25 25 26 return func; … … 62 63 int iPeak = 0; 63 64 int nPeak = 0; 65 int sPeak = 0; 64 66 for (int i = 0; i < nMags->n; i++) { 65 67 if (nMags->data.F32[i] < nPeak) continue; 66 68 iPeak = i; 67 69 nPeak = nMags->data.F32[i]; 70 sPeak += nPeak; 68 71 } 69 72 … … 122 125 lumFunc->mPeak = mMin + (iPeak + 0.5)*dMag; 123 126 lumFunc->nPeak = nPeak; 127 lumFunc->sPeak = sPeak; 124 128 125 129 psFree (lnMag);
Note:
See TracChangeset
for help on using the changeset viewer.
