IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 24, 2007, 12:24:44 PM (19 years ago)
Author:
eugene
Message:

fixed error handling issues

File:
1 edited

Legend:

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

    r10880 r11269  
    4949  for (int i = 0; i < stars->n; i++) {
    5050    star = stars->data[i];
     51    if (!isfinite(star->Mag)) continue;
    5152    int bin = (star->Mag - mMin) / dMag;
     53    if (bin < 0) psAbort ("psastro", "bin cannot be negative!");
     54    if (bin >= nBin) psAbort ("psastro", "bin cannot be > %d!", nBin);
    5255    nMags->data.F32[bin] += 1.0;
    5356  }
Note: See TracChangeset for help on using the changeset viewer.