Sequential subsequence removal with arbitrary predicate I want to extract sub-sequences from a sequence of float values.
The "scale" and range of these values is arbitrary (as I can manipulate it at will) but the "shape" is consistent.

For a visual example:


I want to extract the above five stacks as five "chunks". I want them in the order they occur (left-to-right). Do not be too distracted with the visual, though, as there can be an arbitrary number of points within the interval, but guaranteed $N_{points} &lt; 2000$.

I have tried framing this problem as a dynamic partitioning problem, as an iterative subsequence extract problem, and something like $argmax$ but applied multiple times on a shrinking sequence.

Please pardon the ambiguity; I am struggling to even articulate the problem in a useful fashion. Critique and guidance would be much appreciated
Set threshold to, say 30 (arbitrary value greater than noise in the plot) and start from left to right, if value is greater than threshold, keep it as run - collect data to temporary array, if values drop below threshold then discard data and create new array for another run.

This will cut 5 bars and discard data between, if you want to keep data, you have to decide the shape (divide evenly between bars, keep it to left or to right).
It may happen that data drops below threshold in the bar (not visible in plot), then keep counter of dropped values, if it is small, add them to last run.