Skip to content

Function: blockMax() ​

ts
function blockMax(values, cols): Float64Array;

Defined in: stats/waterfall.ts:132

Reduce a column to cols cells by taking each block's maximum — the right reduction for a waterfall, where a peak two bins wide must survive fitting a 200k-bin spectrum into a few hundred cells. Shorter columns are stretched by nearest sample.

Parameters ​

ParameterType
valuesArrayLike<number>
colsnumber

Returns ​

Float64Array

MIT licensed. WebGL2 required.