add percentiles 50-99.5 for each serie - #397
Open
jobo322 wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #397 +/- ##
==========================================
+ Coverage 97.13% 97.36% +0.22%
==========================================
Files 209 213 +4
Lines 4159 4251 +92
Branches 1037 1062 +25
==========================================
+ Hits 4040 4139 +99
+ Misses 115 109 -6
+ Partials 4 3 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR extends the xNoiseSanPlot output to include computed intensity percentiles (intended to help choose contour plot minimum levels), and updates the implementation/tests accordingly.
Changes:
- Add
percentiles(positive/negative) toXNoiseSanPlotResultand compute them inxNoiseSanPlot. - Introduce
getPercentiles()to compute 50th–99.5th percentiles (0.5 step) from the pre-sorted sign arrays. - Adjust
determineCutOff()’s sigma-estimation scan to use theconsiderListrange, and update tests to assert the new percentiles output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/x/xNoiseSanPlot.ts | Adds percentile output + helper; modifies cut-off estimation loop and minor refactors/cleanup. |
| src/x/tests/xNoiseSanPlot.test.ts | Adds assertions for the new percentiles fields on the result. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
265
to
269
| for ( | ||
| let quantileFraction = 0.01; | ||
| quantileFraction <= 0.99; | ||
| let quantileFraction = from - step / 2; | ||
| quantileFraction <= to + step / 2; | ||
| quantileFraction += 0.01 | ||
| ) { |
Comment on lines
+392
to
+397
| /** | ||
| * Calculates intensity percentiles ranging from the 50th to the 99.5th percentile | ||
| * (in 0.5 increments) from a pre-sorted array. | ||
| * @param sorted - a pre-sorted array of numbers. | ||
| * @returns An object mapping percentile labels to their corresponding values. | ||
| */ |
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.
it would be used to select the min level of contour plot.