IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 7, 2008, 10:54:46 AM (18 years ago)
Author:
eugene
Message:

add sum below peak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroLuminosityFunction.c

    r14163 r17556  
    2222  func->mPeak = 0.0;
    2323  func->nPeak = 0;
     24  func->sPeak = 0;
    2425
    2526  return func;
     
    6263  int iPeak = 0;
    6364  int nPeak = 0;
     65  int sPeak = 0;
    6466  for (int i = 0; i < nMags->n; i++) {
    6567    if (nMags->data.F32[i] < nPeak) continue;
    6668    iPeak = i;
    6769    nPeak = nMags->data.F32[i];
     70    sPeak += nPeak;
    6871  }
    6972
     
    122125  lumFunc->mPeak = mMin + (iPeak + 0.5)*dMag;
    123126  lumFunc->nPeak = nPeak;
     127  lumFunc->sPeak = sPeak;
    124128
    125129  psFree (lnMag);
Note: See TracChangeset for help on using the changeset viewer.