[SciPy-Dev] ENH: Extend peak finding capabilities in scipy.signal (#8264)

Lars G. lagru at mailbox.org
Fri Jan 26 15:19:00 EST 2018


To extend this:

>> - argrelmax doesn't catch peaks that are wider than one sample. Decide
>> how to deal with this. I have implemented an alternative here which may
>> even be faster. But I plan to make a performance comparison to confirm
>> this. I have a feeling this should be addressed (if wanted) in a new
>> pull request.

I forgot to include the link for the proposed alternative implementation:
https://gitlab.com/lagru/peakfinder-demo/blob/master/peak_finder.py#L430

>> - The decision whether find_peaks should have a postfix like
>> "find_peaks_cwt" is still pending. If so which one?
> 
> There is existing discussion of this in the PR, so if people have
> thoughts on this, it's worth looking there to see what ground has been
> covered first.

The new function find_peaks does essentially two things:

1. find all local maxima
2. return a subset of these maxima based on certain criteria (height,
prominence, ...)

The first step (currently uses argrelmax) could be solved in many
different ways (e.g. my alternate solution or even with wavelet
transformation). Therefore I'm not a big fan of adding a prefix based on
the current implementation detail.

Lars


More information about the SciPy-Dev mailing list