Repository navigation
[FIX,TEST] Fix auto-percentile signal-to-noise estimation - #10583
Conversation
Correct automatic histogram binning for low intensities, use the maximum scan intensity, and scan the histogram through the selected percentile. Add regression tests for the affected estimators. Fixes OpenMS#10521
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
timosachsenberg
left a comment
There was a problem hiding this comment.
Reviewed against #10521; all acceptance criteria are met.
- The absolute
- 1offset is gone in both estimators. The bin index is clamped to [0, 99], so the maximum and NaN intensities stay in range. - MeanIterative's
max_elementcomparator now finds the maximum. Before, it found the minimum, so a zero minimum gavebin_size == 0, and the unclamped bin index could point outside the histogram. The newc.empty()guard removes the dereference ofend(). - The percentile scan is now bounded by the 100 histogram bins. Before, it was bounded by the peak count, which could read past
histogram_autowhen there were more than 100 peaks. std::max(1, ...)keeps the estimate from going negative for very small percentiles or spectra.- The new tests check hand-computed values for a spectrum with maxInt = 1. With the old binning, all five peaks fall into bin 0 (max_intensity 0.005); with the fix the estimate is 0.755, so the tests tell the old and new code apart. The updated comment in the existing Median test (1.5 instead of 0.5) is also correct, and the expected noise does not change.
- The full Linux suite passes (3151/3151, TOPP tests included), so no reference outputs changed.
Optional: TEST_EQUAL(empty.size(), 0) in the MeanIterative test is always true. That part of the test only checks that init() on an empty spectrum does not crash. That is fine, but a comment saying so would make it clearer.
Generated by Claude Code
…ersion, #10583, #10492, #10525, #10524, #10346, #9782) Conflicts in ConversionHelper and its test: develop removes MapConversion::convert(PeakMap -> ConsensusMap) and moves its peak selection tests to MapAlignmentAlgorithmPoseClustering_test; this branch keeps the identification data handling of the remaining conversions (convertIdentifications() and its test section). FileConverter: develop's comment about OMS input is dropped, as this branch removes .oms. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
Summary
Validation
SignalToNoiseEstimatorMeanIterative_testandSignalToNoiseEstimatorMedian_testin the focused Ninja build.Fixes #10521
Summary by CodeRabbit