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.
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
Imviz: Add zoom and zoom_level API #744
Imviz: Add zoom and zoom_level API #744
Changes from all commits
2982671
94cde08
f20e993
a39b66a
d3c7f37
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If this is simply a method to set the
zoom_level
, it would would be nice to accept "fit" as input here as well as when settingzoom_level
directly. That was one of the first things I tried and I was surprised that it didn't work.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.
That would go against the current
astrowidgets
API upstream though...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.
zoom()
was supposed to be relative zoom, so "fit" does not really fit (pun?) in that paradigm.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.
Ah I see, that's the context I was missing, I guess. I didn't fully appreciate that
zoom_level
is setting the absolute zoom relative to the image, whereaszoom
is setting the zoom relative to the current display.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.
I can't blame you. I didn't either until astropy/astrowidgets#144
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.
Does seem weird some x/y min/max not matching exactly for square data and display at aspect ratio one, but that adjustment is deep within glue core and I don't feel like digging no more. If @astrofrog has ideas, then great. Otherwise, I'll just leave it be.
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.
For the off-center case, local testing showed that
y_min
andy_max
was-5. , 5.
instead of-0.5, 9.5
like X. Something not triggering here in the way I set up or hack around the viewer for unit testing. I swear to you it works properly in a notebook. If @astrofrog has ideas, then great. If not, I'll just leave this untested for the off-center case.