Added functionality to find_peaks tool
![](https://secure.gravatar.com/avatar/de04d49fc8134fabe82a8f262ddb6e45.jpg?s=120&d=mm&r=g)
Hi everybody First of all, this is my first post here, so excuse me if I do anything wrong. I'm mostly a user of SciPy, but recently I needed few functionalities from find_peaks that I discovered weren't implemented. I therefore decided to implement them myself. I'm now wondering if they could be useful for everybody and not just for me. Unfortunately I almost never worked on big projects on Git, so I'm a bit struggling understanding how should I proceed. First of all. The changes I'm talking of are: - Allow to work with unevenly spaced samples specifying a abscissas array x. More specifically: - Filter peaks depending on their distance with not-uniformly spaced points - Evaluate width and width's intersection points correctly with not-uniformly spaced points - Allow the above-mentioned abscissas to be a np.datetime64 array. In this case the minimum distance between two objects can (must) be specified as a np.timedelta64 value and the width of the peaks is also returned as an array of np.timedelta64 values. - Allow the output peaks to be sorted, either ascending or descending, depending either on their height or their prominence. - Allow to specify a maximum number of peaks to be returned. The output would then depend on the sorting method one has chosen. I would therefore ask you: - do you think these changes could be considered useful for the community? - could someone help me in my first-time submission process? Thank you very much and please tell me if I'm doing anything wrong Best regards Luca Amerio Luca
![](https://secure.gravatar.com/avatar/ff54a02a70813af91bac17ea2d3a297b.jpg?s=120&d=mm&r=g)
First two point seems interesting. Each of the next can be achieved in one line (with lexsort and fancy indexing) : it may be better to let that out of the function. I find these change interesting, but other opinion have to be considered. I can help you with the github workflow if you need so. Nicolas Cellier Post Doc Fellowship Université Savoie Mont-Blanc LAMA / LOCIE Le 23 nov. 2018 à 20:55, à 20:55, Luca <lucamerio89@gmail.com> a écrit:
Hi everybody
First of all, this is my first post here, so excuse me if I do anything wrong.
I'm mostly a user of SciPy, but recently I needed few functionalities from find_peaks that I discovered weren't implemented. I therefore decided to implement them myself. I'm now wondering if they could be useful for everybody and not just for me. Unfortunately I almost never worked on big projects on Git, so I'm a bit struggling understanding how should I proceed.
First of all. The changes I'm talking of are:
- Allow to work with unevenly spaced samples specifying a abscissas array x. More specifically: - Filter peaks depending on their distance with not-uniformly spaced points - Evaluate width and width's intersection points correctly with not-uniformly spaced points - Allow the above-mentioned abscissas to be a np.datetime64 array. In this case the minimum distance between two objects can (must) be specified as a np.timedelta64 value and the width of the peaks is also returned as an array of np.timedelta64 values. - Allow the output peaks to be sorted, either ascending or descending, depending either on their height or their prominence. - Allow to specify a maximum number of peaks to be returned. The output would then depend on the sorting method one has chosen.
I would therefore ask you:
- do you think these changes could be considered useful for the community? - could someone help me in my first-time submission process?
Thank you very much and please tell me if I'm doing anything wrong
Best regards Luca Amerio Luca
------------------------------------------------------------------------
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
participants (3)
-
Lars Grüter
-
Luca
-
Nicolas Cellier