Changeset 17404


Ignore:
Timestamp:
11/30/13 19:10:27 (11 years ago)
Author:
tbretz
Message:
Output pixel index in case of underflow.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/CheckUnderflow.js

    r17354 r17404  
    1717    var min = arr[0];
    1818    var max = arr[0];
    19     arr.forEach(function(val) { sum+=val; sq+=val*val; if (val>max) max=val; if (val<min) min=val; if (func && func(val)) cnt++ });
     19    arr.forEach(function(val, idx) { sum+=val; sq+=val*val; if (val>max) max=val; if (val<min) min=val; if (func && func(val, idx)) cnt++ });
    2020    sum /= arr.length;
    2121    sq  /= arr.length;
     
    193193    hist.print();
    194194
    195     var stat0 = Func.stat(data.avg, function(val) { if (val<600) console.out(" VAL="+val); return val<600; });
     195    var stat0 = Func.stat(data.avg, function(val, idx) { if (val<600) console.out(" PIX[hw="+idx+"]="+val); return val<600; });
    196196    var stat1 = Func.stat(data.rms);
    197197
Note: See TracChangeset for help on using the changeset viewer.