peak finding approach
Hi all, Is there a fast numpy way to find the peak boundaries in a (looong, millions of points) smoothed signal? I've found some approaches, like this: z = data[1:1] l = data[:2] r = data[2:] f = np.greater(z, l) f *= np.greater(z, r) boundaries = np.nonzero(f) but it is too sensitive... it detects any small variations in slope on the shoulders of a bigger peak... Any hint? thanks d
On Thu, Mar 18, 2010 at 5:19 PM, Davide Cittaro <davide.cittaro@ifomieocampus.it> wrote:
Hi all, Is there a fast numpy way to find the peak boundaries in a (looong, millions of points) smoothed signal? I've found some approaches, like this:
z = data[1:1] l = data[:2] r = data[2:] f = np.greater(z, l) f *= np.greater(z, r) boundaries = np.nonzero(f)
but it is too sensitive... it detects any small variations in slope on the shoulders of a bigger peak... Any hint?
to find peaks something like the following works np.nonzero(data == maximumfilter data, larger window size) where maximum filter is in scipy.signal or ndimage I'm not sure about boundaries, maybe the same with minimum filter Josef
thanks
d _______________________________________________ NumPyDiscussion mailing list NumPyDiscussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpydiscussion
participants (2)

Davide Cittaro

josef.pktd＠gmail.com