@gcjr i have noise in my signal that is why simple average values are not enough. This code detects peak using combination of standard deviation and average . But multiple peaks occur in my signal but only the largest peak in the middle is of my interest . can you help me to single out this large peak? please refer to the plot.