Repository navigation
[FIX] PeakIntegrator: Positions at peak's height percentages - #3251
Merged
hroest merged 13 commits intoFeb 16, 2018
Merged
Conversation
rename findPosAtPerc_ to findPosAtPeakHeightPercent_ rename perc to percent rename goal_intensity to percent_intensity
style: fix argument name
hroest
reviewed
Feb 16, 2018
| TEST_REAL_SIMILAR(psm.end_position_at_5, 2.74394857992666) | ||
| TEST_REAL_SIMILAR(psm.end_position_at_10, 2.76698789247996) | ||
| TEST_REAL_SIMILAR(psm.end_position_at_50, 2.71349672522338) | ||
| TEST_REAL_SIMILAR(psm.width_at_5, 0.15955) |
Contributor
There was a problem hiding this comment.
why are the values now so different? is this expected?
Contributor
Author
There was a problem hiding this comment.
Yes, because we are now taking the point's position before the percentage's goal. Not the one closest.
The one to the left in case of the left half, and the one to the right in case of the right half.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Where
PeakIntegrator::calculatePeakShapeMetrics()
Why
Shamelessly copying @dmccloskey description 😄 :
The current algorithm to calculate the peak shape metrics assumes an ideal peak whereby 5%, 10%, and 50% of the peak height actually exist on both sides of the peak. If the 5%, 10%, and 50% of the peak height cannot be found on either side, erroneous values are calculated.
How
I implemented a
protectedfunction template:Documentation is also provided.
Notes
The proposed solution assumes a convex peak.