-
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
Fix stretch histogram reset_limits #2529
Fix stretch histogram reset_limits #2529
Conversation
@kecnry , should this be backported? The code for this plugin in v3.7.x look very different. |
# change the x_att to the dummy 'ref' dataset then change it back to | ||
# the latest ComponentID after. | ||
|
||
self.stretch_histogram.viewer.state.x_att = self.stretch_histogram.app.data_collection['ref'].id['x'] # noqa: E501 |
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.
@astrofrog , do we need "hold sync" block here?
Now the CI failure is real:
|
I'll investigate the failure, it is indeed a real problem. |
No need to backport this, no. The migration to using a glue viewer is unreleased. |
I found a bug deep inside glue that was causing issues here: I've released glue-core v1.14.1 with a fix for that bug. I've now removed the workaround that I originally added in this PR and have also removed the workaround to add the 'ref' dataset at all as this appears to no longer be needed with the above bug fix. One thing that is missing at the moment in a regression test for the original bug here - it might be better for @kecnry to add this as I'm not sure what the best way is to do this via public API. |
911b089
to
99f9c86
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2529 +/- ##
==========================================
- Coverage 90.81% 90.80% -0.02%
==========================================
Files 160 160
Lines 19298 19394 +96
==========================================
+ Hits 17525 17610 +85
- Misses 1773 1784 +11 ☔ View full report in Codecov by Sentry. |
…togram dataset, and temporarily change x_att to 'ref' dataset to avoid issues
[ci skip] [rtd skip]
…fix for stretch histogram
cf95fe8
to
706db5b
Compare
I removed the changelog entry and marked this as affects-dev |
I'm still seeing some weird behavior. Would you expect |
@kecnry - I'll investigate! |
@kecnry - from what I can see, the stretch histogram in the plot options manually sets the histogram limits to be the 95% percentile limits of the data. However, So there are three questions here:
|
This would definitely be handy for our use-case if you think it is something useful upstream. Otherwise, I think it is reasonable that the x-limits would be reset to contain all the bins, but I don't think I'd expect the home button to reset the bins, but rather only x/y-limits. Alternatively I guess we could just call the internal reset_x/y_limits methods if you think the general case should reset the bins? |
The 95th percentile rings a bell. I think POs wanted the default to be 95th percentile or something because min/max was not displaying anything meaningful in real data. |
That's a good point - we may want bypass the home button eventually to set the limits based on the current locations of vmin/vmax, but I think |
@kecnry - see glue-viz/glue#2455, with this you can do:
which I think would give the behavior you want. Could you test it out and let me know if this meets your needs? If so, I can merge & release. |
@astrofrog - that seems to do the trick and act as expected thanks! I added a commit here which will make use of that once its release and the pin for glue updated in this PR - will that be 1.14.2 or 1.15? |
* fix percentile and bins when resetting limits requires glue-viz/glue#2455 * update glue-core pin to v1.16.0 --------- Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>
Description
This should fix reset_limits in the stretch histogram
Fixes #2506
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.