-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Term Entry] Python Scipy Function: find_peaks() #5895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey @naajiha please sign the CLA |
signed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @naajiha , thank you for contributing to Codecademy Docs, the entry is nicely written! 😄
I've suggested a few changes, could you please review and modify those at your earliest convenience? Thank you! 😃
content/scipy/concepts/scipy-signal/terms/find-peaks/find-peaks.md
Outdated
Show resolved
Hide resolved
content/scipy/concepts/scipy-signal/terms/find-peaks/find-peaks.md
Outdated
Show resolved
Hide resolved
## Syntax | ||
|
||
```pseudo | ||
find_peaks(signal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct the syntax. Here is the reference documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html
The `signal` parameter is an array of numbers. | ||
|
||
The default height of the peaks is defined by the height parameter. If the parameter is unspecified, the height is set to 0. The width parameter is used to filter out peaks that have a width less than the specified width. The rel_height parameter is used to filter out peaks that have a relative height less than the specified relative height. The threshold parameter is used to filter out peaks that have a value less than the specified threshold. The distance parameter is used to filter out peaks that have a distance between peaks less than the specified distance. The prominence parameter is used to filter out peaks that have a prominence less than the specified prominence. The wlen parameter is used to filter out peaks that have a width less than the specified width. The plateau_size parameter is used to filter out peaks that have a plateau size less than the specified plateau size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the parameters should be in bullet points, an example could be:
x
: The input 1D array or signal in which peaks are to be identified.height
: Specifies the required height of peaks. A tuple can set minimum and maximum peak heights.threshold
: Specifies the required threshold for the vertical distance between a peak and its neighbors.- .
- .
- .
print(peaks) | ||
``` | ||
|
||
The above code creates a signal with some peaks, finds the peaks in the signal, and prints the indices of the peaks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showcase the output of this code using a shell
block
Hey @naajiha are you still working on this? |
yes, sorry, my computer was getting fixed, it was broken |
…s.md Co-authored-by: Mamta Wardhani <[email protected]>
…s.md Co-authored-by: Mamta Wardhani <[email protected]>
I pushed the changes, let me know if you are able to see them |
MINOR FIXES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing to Codecademy Docs @naajiha 😄
The entry looks good for a second round of review! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, @naajiha!
👋 @naajiha 🎉 Your contribution(s) can be seen here: https://www.codecademy.com/resources/docs/scipy/scipy-signal/find-peaks Please note it may take a little while for changes to become visible. |
Description
-Added the find_peaks() term for python from the scipy package
-Closes #5853
Issue Solved
Type of Change
Checklist
main
branch.Issues Solved
section.