Filter an array x/y based on various criteria x points are expected to be sorted
object containing 2 properties x and y.
Optional
number of top peaks to keep.
filtered data.
Filter an array x/y based on various criteria x points are expected to be sorted