fix: map zero magnitude to black in max_chroma_colormap - #23
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
fix: map zero magnitude to black in max_chroma_colormap#23kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
The docstring contract for both colormaps states that magnitude 0 maps to black, and const_chroma_colormap honors it, but max_chroma_colormap returned a near-black (0.051, 0, 0.001) due to residual chroma from the C lookup table interpolation at J=0. Explicitly set zero-valued input to black, matching the documented contract and const_chroma_colormap.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe colormap now maps exactly zero-valued inputs to black after RGB conversion. The documented zero-magnitude example matches the new output. ChangesZero-value colormap output
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Addresses the CodeRabbit comment about the zero-input contract in
max_chroma_colormap.Issue: Both colormaps' docstrings state that magnitude 0 maps to black, and
const_chroma_colormaphonors it, butmax_chroma_colormapreturned a near-black(0.051, 0, 0.001)because the C lookup-table interpolation leaves a tiny residual chroma at J=0.Fix: Explicitly set zero-valued input to black, consistent with the documented contract and
const_chroma_colormap. Updated the docstring example accordingly.The zero-input behavior is a library concern, separate from the CI migration in #22.
Summary by CodeRabbit