does not matter if that is a array or a data stream,
the idea seems to be to have
- a filter ( play this one )
or
- reject extreme signals
start with a code that detects that “culprit” position in array and show that code here,
this way we understand how you would define mathematically a “peak”