let windowMax = Math.max(this.options.minPeak, Math.min(this.options.maxPeak, Math.max(...window)));