Signal processing miscellaneous utilities.

Static methods

staticfindPeaks(y:Array<Float>, ?threshold:Float, ?minHeight:Float):Array<Int>

Finds indexes of peaks in the order they appear in the input sequence.

Parameters:

threshold

Minimal peak height wrt. its neighbours, defaults to 0.

minHeight

Minimal peak height wrt. the whole input, defaults to global minimum.

staticmax(y:Array<Float>):Float

Returns the global maximum.

staticmaxi(y:Array<Float>):Int

Returns the global maximum's index.

staticmean(y:Array<Float>):Float

Returns the average value of an array.

staticmin(y:Array<Float>):Float

Returns the global minimum.

staticmini(y:Array<Float>):Int

Returns the global minimum's index.

staticsmooth(y:Array<Float>, n:Int):Array<Float>

Returns a smoothed version of the input array using a moving average.

staticsum(array:Array<Float>):Float

Returns the sum of all the elements of a given array.

This function tries to minimize floating-point precision errors.