-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: correction to Plot Options stretch function curve #2537
Conversation
79f628c
to
d396024
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 3 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see it wasn't anything too involved - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to add a regression test, to make sure a couple of stretch functions do not look weird when colormap is changed?
d396024
to
2b1a621
Compare
…tretch function curve
Description
The Plot Options stretch histogram curve from #2390 looks fine in Gray colormap, but does not look fine in other colormaps. Here's an image with a linear stretch showing a nonlinear curve in the stretch histogram:
In reproducing the logic in glue's CompositeArray module, I apply the stretch, contrast, and bias correctly, but then I went one line too far and also applied the colormap to the values that should represent the curve. That's not what we want! In the gray colormap case, the colormap is linear+monotonic so you don't notice the problem.
This PR corrects the implementation to work with any colormap:
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.