IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2007, 9:42:47 AM (19 years ago)
Author:
eugene
Message:

adding peak data to lum functions

File:
1 edited

Legend:

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

    r12806 r14163  
    1010}
    1111
    12 pmLumFunc *pmLumFuncAlloc (double mMin, double mMax, double offset, double slope) {
     12pmLumFunc *pmLumFuncAlloc () {
    1313
    1414  pmLumFunc *func = (pmLumFunc *) psAlloc(sizeof(pmLumFunc));
    1515  psMemSetDeallocator(func, (psFreeFunc) pmLumFuncFree);
    1616
    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;
    2124
    2225  return func;
     
    112115  psLogMsg ("psastro", 4, "logN vs mag residuals: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
    113116
    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;
    115124
    116125  psFree (lnMag);
Note: See TracChangeset for help on using the changeset viewer.