Figure 2:
1-dim peaks
(example)
threshold[0]