IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 30, 2008, 10:17:54 AM (18 years ago)
Author:
eugene
Message:

ignore nan and inf in the opihi rebin function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/rebin.c

    r7917 r21064  
    128128          for (i = 0; i < nx; i++, Vout++) {
    129129            for (x = 0; x < n; x++, Vin++) {
     130              if (isnan(*Vin)) continue;
     131              if (isinf(*Vin)) continue;
    130132              if (Ignore && (*Vin == IgnoreValue)) continue;
    131133              *Vout += *Vin;
     
    144146          if (Normalize) { Vn = Npix + j*nx; }
    145147          for (i = 0; i < in[0].header.Naxis[0]; i++, Vin++) {
    146             if (Ignore && (*Vin == IgnoreValue)) {
     148            if (isnan(*Vin) || isinf(*Vin) || (Ignore && (*Vin == IgnoreValue))) {
    147149              Vout += n;
    148150              if (Normalize) Vn += n;
Note: See TracChangeset for help on using the changeset viewer.