Skip to content

add percentiles 50-99.5 for each serie - #397

Open
jobo322 wants to merge 3 commits into
mainfrom
improve_sanplot_by_percentiles
Open

add percentiles 50-99.5 for each serie#397
jobo322 wants to merge 3 commits into
mainfrom
improve_sanplot_by_percentiles

Conversation

@jobo322

@jobo322 jobo322 commented Jul 27, 2026

Copy link
Copy Markdown
Member

it would be used to select the min level of contour plot.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (9ae3772) to head (01fcf8b).
⚠️ Report is 12 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) to XNoiseSanPlotResult and compute them in xNoiseSanPlot.
  • 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 the considerList range, 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 thread src/x/xNoiseSanPlot.ts
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 thread src/x/xNoiseSanPlot.ts
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.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants