IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21064 for trunk/Ohana


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

ignore nan and inf in the opihi rebin function

Location:
trunk/Ohana/src/opihi/cmd.data
Files:
2 edited

Legend:

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

    r17579 r21064  
    77int book_command     PROTO((int, char **));
    88int center           PROTO((int, char **));
     9int parity           PROTO((int, char **));
    910int circstats        PROTO((int, char **));
    1011int clear            PROTO((int, char **));
     
    128129  {1, "book",         book_command,     "commands to manipulate book/page/word data"},
    129130  {1, "center",       center,           "center image on coords"},
     131  {1, "parity",       parity,           "set image parity"},
    130132  {1, "circstats",    circstats,        "circular statistics"},
    131133  {1, "clear",        clear,            "erase plot"},
  • 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.