function peak_picking(E, window) {
        var o = [],
            N = E.length,
            n;
        if (window === undefined) {
            window = 5;
        }
        for (n = window; n < N - window - 1; n++) {
            var max = 1,
                m;
            for (m = -window; m < window - 1; m++) {
                if (E[n + m] > E[n]) {
                    max = 0;
                    break;
                }
            }
            if (max === 1) {
                o.push(n);
            }
        }
        return o;
    }
// Based on work by Motegi and Shimamura
Based on work by Motegi and Shimamura
Based on work by Motegi and Shimamura
function peak_picking(E, window) {
        var o = [],
            N = E.length,
            n;
        if (window === undefined) {
            window = 5;
        }
        for (n = window; n < N - window - 1; n++) {
            var max = 1,
                m;
            for (m = -window; m < window - 1; m++) {
                if (E[n + m] > E[n]) {
                    max = 0;
                    break;
                }
            }
            if (max === 1) {
                o.push(n);
            }
        }
        return o;
    }
function peak_picking ( E , window ) { var o = [ ] , N = E . length , n ; if ( window === undefined ) { window = 5 ; } for ( n = window ; n < N - window - 1 ; n ++ ) { var max = 1 , m ; for ( m = - window ; m < window - 1 ; m ++ ) { if ( E [ n + m ] > E [ n ] ) { max = 0 ; break ; } } if ( max === 1 ) { o . push ( n ) ; } } return o ; }
Based on work by Motegi and Shimamura
Based on work by Motegi and Shimamura