IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41820


Ignore:
Timestamp:
Sep 28, 2021, 5:04:15 PM (5 years ago)
Author:
eugene
Message:

add where option to vstat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-dev-20210817/Ohana/src/opihi/cmd.data/vstats.c

    r41819 r41820  
    8686    opihi_flt *X = vec[0].elements.Flt;
    8787    for (i = 0; i < vec[0].Nelements; i++, X++) {
     88      mask[i] = 0; // do not mask unless we have a reason below
    8889      if (tvec) {
    8990        // note the logical vector is 0 == bad (ignore)
    9091        mask[i] = (tvec->type == OPIHI_FLT) ? (tvec->elements.Flt[i] == 0.0) : (tvec->elements.Int[i] == 0);
    91       } else {
    92         mask[i] = 1;
    93       }
    94       if (!finite (*X)) continue;
    95       if (Ignore && (*X == IgnoreValue)) continue;
    96       mask[i] = 0;
     92      }
     93      if (!finite (*X)) { mask[i] = 0; }
     94      if (Ignore && (*X == IgnoreValue)) { mask[i] = 0; }
    9795    }     
    9896  } else {
    9997    opihi_int *X = vec[0].elements.Int;
    10098    for (i = 0; i < vec[0].Nelements; i++, X++) {
     99      mask[i] = 0; // do not mask unless we have a reason below
    101100      if (tvec) {
    102101        // note the logical vector is 0 == bad (ignore)
    103102        mask[i] = (tvec->type == OPIHI_FLT) ? (tvec->elements.Flt[i] == 0.0) : (tvec->elements.Int[i] == 0);
    104       } else {
    105         mask[i] = 1;
    106       }
    107       if (!finite (*X)) continue;
    108       if (Ignore && (*X == IgnoreValue)) continue;
    109       mask[i] = 0;
     103      }
     104      if (!finite (*X)) { mask[i] = 0; }
     105      if (Ignore && (*X == IgnoreValue)) { mask[i] = 0; }
    110106    }     
    111107  }
Note: See TracChangeset for help on using the changeset viewer.