IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 29, 2012, 4:18:58 PM (14 years ago)
Author:
eugene
Message:

split out time from csystem inits in dbExtractAverageInit to dbExtractAverageInitAve; allow option to skip result output for parallel ops; fix remote -reload; flush, fsync, fsetlockfile on remote command to ensure all machines see it (and report errors caught); handle equal value bins in threshold function; set global variable to hold the scrip name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120405/Ohana/src/opihi/cmd.data/threshold.c

    r33662 r33944  
    6969    x0 = isFltX ? vecx[0].elements.Flt[Nhi] : vecy[0].elements.Int[Nhi];
    7070    x1 = isFltX ? vecx[0].elements.Flt[Nhi+1]   : vecy[0].elements.Int[Nhi+1];
    71     Xvalue = (value - y0) * (x1 - x0) / (y1 - y0) + x0;
     71    if (y0 == y1) {
     72      Xvalue = 0.5*(x0 + x1);
     73    } else {
     74      Xvalue = (value - y0) * (x1 - x0) / (y1 - y0) + x0;
     75    }   
    7276  } else {
    7377    // interpolate to value:
     
    7680    x0 = isFltX ? vecx[0].elements.Flt[Nhi-1] : vecy[0].elements.Int[Nhi-1];
    7781    x1 = isFltX ? vecx[0].elements.Flt[Nhi]   : vecy[0].elements.Int[Nhi];
    78     Xvalue = (value - y0) * (x1 - x0) / (y1 - y0) + x0;
     82    if (y0 == y1) {
     83      Xvalue = 0.5*(x0 + x1);
     84    } else {
     85      Xvalue = (value - y0) * (x1 - x0) / (y1 - y0) + x0;
     86    }
    7987  }
    8088
Note: See TracChangeset for help on using the changeset viewer.