IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2019, 8:29:31 PM (7 years ago)
Author:
eugene
Message:

adding vtransitions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20190329/src/opihi/cmd.data/threshold.c

    r40623 r40664  
    7171
    7272  if (!REVERSE) {
     73    // this algorithm assumes vecy[BinMax] > threshold, vecy[BinMin] < threshold
     74    if (vecy[0].elements.Flt[BinMin] > value) {
     75      gprint (GP_ERR, "ERROR: all values above threshold\n");
     76      return FALSE;
     77    }
     78    if (vecy[0].elements.Flt[BinMax] < value) {
     79      gprint (GP_ERR, "ERROR: all values below threshold\n");
     80      return FALSE;
     81    }
    7382    while (Nhi - Nlo > 10) {
    7483      N = 0.5*(Nlo + Nhi);
     
    8998    }
    9099  } else {
     100    // this algorithm assumes vecy[BinMin] > threshold, vecy[BinMax] < threshold
     101    if (vecy[0].elements.Flt[BinMin] < value) {
     102      gprint (GP_ERR, "ERROR: all values below threshold\n");
     103      return FALSE;
     104    }
     105    if (vecy[0].elements.Flt[BinMax] > value) {
     106      gprint (GP_ERR, "ERROR: all values above threshold\n");
     107      return FALSE;
     108    }
    91109    while (Nhi - Nlo > 10) {
    92110      N = 0.5*(Nlo + Nhi);
Note: See TracChangeset for help on using the changeset viewer.